openalgo-charts 1.0.29 → 1.1.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 +11 -11
- package/dist/index.d.ts +4 -4
- package/dist/indicators/index.d.ts +733 -1
- package/dist/openalgo-charts.indicators.mjs +1 -1
- package/dist/openalgo-charts.indicators.mjs.map +1 -1
- package/dist/openalgo-charts.mjs +1 -1
- package/dist/openalgo-charts.mjs.map +1 -1
- package/dist/openalgo-charts.standalone.js +1 -1
- package/dist/openalgo-charts.standalone.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@ Professional interactive charts, indicators, drawing tools, order flow, and on-c
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
10
10
|
[](./LICENSE)
|
|
11
|
-
[](#size-budget)
|
|
12
|
+
[](#develop)
|
|
13
13
|
[](#principles)
|
|
14
14
|
|
|
15
15
|
[**Documentation**](https://marketcalls.github.io/openalgo-charts/) · [**Live examples**](https://marketcalls.github.io/openalgo-charts/examples) · [**Getting started**](./docs/getting-started.md) · [**Architecture**](./ARCHITECTURE.md)
|
|
@@ -61,13 +61,13 @@ Import only what you use. Each tier is a separate bundle that registers into the
|
|
|
61
61
|
| Import | Contents | Brotli |
|
|
62
62
|
|---|---|---|
|
|
63
63
|
| `openalgo-charts` | Engine, 13 chart types, panes & scales, primitives, registries, chart state, trading overlay, OpenAlgo feeds | 37.0 KB |
|
|
64
|
-
| `openalgo-charts/indicators` |
|
|
64
|
+
| `openalgo-charts/indicators` | 86 built-in indicators + the Tier-2 (external-data) contract | 20.1 KB |
|
|
65
65
|
| `openalgo-charts/draw` | 43 drawing tools + a headless drawing controller | 11.7 KB |
|
|
66
66
|
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi | 2.7 KB |
|
|
67
67
|
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO), Footprint, order flow | 10.1 KB |
|
|
68
68
|
| `openalgo-charts/trade` | Order / position / bracket tools + DOM ladder | 6.6 KB |
|
|
69
69
|
|
|
70
|
-
Everything together is **
|
|
70
|
+
Everything together is **88.2 KB Brotli**. Figures are the measured `size-limit` output; the trade tier is a delta over the base, which is why base + trade (43.6 KB) is less than their listed sum.
|
|
71
71
|
|
|
72
72
|
## What's built
|
|
73
73
|
|
|
@@ -84,7 +84,7 @@ const macd = chart.addIndicator('macd', { fastPeriod: 8 }); // gets its own pa
|
|
|
84
84
|
macd.setSettings({ 'macd:width': 2, 'macd:lineStyle': 'dashed' });
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
86 built-ins across Trend, Momentum, Volatility and Volume, from the everyday (SMA, EMA, WMA, VWAP, Bollinger Bands, RSI, MACD, Stochastic, ADX/DMI, ATR) through Supertrend, HalfTrend, Ichimoku, Keltner, Donchian and Chandelier Exit to Connors RSI, Fisher Transform, Woodies CCI, Klinger, Vortex, Chop Zone and Williams Fractals. Twenty-two of them draw shaded bands, and three emit named buy/sell markers. The full catalogue with ids and defaults is in the docs.
|
|
88
88
|
|
|
89
89
|
The chart owns the whole lifecycle — series, pane placement, reference levels, fixed ranges (RSI 0..100), recompute on data change, teardown. Every plot gets colour, opacity, thickness, and line style for free, generated from the descriptor. Write your own with `registerIndicator`, or use the **Tier-2 contract** for indicators whose data isn't derived from OHLCV (open interest, CVD, any external feed).
|
|
90
90
|
|
|
@@ -122,13 +122,13 @@ Enforced in CI by [`size-limit`](./.size-limit.json) — nothing is excluded, be
|
|
|
122
122
|
|
|
123
123
|
| Bundle | Limit | Actual |
|
|
124
124
|
|---|---|---|
|
|
125
|
-
| Base engine | 40 KB | 37.
|
|
126
|
-
| Base + trade | 47 KB | 43.
|
|
127
|
-
| Indicators tier |
|
|
125
|
+
| Base engine | 40 KB | 37.04 KB |
|
|
126
|
+
| Base + trade | 47 KB | 43.62 KB |
|
|
127
|
+
| Indicators tier | 21 KB | 20.09 KB |
|
|
128
128
|
| Draw tier | 14 KB | 11.73 KB |
|
|
129
129
|
| Transform tier | 5 KB | 2.66 KB |
|
|
130
130
|
| Profile tier | 11 KB | 10.12 KB |
|
|
131
|
-
| **Everything** | **90 KB** | **
|
|
131
|
+
| **Everything** | **90 KB** | **88.21 KB** |
|
|
132
132
|
|
|
133
133
|
## Documentation
|
|
134
134
|
|
|
@@ -168,7 +168,7 @@ cd examples/yfinance && pip install -r requirements.txt && python server.py
|
|
|
168
168
|
```bash
|
|
169
169
|
npm install # install dev toolchain
|
|
170
170
|
npm run typecheck # strict TypeScript check
|
|
171
|
-
npm test # unit tests (vitest) -
|
|
171
|
+
npm test # unit tests (vitest) - 1001 across 61 files
|
|
172
172
|
npm run build # Rollup -> dist/ (minified ESM per tier + types)
|
|
173
173
|
npm run size # size-limit (Brotli) against the budget
|
|
174
174
|
npm run e2e # Playwright Chromium smoke tests
|
|
@@ -185,7 +185,7 @@ npm run verify # typecheck + test + build + size
|
|
|
185
185
|
|
|
186
186
|
## Status & limitations
|
|
187
187
|
|
|
188
|
-
Version **1.0
|
|
188
|
+
Version **1.1.0**. All engine build phases are implemented with 1001 unit tests across 61 files.
|
|
189
189
|
|
|
190
190
|
Known gaps, stated plainly:
|
|
191
191
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Library version string. Matches package.json (published npm release). */
|
|
2
|
-
declare const VERSION = "1.0
|
|
2
|
+
declare const VERSION = "1.1.0";
|
|
3
3
|
/** Returns the current library version. */
|
|
4
4
|
declare function version(): string;
|
|
5
5
|
|
|
@@ -2745,7 +2745,7 @@ declare function ema(values: readonly number[], period: number): number[];
|
|
|
2745
2745
|
declare function emaSeries(bars: readonly Bar[], period: number): Bar[];
|
|
2746
2746
|
|
|
2747
2747
|
/**
|
|
2748
|
-
* Relative Strength Index — Wilder's RSI, matching `openalgo.
|
|
2748
|
+
* Relative Strength Index — Wilder's RSI, matching `openalgo.rsi(close, 14)`.
|
|
2749
2749
|
*
|
|
2750
2750
|
* Uses Wilder smoothing (RMA): the first average gain/loss is the simple mean of
|
|
2751
2751
|
* the first `period` deltas, then each subsequent average carries
|
|
@@ -2762,7 +2762,7 @@ declare function rsi(values: readonly number[], period?: number): number[];
|
|
|
2762
2762
|
declare function rsiSeries(bars: readonly Bar[], period?: number): Bar[];
|
|
2763
2763
|
|
|
2764
2764
|
/**
|
|
2765
|
-
* Average True Range — Wilder's ATR, matching `openalgo.
|
|
2765
|
+
* Average True Range — Wilder's ATR, matching `openalgo.atr(high, low, close, 14)`.
|
|
2766
2766
|
* Shared by the Supertrend indicator. True range of the first bar is high-low.
|
|
2767
2767
|
*/
|
|
2768
2768
|
/** True range series. tr[0] = high[0]-low[0]; thereafter the classic 3-way max. */
|
|
@@ -2771,7 +2771,7 @@ declare function trueRange(high: readonly number[], low: readonly number[], clos
|
|
|
2771
2771
|
declare function atr(high: readonly number[], low: readonly number[], close: readonly number[], period?: number): number[];
|
|
2772
2772
|
|
|
2773
2773
|
/**
|
|
2774
|
-
* Supertrend — matching `openalgo.
|
|
2774
|
+
* Supertrend — matching `openalgo.supertrend(high, low, close, period=10, multiplier=3.0)`,
|
|
2775
2775
|
* which returns (supertrend value, direction). Direction follows the OpenAlgo
|
|
2776
2776
|
* convention: -1 = uptrend (line is support below price), +1 = downtrend (line
|
|
2777
2777
|
* is resistance above price). ATR uses Wilder smoothing (see ./atr).
|