@tradecanvas/core 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2606 -2131
- package/dist/index.js.map +1 -1
- package/dist/indicators/candles/candleShape.d.ts +69 -0
- package/dist/indicators/candles/candleShape.d.ts.map +1 -0
- package/dist/indicators/candles/detect.d.ts +22 -0
- package/dist/indicators/candles/detect.d.ts.map +1 -0
- package/dist/indicators/candles/multiPatterns.d.ts +6 -0
- package/dist/indicators/candles/multiPatterns.d.ts.map +1 -0
- package/dist/indicators/candles/patternDef.d.ts +11 -0
- package/dist/indicators/candles/patternDef.d.ts.map +1 -0
- package/dist/indicators/candles/singlePatterns.d.ts +6 -0
- package/dist/indicators/candles/singlePatterns.d.ts.map +1 -0
- package/dist/indicators/index.d.ts +1 -0
- package/dist/indicators/index.d.ts.map +1 -1
- package/dist/indicators/overlay/CandlePatterns.d.ts +22 -0
- package/dist/indicators/overlay/CandlePatterns.d.ts.map +1 -0
- package/dist/indicators/registry.d.ts.map +1 -1
- package/dist/ui/ChartLegend.d.ts +2 -0
- package/dist/ui/ChartLegend.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Two stacked canvases — a hover repaints only the thin top one:
|
|
|
34
34
|
|
|
35
35
|
Data transforms: `toHeikinAshi`, `toRenko`, `toLineBreak`, `toKagi`, `toPointAndFigure`, `toRangeBars`
|
|
36
36
|
|
|
37
|
-
### Indicators (
|
|
37
|
+
### Indicators (134 built-in)
|
|
38
38
|
|
|
39
39
|
Moving averages, bands and channels, trend and stops, VWAPs and profiles on the price pane; oscillators, volume and volatility indicators in panes of their own. Every id with its inputs, lines and levels is in the [indicator catalog](https://bonguynvan.github.io/tradecanvas/docs/indicators). Four more read a second symbol's bars (`compareSymbol`, `spread`, `correlation`, `correlationlog`); `@tradecanvas/chart`'s `Chart` registers them with its symbol store.
|
|
40
40
|
|
|
@@ -42,19 +42,20 @@ Indicator parameters are read through `getNumberParam` / `getIntParam` helpers,
|
|
|
42
42
|
|
|
43
43
|
Extensible via `IndicatorBase` for custom indicators.
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### Indicator math in a worker
|
|
46
46
|
|
|
47
|
-
`IndicatorWorkerHost` wraps a `Worker` and exposes a Promise-based `calculate()
|
|
47
|
+
`IndicatorWorkerHost` wraps a `Worker` you create and exposes a Promise-based `calculate()`, with a per-request timeout and a `ping()` health check:
|
|
48
48
|
|
|
49
49
|
```ts
|
|
50
50
|
import { IndicatorWorkerHost } from '@tradecanvas/core'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
// Your own worker, built from src/indicators/worker/indicator.worker.ts in the repository
|
|
53
|
+
const worker = new Worker(new URL('./indicator.worker.ts', import.meta.url), { type: 'module' })
|
|
53
54
|
const host = new IndicatorWorkerHost(worker)
|
|
54
55
|
const output = await host.calculate('rsi', config, bars)
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
Pass `null` instead of a worker
|
|
58
|
+
Pass `null` instead of a worker to calculate synchronously (SSR, tests). The package does not ship a built worker script, and the chart computes its own indicators on the main thread; it does not route them through this host yet.
|
|
58
59
|
|
|
59
60
|
### Drawing Tools (24)
|
|
60
61
|
|