openalgo-charts 2.7.2 → 2.7.4
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 +29 -29
- package/dist/draw/index.d.ts +109 -8
- package/dist/index.d.ts +122 -10
- package/dist/indicators/index.d.ts +10 -2
- package/dist/openalgo-charts.draw.mjs +1 -1
- package/dist/openalgo-charts.draw.mjs.map +1 -1
- package/dist/openalgo-charts.draw.standalone.js +1 -1
- package/dist/openalgo-charts.indicators.mjs +1 -1
- package/dist/openalgo-charts.indicators.mjs.map +1 -1
- package/dist/openalgo-charts.indicators.standalone.js +1 -1
- package/dist/openalgo-charts.mjs +1 -1
- package/dist/openalgo-charts.mjs.map +1 -1
- package/dist/openalgo-charts.profile.mjs +1 -1
- package/dist/openalgo-charts.profile.mjs.map +1 -1
- package/dist/openalgo-charts.profile.standalone.js +1 -1
- package/dist/openalgo-charts.standalone.js +1 -1
- package/dist/openalgo-charts.standalone.js.map +1 -1
- package/dist/openalgo-charts.trade.mjs +1 -1
- package/dist/openalgo-charts.trade.mjs.map +1 -1
- package/dist/openalgo-charts.trade.standalone.js +1 -1
- package/dist/openalgo-charts.transform.mjs +1 -1
- package/dist/openalgo-charts.transform.mjs.map +1 -1
- package/dist/openalgo-charts.transform.standalone.js +1 -1
- package/dist/{openalgo-charts.widget.chart-data-export-dialog-CX6h5-cp.mjs → openalgo-charts.widget.chart-data-export-dialog-we0VDywF.mjs} +2 -2
- package/dist/{openalgo-charts.widget.chart-data-export-dialog-CX6h5-cp.mjs.map → openalgo-charts.widget.chart-data-export-dialog-we0VDywF.mjs.map} +1 -1
- package/dist/{openalgo-charts.widget.chart-type-settings-Bu7g-LFB.mjs → openalgo-charts.widget.chart-type-settings-DYCCD4Ax.mjs} +2 -2
- package/dist/{openalgo-charts.widget.chart-type-settings-Bu7g-LFB.mjs.map → openalgo-charts.widget.chart-type-settings-DYCCD4Ax.mjs.map} +1 -1
- package/dist/openalgo-charts.widget.grid-bar-CWfujvFQ.mjs +2 -0
- package/dist/openalgo-charts.widget.grid-bar-CWfujvFQ.mjs.map +1 -0
- package/dist/{openalgo-charts.widget.grid-menus-CPZWEiD3.mjs → openalgo-charts.widget.grid-menus-Ujc8dpxO.mjs} +2 -2
- package/dist/{openalgo-charts.widget.grid-menus-CPZWEiD3.mjs.map → openalgo-charts.widget.grid-menus-Ujc8dpxO.mjs.map} +1 -1
- package/dist/{openalgo-charts.widget.layouts-templates-menu-CFf0bR9J.mjs → openalgo-charts.widget.layouts-templates-menu-DPPa9Cn1.mjs} +2 -2
- package/dist/{openalgo-charts.widget.layouts-templates-menu-CFf0bR9J.mjs.map → openalgo-charts.widget.layouts-templates-menu-DPPa9Cn1.mjs.map} +1 -1
- package/dist/openalgo-charts.widget.mjs +1 -1
- package/dist/openalgo-charts.widget.mjs.map +1 -1
- package/dist/openalgo-charts.widget.standalone.js +1 -1
- package/dist/openalgo-charts.widget.storage-idb-JzCQh1Se.mjs +2 -0
- package/dist/openalgo-charts.widget.storage-idb-JzCQh1Se.mjs.map +1 -0
- package/dist/openalgo-charts.workspace.mjs +1 -1
- package/dist/openalgo-charts.workspace.mjs.map +1 -1
- package/dist/openalgo-charts.workspace.standalone.js +1 -1
- package/dist/profile/index.d.ts +63 -59
- package/dist/trade/index.d.ts +69 -9
- package/dist/transform/index.d.ts +20 -4
- package/dist/widget/index.d.ts +156 -10
- package/dist/workspace/index.d.ts +22 -5
- package/package.json +1 -1
- package/dist/openalgo-charts.widget.grid-bar-Cm_CyA2j.mjs +0 -2
- package/dist/openalgo-charts.widget.grid-bar-Cm_CyA2j.mjs.map +0 -1
- package/dist/openalgo-charts.widget.storage-idb-WH_o01Wj.mjs +0 -2
- package/dist/openalgo-charts.widget.storage-idb-WH_o01Wj.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ with no runtime dependencies.
|
|
|
12
12
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
13
13
|
[](./LICENSE)
|
|
14
14
|
[](https://www.npmjs.com/package/openalgo-charts)
|
|
15
|
-
[](#develop)
|
|
16
16
|
[](#principles)
|
|
17
17
|
|
|
18
18
|
[**Documentation**](https://marketcalls.github.io/openalgo-charts/) · [**Live examples**](https://marketcalls.github.io/openalgo-charts/examples) · [**Getting started**](./docs/getting-started.md) · [**Migrating to 2.0**](./docs/migrating-to-2.md) · [**Architecture**](./ARCHITECTURE.md)
|
|
@@ -25,7 +25,7 @@ with no runtime dependencies.
|
|
|
25
25
|
npm install openalgo-charts
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Current version: **2.7.
|
|
28
|
+
Current version: **2.7.4**. Pivot points in six level sets (Traditional, Fibonacci, Woodie, Classic, DeMark and Camarilla), and in the widget: rows a host adds to the right-click menu, an opt-in full screen button, a study's placement from its own menu, a choice of regular or extended hours where the feed serves both, and thirty timezones. 2.7.3 was a correctness release: saved drawings and layouts survive reloads, a second tab and a reopened layout; alerts fire across history refreshes; live candles follow the history they continue; the price axis labels only tradable prices; and orders and positions keep the exchange and product that identify them. 2.7.2 numbered Elliott wave counts from the point after their origin, as a count is read, with each label centred on its point, and 2.7.1 added the five Elliott wave counts, each drawn from its origin and labelled by degree, for 90 drawing tools.
|
|
29
29
|
|
|
30
30
|
2.6.4 was an order flow release: a footprint finds the imbalances beside a row that never traded, prints volume shaded by delta, alerts once when price comes back to a zone, extends only the zone kinds you pick, and takes a colour for each of its parts or one of six named themes; the website gains an Order flow page of live footprint and market profile examples. 2.6.3 was a finish release: finer glyphs at one line weight, a drawing rail that folds away, a smoother wheel and trackpad zoom, a widget whose drag keeps the price scale fitting, and a log scale that fills the pane. 2.6.2 was a fix for the bottom bar's ranges and Go to, which reported missing history across a weekend or another gap no session trades in. 2.6.1 was order flow analytics for the footprint (trade classification, a trade size filter, imbalance and delta views, zones, unfinished auctions, delta flips and session statistics), rows aligned on the even boundary, Renko and point and figure sizing from price or the ATR, and settings dialogs for both chart types in the widget and the reference host. 2.6.0 was analysis depth and a stricter API: the chart applies Heikin Ashi, Renko, range bars, line break, point and figure and Kagi to the bars you feed, live, with each study on the elements or the underlying bars; seven new built-ins and a timeframe input on 29 of them; symbol search through the OpenAlgo feed; rich event details with host actions; a typed event map for `chart.on`; a classic-script build of every tier and `require()` of the ESM files; and declarations that hold for a host compiling with both strict flags. 2.5.10 was the persistence, saved layouts and chart grid release.
|
|
31
31
|
See the [changelog](./CHANGELOG.md) for release notes.
|
|
@@ -68,7 +68,7 @@ Firefox and WebKit. In Vue, hold the chart in a `shallowRef`, never in `ref()` o
|
|
|
68
68
|
|
|
69
69
|
## Architecture
|
|
70
70
|
|
|
71
|
-
<a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts
|
|
71
|
+
<a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts architecture: host responsibilities, the base data-to-rendering pipeline with alerts and shared replay, and eight optional tiers including workspace storage, trading tools and the widget" width="920" /></a>
|
|
72
72
|
|
|
73
73
|
How data reaches the chart, what your app owns, and which features you can import.
|
|
74
74
|
[Open the full-size diagram](docs/architecture-diagram.svg).
|
|
@@ -119,7 +119,7 @@ You can also load the library from a CDN in a plain HTML page:
|
|
|
119
119
|
```html
|
|
120
120
|
<div id="chart" style="width:100vw;height:100vh"></div>
|
|
121
121
|
<script type="module">
|
|
122
|
-
import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.7.
|
|
122
|
+
import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.7.4/dist/openalgo-charts.mjs';
|
|
123
123
|
const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
|
|
124
124
|
chart.addSeries('candlestick').setData(generateBars(1700000000, 200, 3600));
|
|
125
125
|
chart.fitContent();
|
|
@@ -127,7 +127,7 @@ You can also load the library from a CDN in a plain HTML page:
|
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Each optional tier has its own file. For example,
|
|
130
|
-
`openalgo-charts.indicators.mjs` registers all
|
|
130
|
+
`openalgo-charts.indicators.mjs` registers all 113 built-in indicators. Pin the
|
|
131
131
|
version in production. The base chart needs no stylesheet; the widget adds its
|
|
132
132
|
own styles. See
|
|
133
133
|
[Use from a CDN](https://marketcalls.github.io/openalgo-charts/docs/cdn).
|
|
@@ -181,17 +181,17 @@ Unused optional tiers stay out of the base chart download.
|
|
|
181
181
|
|
|
182
182
|
| Import | Contents | Brotli |
|
|
183
183
|
|---|---|---|
|
|
184
|
-
| `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export |
|
|
185
|
-
| `openalgo-charts/indicators` |
|
|
186
|
-
| `openalgo-charts/draw` | 90 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons |
|
|
187
|
-
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 6.
|
|
188
|
-
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 20.
|
|
189
|
-
| `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder |
|
|
184
|
+
| `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export | 141.91 kB |
|
|
185
|
+
| `openalgo-charts/indicators` | 113 built-in indicators, calculation helpers and helpers for studies that use external data | 46.00 kB |
|
|
186
|
+
| `openalgo-charts/draw` | 90 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 61.86 kB |
|
|
187
|
+
| `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point & Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 6.55 kB |
|
|
188
|
+
| `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 20.96 kB |
|
|
189
|
+
| `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder | 17.29 kB |
|
|
190
190
|
| `openalgo-charts/webgl` | GPU drawing for supported series, with Canvas 2D fallback | 6.99 kB |
|
|
191
|
-
| `openalgo-charts/widget` | `createWidget`: toolbar, bottom bar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, a shortcuts editor, saved layouts, the chart grid (`createChartGrid`) and optional persistence in IndexedDB |
|
|
192
|
-
| `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named watchlists, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM | 11.
|
|
191
|
+
| `openalgo-charts/widget` | `createWidget`: toolbar, bottom bar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, a shortcuts editor, saved layouts, the chart grid (`createChartGrid`) and optional persistence in IndexedDB | 132.36 kB |
|
|
192
|
+
| `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named watchlists, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM | 11.89 kB |
|
|
193
193
|
|
|
194
|
-
Everything together is **
|
|
194
|
+
Everything together is **445.81 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 382.13 kB. The widget's eight first-use parts (the shortcuts editor, the Layouts menu, the templates list, the chart data dialog, the chart type settings dialog, the grid bar and its menus, and the IndexedDB store) add 21.04 kB in files of their own, fetched only when a widget first uses one. The nine classic-script files together are 459.54 kB. Figures are measured from the 2.7.3 release build. The trade tier is 17.29 kB on its own; base + trade costs 159.19 kB. Sizes use decimal kB.
|
|
195
195
|
|
|
196
196
|
## What's built
|
|
197
197
|
|
|
@@ -208,7 +208,7 @@ const macd = chart.addIndicator('macd', { fastPeriod: 8 }); // gets its own pa
|
|
|
208
208
|
macd.setSettings({ 'macd:width': 2, 'macd:lineStyle': 'dashed' });
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
113 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, Chandelier Exit and CPR with floor pivots to Connors RSI, Fisher Transform, Woodies CCI, Klinger, Vortex, WaveTrend Pro, Chop Zone and Williams Fractals, with a least-squares family (Least Squares Moving Average, Linear Regression Slope, Standard Error, Standard Error Bands) and a Smoothed Moving Average alongside them, joined in 1.8.3 by the T3 average, the Hull Suite (Hma / Ehma / Thma with a displaced band) and Consolidation and Breakout, which tracks inside-bar ranges and marks the bar that leaves one. Version 2.6.0 adds ZigZag, 52 Week High/Low, Zero Lag EMA, Variable Index Dynamic Average, Elder-Ray Index, Schaff Trend Cycle and Volatility Squeeze. Twenty-eight of them draw shaded bands, six emit named buy/sell markers, three recolour the price candles, and Seasonality draws a monthly return heatmap as a table over the chart. The full catalogue with ids and defaults is in the docs.
|
|
212
212
|
|
|
213
213
|
Since 2.4.0 a study can fold the chart's own bars up to a higher timeframe with `securitySeries` (as the bucket stood at each bar, or the last completed one, or with lookahead when reproducing a source that repaints), paint a plot displaced by a number of bars, colour a candle's wick and border apart from its body, pin a marker to the pane edge, put a tooltip on a drawn zone, compute an alert message from the bar that fired, and ask the host for another instrument's bars through `chart.setBarsProvider`. A calculation that throws once it is on the chart is reported on that study's data status rather than thrown into the render loop.
|
|
214
214
|
|
|
@@ -517,19 +517,19 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
|
|
|
517
517
|
|
|
518
518
|
| Bundle | Limit | Actual |
|
|
519
519
|
|---|---|---|
|
|
520
|
-
| Base engine |
|
|
521
|
-
| Base + trade |
|
|
522
|
-
| Indicators tier |
|
|
523
|
-
| Draw tier |
|
|
524
|
-
| Transform tier | 6.
|
|
525
|
-
| Profile tier | 20.
|
|
520
|
+
| Base engine | 141.91 kB | 141.91 kB |
|
|
521
|
+
| Base + trade | 159.20 kB | 159.19 kB |
|
|
522
|
+
| Indicators tier | 46.01 kB | 46.00 kB |
|
|
523
|
+
| Draw tier | 61.86 kB | 61.86 kB |
|
|
524
|
+
| Transform tier | 6.56 kB | 6.55 kB |
|
|
525
|
+
| Profile tier | 20.97 kB | 20.96 kB |
|
|
526
526
|
| WebGL2 tier | 6.99 kB | 6.99 kB |
|
|
527
|
-
| Widget tier |
|
|
528
|
-
| Widget first-use parts (eight files beside the widget tier) | 21.
|
|
529
|
-
| Widget terminal (base + draw + indicators + widget) |
|
|
530
|
-
| Workspace tier | 11.
|
|
531
|
-
| Script tags (the nine classic-script files) |
|
|
532
|
-
| **Everything** |
|
|
527
|
+
| Widget tier | 132.36 kB | 132.36 kB |
|
|
528
|
+
| Widget first-use parts (eight files beside the widget tier) | 21.05 kB | 21.04 kB |
|
|
529
|
+
| Widget terminal (base + draw + indicators + widget) | 382.13 kB | 382.13 kB |
|
|
530
|
+
| Workspace tier | 11.89 kB | 11.89 kB |
|
|
531
|
+
| Script tags (the nine classic-script files) | 459.55 kB | 459.54 kB |
|
|
532
|
+
| **Everything** | 445.81 kB | 445.81 kB |
|
|
533
533
|
|
|
534
534
|
## Documentation
|
|
535
535
|
|
|
@@ -580,7 +580,7 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
|
|
|
580
580
|
```bash
|
|
581
581
|
npm install # install dev toolchain
|
|
582
582
|
npm run typecheck # TypeScript: src with the stricter flags, then the tests
|
|
583
|
-
npm test # engine unit tests (Vitest):
|
|
583
|
+
npm test # engine unit tests (Vitest): 12535 across 563 files
|
|
584
584
|
npm run test:demo # reference-host tests: 740 across 69 files
|
|
585
585
|
npm run test:endurance # node endurance-harness tests: 7 cases
|
|
586
586
|
npm run build # Rollup -> dist/ (minified ESM per tier + types)
|
|
@@ -601,7 +601,7 @@ npm run verify # lint + types + cycles + unused exports + unit + endurance h
|
|
|
601
601
|
|
|
602
602
|
## Status & limitations
|
|
603
603
|
|
|
604
|
-
Version **2.7.
|
|
604
|
+
Version **2.7.4**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
|
|
605
605
|
|
|
606
606
|
Known gaps, stated plainly:
|
|
607
607
|
|
package/dist/draw/index.d.ts
CHANGED
|
@@ -1715,6 +1715,26 @@ declare function createDrawingLinkGroup(options?: DrawingLinkOptions): DrawingLi
|
|
|
1715
1715
|
* document actually changed, so a reload loses nothing and a stream of
|
|
1716
1716
|
* updates to transient drawings writes nothing. An instrument left with no
|
|
1717
1717
|
* drawings has its entry removed rather than an empty one kept.
|
|
1718
|
+
* - **A write keeps what another writer stored.** Two pages on one store and
|
|
1719
|
+
* one instrument each hold the document they last read. Before writing,
|
|
1720
|
+
* the stored document is read again: what this chart added, changed or
|
|
1721
|
+
* deleted since it last read or wrote it goes in as it has it, and every
|
|
1722
|
+
* other drawing stays as the store has it, so the later writer erases
|
|
1723
|
+
* neither the other's drawings nor its deletions. A store whose writes
|
|
1724
|
+
* land later does the same once more as each write lands
|
|
1725
|
+
* (`InstrumentDrawings.merge`), since two writes can be made before either
|
|
1726
|
+
* has landed.
|
|
1727
|
+
* - **A drawing stays on its pane.** Panes are slots, and a study removed or
|
|
1728
|
+
* moved while an instrument is off screen shifts them under its document.
|
|
1729
|
+
* Each document is written with the panes it was drawn on (`panes`: the
|
|
1730
|
+
* price pane as null, any other by its studies, each by id and kind), and
|
|
1731
|
+
* is put back on those panes wherever they stand now when it is read,
|
|
1732
|
+
* which a chart that reports its panes and studies allows. A pane whose
|
|
1733
|
+
* studies have all gone takes its drawings with it, unless a pane of the
|
|
1734
|
+
* same kinds of study stands where it was (the same template applied
|
|
1735
|
+
* again): another study put in its place is not given them. A layout
|
|
1736
|
+
* restored over drawings that carry their panes, as `document` returns
|
|
1737
|
+
* them, puts them on the panes their studies hold once it has landed.
|
|
1718
1738
|
* - **A store that fails loses nothing for the session.** A refused write is
|
|
1719
1739
|
* reported through `onError` and the document is held in memory, read back
|
|
1720
1740
|
* from there, and written again with the next change.
|
|
@@ -1762,6 +1782,20 @@ interface InstrumentDrawingsChart {
|
|
|
1762
1782
|
readonly isDestroyed?: boolean;
|
|
1763
1783
|
on(event: string, handler: (payload: unknown) => void): () => void;
|
|
1764
1784
|
getDataContext?(): Readonly<DrawingInstrument> | undefined;
|
|
1785
|
+
/**
|
|
1786
|
+
* Optional, the first two together: the panes, the studies on them and
|
|
1787
|
+
* the slot of the price pane. With them each document is saved with the
|
|
1788
|
+
* panes its drawings are on, and read back onto those panes where they
|
|
1789
|
+
* stand now; without them a drawing keeps its slot.
|
|
1790
|
+
*/
|
|
1791
|
+
panes?(): readonly unknown[];
|
|
1792
|
+
/** `indicatorId`, the kind of study, lets a pane rebuilt with new ids (a template applied again) keep its drawings. */
|
|
1793
|
+
indicators?(): readonly {
|
|
1794
|
+
readonly id: string;
|
|
1795
|
+
readonly paneIndex: number;
|
|
1796
|
+
readonly indicatorId?: string;
|
|
1797
|
+
}[];
|
|
1798
|
+
primaryPaneIndex?(): number;
|
|
1765
1799
|
}
|
|
1766
1800
|
/** A store operation that failed, as `InstrumentDrawingsOptions.onError` receives it. */
|
|
1767
1801
|
interface InstrumentDrawingsError {
|
|
@@ -1830,13 +1864,26 @@ declare function migrateUnscopedDrawings(store: DrawingDocumentStore, key: strin
|
|
|
1830
1864
|
* ```
|
|
1831
1865
|
*/
|
|
1832
1866
|
declare class InstrumentDrawings {
|
|
1867
|
+
private readonly _chart;
|
|
1833
1868
|
private readonly _draw;
|
|
1834
1869
|
private readonly _store;
|
|
1835
1870
|
private readonly _keyOf;
|
|
1836
1871
|
private readonly _onError;
|
|
1837
1872
|
private _key;
|
|
1838
|
-
/**
|
|
1873
|
+
/**
|
|
1874
|
+
* The current instrument's document as this chart last read or wrote it:
|
|
1875
|
+
* a write that changes nothing is skipped, and what another writer stored
|
|
1876
|
+
* since is told apart from this chart's own changes against it.
|
|
1877
|
+
*/
|
|
1839
1878
|
private _text;
|
|
1879
|
+
/**
|
|
1880
|
+
* The panes the drawings on the chart were read with, while the chart may
|
|
1881
|
+
* not have them yet: a document read as a widget starts, before its layout
|
|
1882
|
+
* lands. `text` is the document as read, `stamp` its panes as stored, and
|
|
1883
|
+
* `panes` those after every pane moved or removed since. Null once the
|
|
1884
|
+
* drawings are on the panes standing now.
|
|
1885
|
+
*/
|
|
1886
|
+
private _pending;
|
|
1840
1887
|
/** Documents whose write failed, by key: what the store should hold, kept for the session. */
|
|
1841
1888
|
private readonly _held;
|
|
1842
1889
|
private _swapping;
|
|
@@ -1855,17 +1902,30 @@ declare class InstrumentDrawings {
|
|
|
1855
1902
|
setInstrument(instrument: DrawingInstrument | null): void;
|
|
1856
1903
|
/**
|
|
1857
1904
|
* The saved document of an instrument: the drawings on the chart for the
|
|
1858
|
-
* current one, the stored document for any other,
|
|
1859
|
-
* none (or no key). A copy either way.
|
|
1905
|
+
* current one, the stored document for any other, on the panes standing
|
|
1906
|
+
* now, or null when it has none (or no key). A copy either way. The
|
|
1907
|
+
* current one's names the panes it is drawn on (`panes`), as it is stored,
|
|
1908
|
+
* so a layout restored with it puts each drawing on its study's pane.
|
|
1860
1909
|
*/
|
|
1861
1910
|
document(instrument: DrawingInstrument): DrawingsDocument | null;
|
|
1862
1911
|
/**
|
|
1863
|
-
* Replace one instrument's drawings
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
1912
|
+
* Replace one instrument's drawings, drawn on the panes standing now, or
|
|
1913
|
+
* on those it names (`panes`, as stored). On the current instrument that
|
|
1914
|
+
* is the controller's `fromJSON`, which clears its undo history; on any
|
|
1915
|
+
* other, the stored document, shown when the chart next moves there. For a
|
|
1916
|
+
* layout that brings the drawings of an instrument the chart is about to show.
|
|
1867
1917
|
*/
|
|
1868
1918
|
setDocument(instrument: DrawingInstrument, document: unknown): void;
|
|
1919
|
+
/**
|
|
1920
|
+
* The document to store when another writer may have stored one since
|
|
1921
|
+
* `base`, the stored document `ours` was made from: each drawing `ours`
|
|
1922
|
+
* added, changed or deleted since `base` as `ours` has it, every other as
|
|
1923
|
+
* `theirs` (what the store holds now) has it, on the panes `ours` names.
|
|
1924
|
+
* For a store whose writes land later than they are made, so that two
|
|
1925
|
+
* writes made before either landed keep both: the widget's own store
|
|
1926
|
+
* merges each write as it lands. Since 2.7.3.
|
|
1927
|
+
*/
|
|
1928
|
+
static merge(base: unknown, ours: unknown, theirs: unknown): DrawingsDocument;
|
|
1869
1929
|
/** Write the current instrument's document now, and any the store refused before. False while one is still refused. */
|
|
1870
1930
|
save(): boolean;
|
|
1871
1931
|
/** Stop following the chart. The documents stay where they are. */
|
|
@@ -1873,6 +1933,17 @@ declare class InstrumentDrawings {
|
|
|
1873
1933
|
private _keyFor;
|
|
1874
1934
|
/** The drawings the controller would save, as text. */
|
|
1875
1935
|
private _live;
|
|
1936
|
+
/**
|
|
1937
|
+
* The panes standing now: null for the price pane, its studies by id and
|
|
1938
|
+
* kind for any other. Null for a chart that does not report them.
|
|
1939
|
+
*/
|
|
1940
|
+
private _panes;
|
|
1941
|
+
/**
|
|
1942
|
+
* `document` as it is stored: with the panes it is drawn on, when they are
|
|
1943
|
+
* known and there is more than the price pane. A document stored without
|
|
1944
|
+
* them keeps its slots when read, which on one pane is all there is.
|
|
1945
|
+
*/
|
|
1946
|
+
private _stamped;
|
|
1876
1947
|
/** Take `key` as the current instrument, with the drawings `prefer` picks. */
|
|
1877
1948
|
private _start;
|
|
1878
1949
|
private _follow;
|
|
@@ -1880,10 +1951,40 @@ declare class InstrumentDrawings {
|
|
|
1880
1951
|
/** Put `document` on the controller without the change it announces being written back. */
|
|
1881
1952
|
private _load;
|
|
1882
1953
|
private _changed;
|
|
1954
|
+
/**
|
|
1955
|
+
* The whole document was replaced. When it is the one read (a layout
|
|
1956
|
+
* restored over it), it is still on the panes it was read with; anything
|
|
1957
|
+
* else is drawn on the panes standing now.
|
|
1958
|
+
*/
|
|
1959
|
+
private _restored;
|
|
1960
|
+
/**
|
|
1961
|
+
* A layout restored with drawings that name their panes (`document`'s, as
|
|
1962
|
+
* the widget restores a state over the drawings on the chart): they are
|
|
1963
|
+
* on those panes, and go onto the panes their studies hold once the layout
|
|
1964
|
+
* has landed (`_settle`), wherever it puts them.
|
|
1965
|
+
*/
|
|
1966
|
+
private _restoredOnPanes;
|
|
1967
|
+
/** A layout has landed: drawings read before it go onto its panes. */
|
|
1968
|
+
private _settle;
|
|
1883
1969
|
/** Write the current document when it changed, or always when `force`. */
|
|
1884
1970
|
private _saveCurrent;
|
|
1971
|
+
/**
|
|
1972
|
+
* What the current instrument's entry is to hold: the drawings on the
|
|
1973
|
+
* chart, with whatever another writer stored since this chart last read or
|
|
1974
|
+
* wrote it (see the module notes), and the panes they are drawn on. A store
|
|
1975
|
+
* that cannot say what it holds, or that refused this chart's last write
|
|
1976
|
+
* and so does not hold what it was read against, is written as this chart
|
|
1977
|
+
* has it.
|
|
1978
|
+
*/
|
|
1979
|
+
private _outgoing;
|
|
1980
|
+
/** Store `document` under `key`; true when it landed. */
|
|
1885
1981
|
private _write;
|
|
1886
|
-
/**
|
|
1982
|
+
/** What the store holds for `key`, a held write first, or null. */
|
|
1983
|
+
private _raw;
|
|
1984
|
+
/**
|
|
1985
|
+
* The stored document for `key` (or the stored `value` given), migrated to
|
|
1986
|
+
* the current shape and put on the panes `onto` when given, or null.
|
|
1987
|
+
*/
|
|
1887
1988
|
private _read;
|
|
1888
1989
|
private _report;
|
|
1889
1990
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Library version string. Matches package.json (including locally prepared releases). */
|
|
2
|
-
declare const VERSION = "2.7.
|
|
2
|
+
declare const VERSION = "2.7.4";
|
|
3
3
|
/** Returns the current library version. */
|
|
4
4
|
declare function version(): string;
|
|
5
5
|
|
|
@@ -317,6 +317,10 @@ declare class PriceScale {
|
|
|
317
317
|
* Manually scale the visible range around its centre. `factor` > 1 widens the
|
|
318
318
|
* range (compress / zoom out), < 1 narrows it (expand / zoom in). Switches the
|
|
319
319
|
* scale to manual mode so autoscale stops overriding it.
|
|
320
|
+
*
|
|
321
|
+
* Scaled in the space the axis draws in, as `scaleAtY` is. In price units,
|
|
322
|
+
* widening a log axis over 100 to 1000 by a fifth dropped its floor under 1,
|
|
323
|
+
* two empty decades beneath the data, and a little more took it past zero.
|
|
320
324
|
*/
|
|
321
325
|
scaleAroundCenter(factor: number): void;
|
|
322
326
|
/** Scale around a screen coordinate, retaining its price in every scale mode. */
|
|
@@ -378,12 +382,18 @@ declare class PriceScale {
|
|
|
378
382
|
* they care about. `minPrecision` is the floor for that case, and it is the
|
|
379
383
|
* same two decimals the percent branch above already settles on for the same
|
|
380
384
|
* reason.
|
|
385
|
+
*
|
|
386
|
+
* A log axis gives the bottom of the pane the most pixels per price, so the
|
|
387
|
+
* span is read there: a hundredth of the pane at its foot. Read off the
|
|
388
|
+
* linear span, a log chart from 2 to 3000 printed a crosshair at 2.35 as "2".
|
|
381
389
|
*/
|
|
382
390
|
precision(): number;
|
|
383
391
|
/**
|
|
384
|
-
* Tick prices for the axis ladder, at most `maxTicks` of them. Linear
|
|
385
|
-
*
|
|
386
|
-
*
|
|
392
|
+
* Tick prices for the axis ladder, at most `maxTicks` of them. Linear gets
|
|
393
|
+
* the nice ladder over the price range, exactly what the axis renderer used
|
|
394
|
+
* to build for itself, and log a ladder whose rungs keep their spacing down
|
|
395
|
+
* every decade (`logTicks`). Both keep to `minMove` when one is declared, so
|
|
396
|
+
* no rung falls between two prices the instrument trades at.
|
|
387
397
|
*
|
|
388
398
|
* The rebasing modes need it built in *label* space: a nice price is an ugly
|
|
389
399
|
* percentage, and a ladder of "+3.47%, +6.94%" is not a ladder. So the nice
|
|
@@ -2487,6 +2497,8 @@ interface FillPoint {
|
|
|
2487
2497
|
}
|
|
2488
2498
|
declare class IndicatorFill implements IPrimitive {
|
|
2489
2499
|
private _points;
|
|
2500
|
+
/** The band's lowest and highest value, for a gradient that names no prices; measured once per set of points. */
|
|
2501
|
+
private _extent;
|
|
2490
2502
|
private _opts;
|
|
2491
2503
|
private _host;
|
|
2492
2504
|
private _visible;
|
|
@@ -2497,6 +2509,7 @@ declare class IndicatorFill implements IPrimitive {
|
|
|
2497
2509
|
zOrder(): ZOrder;
|
|
2498
2510
|
/** The plots it spans already drive the scale; the fill must not widen it. */
|
|
2499
2511
|
autoscaleInfo(): null;
|
|
2512
|
+
/** Points in index order, one per bar, as a study's plots are. */
|
|
2500
2513
|
setPoints(points: readonly FillPoint[]): void;
|
|
2501
2514
|
setOptions(patch: Partial<IndicatorFillOptions>): void;
|
|
2502
2515
|
setVisible(on: boolean): void;
|
|
@@ -8737,6 +8750,22 @@ declare class ComparisonController {
|
|
|
8737
8750
|
destroy(): void;
|
|
8738
8751
|
private _dispose;
|
|
8739
8752
|
private _needsAlignment;
|
|
8753
|
+
/**
|
|
8754
|
+
* Keep every comparison on the primary's bars. A live bar appended at the
|
|
8755
|
+
* right edge is the change a session brings, and aligning that bar alone is
|
|
8756
|
+
* what spares a long history a full alignment and rewrite per bar. Anything
|
|
8757
|
+
* else (history paged in or replaced, a replay step) aligns in full.
|
|
8758
|
+
*/
|
|
8759
|
+
private _follow;
|
|
8760
|
+
/** One primary bar appended at `time`: its item, as `alignToPrimary` would have made it. Counts 1 for a print there. */
|
|
8761
|
+
private _append;
|
|
8762
|
+
/**
|
|
8763
|
+
* The instrument's prints later than `after`, read from where they can
|
|
8764
|
+
* start: past the last of the prints in time order at the front of its array
|
|
8765
|
+
* that is not later. A history in time order, the usual kind, then costs an
|
|
8766
|
+
* append its new prints rather than a read of every one.
|
|
8767
|
+
*/
|
|
8768
|
+
private _later;
|
|
8740
8769
|
private _rememberAlignment;
|
|
8741
8770
|
/**
|
|
8742
8771
|
* Preserve the first comparison's legacy placement when the scale is free.
|
|
@@ -8773,6 +8802,14 @@ declare class ComparisonController {
|
|
|
8773
8802
|
* independently scaled overlay instead of freezing on a stale range.
|
|
8774
8803
|
*/
|
|
8775
8804
|
private _mirror;
|
|
8805
|
+
/**
|
|
8806
|
+
* Widen the primary's range to hold each shown comparison's relative moves
|
|
8807
|
+
* over `bars`, the primary's bars in view. The primary autoscales on its own
|
|
8808
|
+
* series alone, and every overlay is that band times its baseline ratio, so
|
|
8809
|
+
* a comparison that moved further than the primary was drawn off the pane
|
|
8810
|
+
* whichever baseline it was measured from.
|
|
8811
|
+
*/
|
|
8812
|
+
private _fit;
|
|
8776
8813
|
private _primaryBars;
|
|
8777
8814
|
private _record;
|
|
8778
8815
|
private _visible;
|
|
@@ -9264,8 +9301,13 @@ declare function snapToDevicePixel(mediaCoord: number, dpr: number): number;
|
|
|
9264
9301
|
* Generate up to ~`maxTicks` nicely-rounded tick values spanning [min, max].
|
|
9265
9302
|
* Returns ascending values aligned to the chosen step (may sit slightly inside
|
|
9266
9303
|
* the range). Returns a single midpoint when the range is degenerate.
|
|
9304
|
+
*
|
|
9305
|
+
* `tick` is the instrument's price increment. Given one, the step is a whole
|
|
9306
|
+
* number of ticks and never finer than one, so a tight range thins its rungs
|
|
9307
|
+
* (to none, on a range narrower than a tick) rather than print prices the
|
|
9308
|
+
* instrument cannot trade at. 0 leaves the step to the span alone.
|
|
9267
9309
|
*/
|
|
9268
|
-
declare function niceTicks(min: number, max: number, maxTicks?: number): number[];
|
|
9310
|
+
declare function niceTicks(min: number, max: number, maxTicks?: number, tick?: number): number[];
|
|
9269
9311
|
/** Decimal places implied by a price step / tick size (for label formatting). */
|
|
9270
9312
|
declare function precisionForStep(step: number): number;
|
|
9271
9313
|
|
|
@@ -9940,10 +9982,11 @@ declare class LinkCrosshair implements IPrimitive {
|
|
|
9940
9982
|
|
|
9941
9983
|
/**
|
|
9942
9984
|
* Live candle aggregation (ARCHITECTURE.md §10.2). The WS feed does not deliver
|
|
9943
|
-
* interval candles: LTP mode gives a tick price (+ last-traded-qty
|
|
9944
|
-
* gives a *cumulative day* volume. This builder
|
|
9945
|
-
* with explicit volume, session-reset, and
|
|
9946
|
-
* deterministic (no Date/rAF) so it is fully
|
|
9985
|
+
* interval candles: LTP mode gives a tick price (+ last-traded-qty where the
|
|
9986
|
+
* broker sends one), Quote mode gives a *cumulative day* volume. This builder
|
|
9987
|
+
* buckets ticks into interval OHLC with explicit volume, session-reset, and
|
|
9988
|
+
* late-tick policies. Pure and deterministic (no Date/rAF) so it is fully
|
|
9989
|
+
* unit-testable.
|
|
9947
9990
|
*/
|
|
9948
9991
|
|
|
9949
9992
|
type VolumeMode = 'ltq-sum' | 'day-delta';
|
|
@@ -10031,6 +10074,14 @@ declare class CandleBuilder {
|
|
|
10031
10074
|
*/
|
|
10032
10075
|
onTick(tick: Tick): CandleUpdate | null;
|
|
10033
10076
|
private _foldInto;
|
|
10077
|
+
/**
|
|
10078
|
+
* A tick's own quantity counts in 'ltq-sum'; otherwise its cumulative day
|
|
10079
|
+
* total gives the bar's volume. The total is tracked whenever a tick carries
|
|
10080
|
+
* one, so a stream that drops the quantity on some frames falls back to it
|
|
10081
|
+
* without counting a trade twice. A tick with neither adds nothing, as it
|
|
10082
|
+
* always has: a host on such a stream fills the volume from history, and a
|
|
10083
|
+
* host that wants it reported unknown says so itself (OpenAlgoLiveDataFeed).
|
|
10084
|
+
*/
|
|
10034
10085
|
private _volumeForNewBar;
|
|
10035
10086
|
private _volumeForSameBar;
|
|
10036
10087
|
}
|
|
@@ -10927,6 +10978,14 @@ declare class DataLoadingController {
|
|
|
10927
10978
|
private _seconds;
|
|
10928
10979
|
/** Bucket whose open is only the first tick a builder saw, until history covers it. */
|
|
10929
10980
|
private _provisionalTime;
|
|
10981
|
+
/** Bucket the stream last delivered, whose close is newer than a history snapshot of it. */
|
|
10982
|
+
private _liveTime;
|
|
10983
|
+
/**
|
|
10984
|
+
* The last refresh failed, so what the stream delivered since is newer than
|
|
10985
|
+
* any history this controller holds. Through 2.7.2 those ticks waited in the
|
|
10986
|
+
* buffer and a retry kept them; the buffer is shown now, and this keeps the retry's answer.
|
|
10987
|
+
*/
|
|
10988
|
+
private _ahead;
|
|
10930
10989
|
private _repairTimer;
|
|
10931
10990
|
private _repairRetries;
|
|
10932
10991
|
private _pendingRepair;
|
|
@@ -10937,8 +10996,25 @@ declare class DataLoadingController {
|
|
|
10937
10996
|
subscribe(listener: (snapshot: DataLoadingSnapshot) => void): UnsubscribeFn;
|
|
10938
10997
|
load(req: BarsRequest): Promise<readonly Bar[]>;
|
|
10939
10998
|
private _load;
|
|
10999
|
+
/**
|
|
11000
|
+
* Refresh the window from history. A refresh asked for here is
|
|
11001
|
+
* authoritative for the forming bar's close too: a host asks after its
|
|
11002
|
+
* stream reconnected or its page came back, when the stream's last close is
|
|
11003
|
+
* the stale one. The controller's own poll and bar-close repair run while
|
|
11004
|
+
* the stream is live, so they keep the close the stream delivered, and so
|
|
11005
|
+
* does a retry after a failed refresh.
|
|
11006
|
+
*/
|
|
10940
11007
|
refresh(): Promise<readonly Bar[]>;
|
|
10941
11008
|
private _refresh;
|
|
11009
|
+
/**
|
|
11010
|
+
* Show what the stream delivered while a refresh held the display, one bar
|
|
11011
|
+
* at a time and in order, before the refresh's answer replaces it. A reader
|
|
11012
|
+
* of the display (an alert, a study) then meets each as the live update it
|
|
11013
|
+
* was. Folded into the replacement it reads as history: an alert armed
|
|
11014
|
+
* since the last update seeds on it, and a touch that came back inside the
|
|
11015
|
+
* bar is gone. Returns false when a listener moved the controller on.
|
|
11016
|
+
*/
|
|
11017
|
+
private _showBuffered;
|
|
10942
11018
|
/** The span a refresh asks history for: the request's own width ending now, or a tail window. */
|
|
10943
11019
|
private _refreshWindow;
|
|
10944
11020
|
/**
|
|
@@ -11398,6 +11474,13 @@ type OrderRole = 'entry' | 'sl' | 'tp';
|
|
|
11398
11474
|
interface Order {
|
|
11399
11475
|
id: string;
|
|
11400
11476
|
symbol: string;
|
|
11477
|
+
/**
|
|
11478
|
+
* The venue, when the provider says. Symbol and exchange together name a
|
|
11479
|
+
* contract: one symbol on two exchanges is two instruments.
|
|
11480
|
+
*/
|
|
11481
|
+
exchange?: string | undefined;
|
|
11482
|
+
/** The product (`CNC`, `MIS`, `NRML` on OpenAlgo), when the provider says. */
|
|
11483
|
+
product?: string | undefined;
|
|
11401
11484
|
side: OrderSide;
|
|
11402
11485
|
type: OrderType;
|
|
11403
11486
|
qty: number;
|
|
@@ -11411,6 +11494,9 @@ interface Order {
|
|
|
11411
11494
|
}
|
|
11412
11495
|
interface Position {
|
|
11413
11496
|
symbol: string;
|
|
11497
|
+
/** As on `Order`. A book holds one row per symbol, exchange and product, and each is its own position. */
|
|
11498
|
+
exchange?: string | undefined;
|
|
11499
|
+
product?: string | undefined;
|
|
11414
11500
|
/** Net signed quantity: positive = long, negative = short, 0 = flat. */
|
|
11415
11501
|
netQty: number;
|
|
11416
11502
|
avgPrice: number;
|
|
@@ -11837,7 +11923,11 @@ declare class OpenAlgoTradeFeed implements OrderFeed {
|
|
|
11837
11923
|
getOrderBook(): Promise<OrderBookSnapshot>;
|
|
11838
11924
|
/** Fetch the order book for reconciliation (maps to broker-agnostic orders). */
|
|
11839
11925
|
getOrders(): Promise<DecodedOrder[]>;
|
|
11840
|
-
/**
|
|
11926
|
+
/**
|
|
11927
|
+
* Fetch the position book for reconciliation. One row per symbol, exchange
|
|
11928
|
+
* and product. Throws rather than answer when the book or any row in it
|
|
11929
|
+
* cannot be read: a failed position read is unknown, not flat.
|
|
11930
|
+
*/
|
|
11841
11931
|
getPositions(): Promise<Position[]>;
|
|
11842
11932
|
}
|
|
11843
11933
|
interface RawOrder {
|
|
@@ -11855,6 +11945,8 @@ interface RawOrder {
|
|
|
11855
11945
|
}
|
|
11856
11946
|
interface RawPosition {
|
|
11857
11947
|
symbol?: string;
|
|
11948
|
+
exchange?: string;
|
|
11949
|
+
product?: string;
|
|
11858
11950
|
quantity?: number | string;
|
|
11859
11951
|
average_price?: number | string;
|
|
11860
11952
|
}
|
|
@@ -11948,6 +12040,15 @@ declare function decodeOrder(r: RawOrder, path?: string): OrderDecodeResult;
|
|
|
11948
12040
|
* `quarantined`.
|
|
11949
12041
|
*/
|
|
11950
12042
|
declare function mapOrder(r: RawOrder): DecodedOrder;
|
|
12043
|
+
/**
|
|
12044
|
+
* Map one position book row, keeping its exchange and product.
|
|
12045
|
+
*
|
|
12046
|
+
* Throws on a row with no symbol, an unreadable quantity, or an open quantity
|
|
12047
|
+
* with an unreadable average price. A position has no inert form the way an
|
|
12048
|
+
* order has `status: 'unknown'`: an unreadable quantity used to read 0, which
|
|
12049
|
+
* says flat, and a trader told flat may open the same position again. A flat
|
|
12050
|
+
* row's average price may be blank, and reads 0.
|
|
12051
|
+
*/
|
|
11951
12052
|
declare function mapPosition(r: RawPosition): Position;
|
|
11952
12053
|
|
|
11953
12054
|
/**
|
|
@@ -12746,6 +12847,17 @@ declare class AlertController {
|
|
|
12746
12847
|
private _onObjects;
|
|
12747
12848
|
private _syncVisual;
|
|
12748
12849
|
private _onData;
|
|
12850
|
+
/**
|
|
12851
|
+
* Where a replacement of the primary bars resumes a record: after the element
|
|
12852
|
+
* it last judged, or at that element when the replacement revised it.
|
|
12853
|
+
* Undefined seeds the record instead. A replacement without that element is
|
|
12854
|
+
* another series. One that only extends it is judged once the record has
|
|
12855
|
+
* watched the series grow: until then the bars it brings closed before
|
|
12856
|
+
* anyone looked, as when a warm load extends its cached bars. A front trimmed
|
|
12857
|
+
* at a retention cap is judged regardless, since every new bar arrives that
|
|
12858
|
+
* way there.
|
|
12859
|
+
*/
|
|
12860
|
+
private _resumeAt;
|
|
12749
12861
|
/**
|
|
12750
12862
|
* The first element of this update a record has not judged. An update that
|
|
12751
12863
|
* still has the record's tail at its index, at its time or later (a forming
|
|
@@ -29,7 +29,9 @@ declare function createTimeframeProvider(feed: TimeframeFeed, options: Timeframe
|
|
|
29
29
|
*
|
|
30
30
|
* Sub-day buckets start at the session open, the way an exchange cuts its own
|
|
31
31
|
* hourly bars, and the open is read from the bars in the chart's zone (see
|
|
32
|
-
* `sessionOpen`). A timeframe no coarser than the chart's is the chart's own
|
|
32
|
+
* `sessionOpen`). A timeframe no coarser than the chart's is the chart's own,
|
|
33
|
+
* and one the chart's bars do not divide into (5m on a 3m chart) is refused
|
|
34
|
+
* rather than folded into buckets of the wrong length.
|
|
33
35
|
*
|
|
34
36
|
* Only a calculation from the chart's bars alone folds, and only a causal one:
|
|
35
37
|
* a value at a bar reads no later bar. Which built-ins opt in, and why the
|
|
@@ -491,6 +493,11 @@ declare const FLOW_INDICATORS: readonly IndicatorDescriptor[];
|
|
|
491
493
|
* this follows Kaufman's published definition. It first prints at `erLength`, the
|
|
492
494
|
* earliest bar where both legs of the ratio exist, seeded there on the source
|
|
493
495
|
* itself, because there is no prior average to carry forward.
|
|
496
|
+
*
|
|
497
|
+
* A bar with no value is read as if it were not there, the way Parabolic SAR
|
|
498
|
+
* reads an incomplete bar: it prints nothing, the ratio window counts the
|
|
499
|
+
* values either side of it, and the average carries on from the last one. One
|
|
500
|
+
* missing close otherwise entered the recursion as NaN and ended the line.
|
|
494
501
|
*/
|
|
495
502
|
declare const KAMA: IndicatorDescriptor;
|
|
496
503
|
/**
|
|
@@ -1037,6 +1044,7 @@ declare const CONSOLIDATION_BREAKOUT: IndicatorDescriptor;
|
|
|
1037
1044
|
declare const SIGNAL_INDICATORS: readonly IndicatorDescriptor[];
|
|
1038
1045
|
|
|
1039
1046
|
declare const CPR: IndicatorDescriptor;
|
|
1047
|
+
declare const PIVOT_POINTS: IndicatorDescriptor;
|
|
1040
1048
|
declare const ALPHATREND: IndicatorDescriptor;
|
|
1041
1049
|
declare const RANGE_ANALYSIS: IndicatorDescriptor;
|
|
1042
1050
|
declare const STUDY_INDICATORS: readonly IndicatorDescriptor[];
|
|
@@ -1871,4 +1879,4 @@ declare const BUILTIN_INDICATORS: readonly IndicatorDescriptor[];
|
|
|
1871
1879
|
*/
|
|
1872
1880
|
declare function registerBuiltinIndicators(): void;
|
|
1873
1881
|
|
|
1874
|
-
export { ADAPTIVE_INDICATORS, ADL, ADX, ALLIGATOR, ALMA, ALPHATREND, AROON, AROON_OSCILLATOR, ATR, AVERAGE_DAILY_RANGE, AVERAGE_INDICATORS, AWESOME_OSCILLATOR, BALANCE_OF_POWER, BB_TREND, BOLLINGER, BOLLINGER_BANDWIDTH, BOLLINGER_PERCENT_B, BUILTIN_INDICATORS, CCI, CHAIKIN_MONEY_FLOW, CHAIKIN_OSCILLATOR, CHAIKIN_VOLATILITY, CHANDELIER_EXIT, CHANDE_KROLL_STOP, CHANDE_MOMENTUM, CHOPPINESS_INDEX, CHOP_ZONE, CONNORS_RSI, CONSOLIDATION_BREAKOUT, COPPOCK_CURVE, CPR, DEMA, DONCHIAN, DPO, EASE_OF_MOVEMENT, ELDER_FORCE_INDEX, ELDER_RAY, EMA, ENVELOPE, EXPONENTIAL_INDICATORS, FISHER_TRANSFORM, FLOW_INDICATORS, HALFTREND, HIGH_LOW_52_WEEK, HISTORICAL_VOLATILITY, HMA, HULL_SUITE, ICHIMOKU, INDEX_INDICATORS, INDICATORS_TIER, KAMA, KELTNER_CHANNEL, KLINGER_OSCILLATOR, KNOW_SURE_THING, LINREG_SLOPE, LSMA, MACD, MASS_INDEX, MA_CHANNEL, MA_CROSS, MA_RIBBON, MCGINLEY_DYNAMIC, MEDIAN, MFI, MOMENTUM, NET_VOLUME, NVI, type NumericalWindowOptions, OBV, OPEN_INTEREST, OPEN_INTEREST_BUILDUP, OPEN_INTEREST_CHANGE, OSCILLATOR_INDICATORS, OVERLAY_INDICATORS, PARABOLIC_SAR, PPO, PVI, PVO, PVT, RANGE_ANALYSIS, RANGE_INDICATORS, RELATIVE_VIGOR_INDEX, RELATIVE_VOLATILITY_INDEX, ROC, RSI, RSI_DIVERGENCE, type RequestedAlignmentOptions, type RequestedExpression, type RequestedIndicatorContext, type RequestedIndicatorDescriptor, type RequestedIntrabarOptions, type RequestedIntrabarValues, type RequestedTimeWindow, type RollingVarianceOptions, SCHAFF_TREND_CYCLE, SEASONALITY, SEASONALITY_INDICATORS, SIGNAL_INDICATORS, SMA, SMI, SMI_ERGODIC_INDICATOR, SMI_ERGODIC_OSCILLATOR, SMMA, SPECIAL_K, STANDARD_DEVIATION, STANDARD_ERROR, STANDARD_ERROR_BANDS, STOCHASTIC, STOCHASTIC_RSI, STRENGTH_INDICATORS, STUDY_INDICATORS, SUPERTREND, SWING_INDICATORS, type SecurityExpressionOptions, type SecurityOptions, type SecuritySeries, T3, TEMA, TREND_STRENGTH_INDEX, TRIX, TSI, TWAP, type Tier2Context, type Tier2Descriptor, type Tier2Point, type TimeframeOptions, type TimeframeProviderOptions, ULCER_INDEX, ULTIMATE_OSCILLATOR, VIDYA, VOLATILITY_INDICATORS, VOLATILITY_SQUEEZE, VOLATILITY_STOP, VOLUME, VORTEX, VWAP, VWMA, WAVETREND, WAVETREND_INDICATORS, WILLIAMS_FRACTALS, WILLIAMS_PERCENT_R, WILLIAMS_VIX_FIX, WMA, WOODIES_CCI, ZIGZAG, ZLEMA, alignRequestedExpression, alma, barsSince, cci, centerOfGravity, change, connorsStreak, correlation, createRequestedIndicator, createTier2Indicator, createTimeframeProvider, crosses, crossesAbove, crossesBelow, cumulative, dev, falling, highest, highestBars, inheritedDataVariant, linreg, lowest, lowestBars, nulls, percentRank, percentileLinear, percentileNearestRank, pivotHigh, pivotLow, rankCorrelation, registerBuiltinIndicators, requestedIntrabars, rising, rma, roc, rollingMedian, rollingMode, rollingRange, rollingSum, rollingVariance, runningMax, runningMin, securityExpression, securitySeries, sma, smaSeededEma, stdev, stoch, swma, valueWhen, vwma, withTimeframe, wma };
|
|
1882
|
+
export { ADAPTIVE_INDICATORS, ADL, ADX, ALLIGATOR, ALMA, ALPHATREND, AROON, AROON_OSCILLATOR, ATR, AVERAGE_DAILY_RANGE, AVERAGE_INDICATORS, AWESOME_OSCILLATOR, BALANCE_OF_POWER, BB_TREND, BOLLINGER, BOLLINGER_BANDWIDTH, BOLLINGER_PERCENT_B, BUILTIN_INDICATORS, CCI, CHAIKIN_MONEY_FLOW, CHAIKIN_OSCILLATOR, CHAIKIN_VOLATILITY, CHANDELIER_EXIT, CHANDE_KROLL_STOP, CHANDE_MOMENTUM, CHOPPINESS_INDEX, CHOP_ZONE, CONNORS_RSI, CONSOLIDATION_BREAKOUT, COPPOCK_CURVE, CPR, DEMA, DONCHIAN, DPO, EASE_OF_MOVEMENT, ELDER_FORCE_INDEX, ELDER_RAY, EMA, ENVELOPE, EXPONENTIAL_INDICATORS, FISHER_TRANSFORM, FLOW_INDICATORS, HALFTREND, HIGH_LOW_52_WEEK, HISTORICAL_VOLATILITY, HMA, HULL_SUITE, ICHIMOKU, INDEX_INDICATORS, INDICATORS_TIER, KAMA, KELTNER_CHANNEL, KLINGER_OSCILLATOR, KNOW_SURE_THING, LINREG_SLOPE, LSMA, MACD, MASS_INDEX, MA_CHANNEL, MA_CROSS, MA_RIBBON, MCGINLEY_DYNAMIC, MEDIAN, MFI, MOMENTUM, NET_VOLUME, NVI, type NumericalWindowOptions, OBV, OPEN_INTEREST, OPEN_INTEREST_BUILDUP, OPEN_INTEREST_CHANGE, OSCILLATOR_INDICATORS, OVERLAY_INDICATORS, PARABOLIC_SAR, PIVOT_POINTS, PPO, PVI, PVO, PVT, RANGE_ANALYSIS, RANGE_INDICATORS, RELATIVE_VIGOR_INDEX, RELATIVE_VOLATILITY_INDEX, ROC, RSI, RSI_DIVERGENCE, type RequestedAlignmentOptions, type RequestedExpression, type RequestedIndicatorContext, type RequestedIndicatorDescriptor, type RequestedIntrabarOptions, type RequestedIntrabarValues, type RequestedTimeWindow, type RollingVarianceOptions, SCHAFF_TREND_CYCLE, SEASONALITY, SEASONALITY_INDICATORS, SIGNAL_INDICATORS, SMA, SMI, SMI_ERGODIC_INDICATOR, SMI_ERGODIC_OSCILLATOR, SMMA, SPECIAL_K, STANDARD_DEVIATION, STANDARD_ERROR, STANDARD_ERROR_BANDS, STOCHASTIC, STOCHASTIC_RSI, STRENGTH_INDICATORS, STUDY_INDICATORS, SUPERTREND, SWING_INDICATORS, type SecurityExpressionOptions, type SecurityOptions, type SecuritySeries, T3, TEMA, TREND_STRENGTH_INDEX, TRIX, TSI, TWAP, type Tier2Context, type Tier2Descriptor, type Tier2Point, type TimeframeOptions, type TimeframeProviderOptions, ULCER_INDEX, ULTIMATE_OSCILLATOR, VIDYA, VOLATILITY_INDICATORS, VOLATILITY_SQUEEZE, VOLATILITY_STOP, VOLUME, VORTEX, VWAP, VWMA, WAVETREND, WAVETREND_INDICATORS, WILLIAMS_FRACTALS, WILLIAMS_PERCENT_R, WILLIAMS_VIX_FIX, WMA, WOODIES_CCI, ZIGZAG, ZLEMA, alignRequestedExpression, alma, barsSince, cci, centerOfGravity, change, connorsStreak, correlation, createRequestedIndicator, createTier2Indicator, createTimeframeProvider, crosses, crossesAbove, crossesBelow, cumulative, dev, falling, highest, highestBars, inheritedDataVariant, linreg, lowest, lowestBars, nulls, percentRank, percentileLinear, percentileNearestRank, pivotHigh, pivotLow, rankCorrelation, registerBuiltinIndicators, requestedIntrabars, rising, rma, roc, rollingMedian, rollingMode, rollingRange, rollingSum, rollingVariance, runningMax, runningMin, securityExpression, securitySeries, sma, smaSeededEma, stdev, stoch, swma, valueWhen, vwma, withTimeframe, wma };
|