openalgo-charts 1.7.1 → 1.8.2
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
CHANGED
|
@@ -269,7 +269,7 @@ npm run verify # typecheck + test + build + size
|
|
|
269
269
|
|
|
270
270
|
## Status & limitations
|
|
271
271
|
|
|
272
|
-
Version **1.
|
|
272
|
+
Version **1.8.2**. All engine build phases are implemented with 2042 unit tests across 110 files.
|
|
273
273
|
|
|
274
274
|
Known gaps, stated plainly:
|
|
275
275
|
|
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.
|
|
2
|
+
declare const VERSION = "1.8.2";
|
|
3
3
|
/** Returns the current library version. */
|
|
4
4
|
declare function version(): string;
|
|
5
5
|
|
|
@@ -1493,6 +1493,27 @@ interface IndicatorPlot {
|
|
|
1493
1493
|
* series without a full rebuild.
|
|
1494
1494
|
*/
|
|
1495
1495
|
colorKey?: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Four `calc` keys to draw this plot as bar-shaped elements instead of one
|
|
1498
|
+
* value per bar: candles, hollow candles, OHLC bars, high-low.
|
|
1499
|
+
*
|
|
1500
|
+
* A single column cannot express those at all, and the alternative (a second
|
|
1501
|
+
* result shape for `calc`) would fork the contract every descriptor and every
|
|
1502
|
+
* helper is written against. Naming four columns inside the *same*
|
|
1503
|
+
* `IndicatorValues` keeps one shape: a smoothed Heikin-Ashi overlay, a
|
|
1504
|
+
* higher-timeframe candle, a synthetic spread instrument each return four
|
|
1505
|
+
* ordinary columns and point at them from here.
|
|
1506
|
+
*
|
|
1507
|
+
* The named columns must all exist and be bar-aligned, or `addIndicator`
|
|
1508
|
+
* throws. `key` stays the series identity and the legend reading falls back to
|
|
1509
|
+
* the `close` column.
|
|
1510
|
+
*/
|
|
1511
|
+
ohlc?: {
|
|
1512
|
+
open: string;
|
|
1513
|
+
high: string;
|
|
1514
|
+
low: string;
|
|
1515
|
+
close: string;
|
|
1516
|
+
};
|
|
1496
1517
|
/**
|
|
1497
1518
|
* Per-bar colour, for plots whose meaning changes bar to bar — a MACD
|
|
1498
1519
|
* histogram is four colours by sign and direction, a conditional study two.
|
|
@@ -1581,6 +1602,84 @@ type IndicatorDrawing = {
|
|
|
1581
1602
|
type IndicatorValues = Record<string, readonly (number | null)[]>;
|
|
1582
1603
|
/** Per-instance scratch owned by the descriptor (Tier-2 data lands here). */
|
|
1583
1604
|
type IndicatorStore = Record<string, unknown>;
|
|
1605
|
+
/**
|
|
1606
|
+
* The fourth, optional argument to `calc` (and the sixth to `calcTail`): what
|
|
1607
|
+
* the calculation cannot read off the bars themselves.
|
|
1608
|
+
*
|
|
1609
|
+
* It is optional so that every descriptor written against `calc(bars, settings,
|
|
1610
|
+
* store)` keeps its exact signature and its exact behaviour, which is the whole
|
|
1611
|
+
* point: a calculation that ignores the context computes what it always did.
|
|
1612
|
+
*/
|
|
1613
|
+
interface IndicatorCalcContext {
|
|
1614
|
+
/**
|
|
1615
|
+
* Where the last bar stands, so a study can act once per bar rather than once
|
|
1616
|
+
* per tick, or refuse to signal off a bar that is still moving.
|
|
1617
|
+
*/
|
|
1618
|
+
barState: {
|
|
1619
|
+
/** The most recent update appended a bar rather than replacing one. */
|
|
1620
|
+
isNew: boolean;
|
|
1621
|
+
/** The last bar has closed: its interval has elapsed on the chart clock. */
|
|
1622
|
+
isConfirmed: boolean;
|
|
1623
|
+
/** A live feed is driving updates, rather than a one-off history load. */
|
|
1624
|
+
isRealtime: boolean;
|
|
1625
|
+
/** Index of the last bar, `bars.length - 1` (-1 when there are none). */
|
|
1626
|
+
lastIndex: number;
|
|
1627
|
+
};
|
|
1628
|
+
/** The instrument, when the host knows one. See `IndicatorAttachContext`. */
|
|
1629
|
+
symbol?: string;
|
|
1630
|
+
/** The timeframe (`'5m'`, `'1d'`), on the same terms as `symbol`. */
|
|
1631
|
+
interval?: string;
|
|
1632
|
+
/** The chart's IANA zone, the calendar its axis is labelled in. */
|
|
1633
|
+
timezone: string;
|
|
1634
|
+
/** Chart wall clock in UTC seconds, the clock the countdown row reads. */
|
|
1635
|
+
now(): number;
|
|
1636
|
+
/**
|
|
1637
|
+
* The instrument's tick size, from the pane's price scale `minMove`.
|
|
1638
|
+
*
|
|
1639
|
+
* `undefined` when the host has not told the chart what it is, which is the
|
|
1640
|
+
* honest answer rather than a guessed 0.01: an indicator sizing a range in
|
|
1641
|
+
* ticks has to tell "one paisa" apart from "nobody said".
|
|
1642
|
+
*/
|
|
1643
|
+
tickSize?: number;
|
|
1644
|
+
}
|
|
1645
|
+
/** What an alert's `when` predicate is handed, for the bar it is judging. */
|
|
1646
|
+
interface IndicatorAlertContext {
|
|
1647
|
+
bars: readonly Bar[];
|
|
1648
|
+
values: IndicatorValues;
|
|
1649
|
+
settings: Readonly<IndicatorSettings>;
|
|
1650
|
+
/** The bar being evaluated. */
|
|
1651
|
+
index: number;
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* A condition the runtime watches, declared by the descriptor rather than wired
|
|
1655
|
+
* up by the host: the indicator is the only thing that knows what a crossover of
|
|
1656
|
+
* its own columns means.
|
|
1657
|
+
*
|
|
1658
|
+
* Evaluated once per bar, for bars that are new since the last evaluation, so
|
|
1659
|
+
* adding the indicator to a loaded chart fires nothing for history.
|
|
1660
|
+
*/
|
|
1661
|
+
interface IndicatorAlertSpec {
|
|
1662
|
+
/** Stable within the descriptor, e.g. `'cross-up'`. */
|
|
1663
|
+
id: string;
|
|
1664
|
+
/** Short human label, e.g. `'MACD crossed up'`. */
|
|
1665
|
+
title: string;
|
|
1666
|
+
/** Longer text for a notification; defaults to `title`. */
|
|
1667
|
+
message?: string;
|
|
1668
|
+
when(ctx: IndicatorAlertContext): boolean;
|
|
1669
|
+
}
|
|
1670
|
+
/** Payload of the `'indicator:alert'` event on the chart's own bus. */
|
|
1671
|
+
interface IndicatorAlertPayload {
|
|
1672
|
+
/** Descriptor id, e.g. `'macd'`. */
|
|
1673
|
+
indicatorId: string;
|
|
1674
|
+
/** Instance id, so a host can tell three EMAs apart. */
|
|
1675
|
+
instanceId: string;
|
|
1676
|
+
alertId: string;
|
|
1677
|
+
title: string;
|
|
1678
|
+
message: string;
|
|
1679
|
+
/** The bar that triggered it: UTC seconds, and its index in `bars`. */
|
|
1680
|
+
time: number;
|
|
1681
|
+
index: number;
|
|
1682
|
+
}
|
|
1584
1683
|
/** What an indicator's `attach` lifecycle can reach. */
|
|
1585
1684
|
interface IndicatorAttachContext {
|
|
1586
1685
|
/** Current settings (live — read at call time, not captured). */
|
|
@@ -1612,6 +1711,14 @@ interface IndicatorAttachContext {
|
|
|
1612
1711
|
/** Attach a primitive to this indicator's pane, and detach it again. */
|
|
1613
1712
|
addPrimitive?(p: IPrimitive): void;
|
|
1614
1713
|
removePrimitive?(p: IPrimitive): void;
|
|
1714
|
+
/**
|
|
1715
|
+
* Emit on the chart's own event bus, the one `chart.on(name, cb)` listens to.
|
|
1716
|
+
*
|
|
1717
|
+
* The declarative `alerts` slot covers a condition read off the bars; this is
|
|
1718
|
+
* the imperative half, for an indicator whose signal arrives from outside the
|
|
1719
|
+
* calculation entirely (a subscription its `attach` opened).
|
|
1720
|
+
*/
|
|
1721
|
+
emit?(event: string, payload: unknown): void;
|
|
1615
1722
|
}
|
|
1616
1723
|
/**
|
|
1617
1724
|
* What `levels` is handed. It carries `bars` and `values` **and** spreads the
|
|
@@ -1664,7 +1771,7 @@ interface IndicatorDescriptor {
|
|
|
1664
1771
|
* `store`. Tier-2 indicators — the ones with their own data — read the
|
|
1665
1772
|
* external series their `attach` lifecycle put in `store`.
|
|
1666
1773
|
*/
|
|
1667
|
-
calc(bars: readonly Bar[], settings: Readonly<IndicatorSettings>, store: IndicatorStore): IndicatorValues;
|
|
1774
|
+
calc(bars: readonly Bar[], settings: Readonly<IndicatorSettings>, store: IndicatorStore, ctx?: IndicatorCalcContext): IndicatorValues;
|
|
1668
1775
|
/**
|
|
1669
1776
|
* Optional per-instance lifecycle, for indicators whose data is not derived
|
|
1670
1777
|
* from the chart's bars (open interest, CVD, an external feed). Called once
|
|
@@ -1684,7 +1791,7 @@ interface IndicatorDescriptor {
|
|
|
1684
1791
|
* microseconds for one indicator over 50k bars, but it is O(n) per tick per
|
|
1685
1792
|
* indicator, so implement this for anything meant to run in a busy live pane.
|
|
1686
1793
|
*/
|
|
1687
|
-
calcTail?(bars: readonly Bar[], settings: Readonly<IndicatorSettings>, fromIndex: number, previous: IndicatorValues, store: IndicatorStore): IndicatorValues | null;
|
|
1794
|
+
calcTail?(bars: readonly Bar[], settings: Readonly<IndicatorSettings>, fromIndex: number, previous: IndicatorValues, store: IndicatorStore, ctx?: IndicatorCalcContext): IndicatorValues | null;
|
|
1688
1795
|
/**
|
|
1689
1796
|
* Optional bar-anchored signal markers — a named "Buy"/"Sell" plate, an arrow
|
|
1690
1797
|
* at a crossover. Runs after every `calc`, so it reads the values it just
|
|
@@ -1729,6 +1836,47 @@ interface IndicatorDescriptor {
|
|
|
1729
1836
|
values: IndicatorValues;
|
|
1730
1837
|
settings: Readonly<IndicatorSettings>;
|
|
1731
1838
|
}): readonly IndicatorDrawing[];
|
|
1839
|
+
/**
|
|
1840
|
+
* Optional per-bar shading behind everything else in the indicator's pane: a
|
|
1841
|
+
* full-height column per bar, `null` where nothing should be shaded.
|
|
1842
|
+
*
|
|
1843
|
+
* A regime study answers "which state is the market in right now", and that is
|
|
1844
|
+
* a property of the whole bar, not a price. Drawn as a plot it would need a
|
|
1845
|
+
* value to sit at and would fight the pane's autoscale; as a column behind the
|
|
1846
|
+
* candles it reads at a glance and costs the scale nothing.
|
|
1847
|
+
*
|
|
1848
|
+
* Runs after every `calc`. Return `[]` to clear the layer.
|
|
1849
|
+
*/
|
|
1850
|
+
background?(ctx: {
|
|
1851
|
+
bars: readonly Bar[];
|
|
1852
|
+
values: IndicatorValues;
|
|
1853
|
+
settings: Readonly<IndicatorSettings>;
|
|
1854
|
+
}): readonly (string | null)[];
|
|
1855
|
+
/**
|
|
1856
|
+
* Optional recolouring of the **main price candles**, one entry per bar,
|
|
1857
|
+
* `null` to leave that bar with its own colour.
|
|
1858
|
+
*
|
|
1859
|
+
* Distinct from a plot's `colorBy`, which paints the indicator's own series: a
|
|
1860
|
+
* trend filter, a volatility regime or a higher-timeframe bias is a statement
|
|
1861
|
+
* about the price bars themselves, and drawing it as a second series beside
|
|
1862
|
+
* them says something weaker.
|
|
1863
|
+
*
|
|
1864
|
+
* Only one indicator's colours can be on the candles at a time; the most
|
|
1865
|
+
* recent publisher wins, and publishers run in `addIndicator` order, so the
|
|
1866
|
+
* winner is the same one from frame to frame. Removing it, or hiding it,
|
|
1867
|
+
* restores the bars' own colours.
|
|
1868
|
+
*/
|
|
1869
|
+
barColors?(ctx: {
|
|
1870
|
+
bars: readonly Bar[];
|
|
1871
|
+
values: IndicatorValues;
|
|
1872
|
+
settings: Readonly<IndicatorSettings>;
|
|
1873
|
+
}): readonly (string | null)[];
|
|
1874
|
+
/**
|
|
1875
|
+
* Optional conditions the runtime watches on the descriptor's behalf, emitted
|
|
1876
|
+
* as `'indicator:alert'` on the chart's event bus with an
|
|
1877
|
+
* {@link IndicatorAlertPayload}. See {@link IndicatorAlertSpec}.
|
|
1878
|
+
*/
|
|
1879
|
+
alerts?: readonly IndicatorAlertSpec[];
|
|
1732
1880
|
/**
|
|
1733
1881
|
* Optional horizontal reference levels drawn in the indicator's pane.
|
|
1734
1882
|
* Recomputed after every `calc`, so a level derived from the data (the
|
|
@@ -2171,6 +2319,24 @@ interface IndicatorHost {
|
|
|
2171
2319
|
interval?(): string | undefined;
|
|
2172
2320
|
/** Chart wall clock in UTC seconds. Absent means the system clock. */
|
|
2173
2321
|
now?(): number;
|
|
2322
|
+
/**
|
|
2323
|
+
* Publish an indicator's per-bar colours onto the **primary price series**,
|
|
2324
|
+
* or withdraw them with `null`. `owner` is the instance id: a host holds one
|
|
2325
|
+
* overlay at a time and only lets its current owner withdraw it, so a second
|
|
2326
|
+
* publisher taking over does not get cleared by the first one's teardown.
|
|
2327
|
+
*
|
|
2328
|
+
* Optional, like `timezone`: a host that does not implement it simply gives a
|
|
2329
|
+
* `barColors` descriptor nowhere to publish, and the indicator's own plots are
|
|
2330
|
+
* unaffected.
|
|
2331
|
+
*/
|
|
2332
|
+
setBarColors?(colors: readonly (string | null)[] | null, owner: string): void;
|
|
2333
|
+
/** Emit on the chart's event bus (indicator alerts, and `attach`'s own events). */
|
|
2334
|
+
emit?(event: string, payload: unknown): void;
|
|
2335
|
+
/**
|
|
2336
|
+
* Tick size of the pane's price scale, or undefined when none is set.
|
|
2337
|
+
* Optional so a host predating it still satisfies this interface.
|
|
2338
|
+
*/
|
|
2339
|
+
tickSize?(paneIndex: number): number | undefined;
|
|
2174
2340
|
/** Pin a pane's price scale to a fixed range, or release it with `null`. */
|
|
2175
2341
|
setPaneRange(paneIndex: number, range: {
|
|
2176
2342
|
min: number;
|
|
@@ -2552,6 +2718,49 @@ declare class TradingController {
|
|
|
2552
2718
|
private _onDragEnd;
|
|
2553
2719
|
}
|
|
2554
2720
|
|
|
2721
|
+
/**
|
|
2722
|
+
* Interactive value capture (ARCHITECTURE.md §7). A settings input that names a
|
|
2723
|
+
* price or a time is declarative and the host renders it, but the *value* can
|
|
2724
|
+
* come from pointing at the chart, and only the engine knows what is under the
|
|
2725
|
+
* cursor. So the host arms a pick ("the user is now choosing a price"), the next
|
|
2726
|
+
* click on the plot answers with one, and the pick disarms itself.
|
|
2727
|
+
*
|
|
2728
|
+
* Built on the `click` event the draw tier's placement mode already resolves
|
|
2729
|
+
* anchors from, rather than a second capture path: same pane resolution, same
|
|
2730
|
+
* on-demand autoscale, same payload.
|
|
2731
|
+
*
|
|
2732
|
+
* Placement mode is deliberately *not* armed while picking. A pick wants panning
|
|
2733
|
+
* left alone (scroll back to the bar you mean, then click it), and a drag emits
|
|
2734
|
+
* no click outside placement mode, so panning cannot answer the pick by
|
|
2735
|
+
* accident. It also keeps a pick from cancelling an active drawing tool.
|
|
2736
|
+
*/
|
|
2737
|
+
type PickKind = 'price' | 'time';
|
|
2738
|
+
/**
|
|
2739
|
+
* The slice of the chart a pick needs. Structural, so `Chart` satisfies it with
|
|
2740
|
+
* nothing to cast and this module never imports the core (which imports this).
|
|
2741
|
+
*/
|
|
2742
|
+
interface PickHost {
|
|
2743
|
+
on(event: string, cb: (payload: unknown) => void): () => void;
|
|
2744
|
+
emit(event: string, payload: unknown): void;
|
|
2745
|
+
readonly dataLayer: {
|
|
2746
|
+
timeToIndexFloat(time: number): number;
|
|
2747
|
+
indexToTime(index: number): number | undefined;
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* Arm the next plot click to resolve to a price or a bar time and hand it to
|
|
2752
|
+
* `cb`. Returns a cancel function; calling it (or arming another pick on the
|
|
2753
|
+
* same chart) disarms without calling back. The chart emits `pick:start`
|
|
2754
|
+
* (`{ kind }`) and `pick:end` (`{ kind, value }`, `value` null when cancelled)
|
|
2755
|
+
* so a host can show its own cursor or hint while the pick is live.
|
|
2756
|
+
*
|
|
2757
|
+
* A time is snapped to the bar the click landed on, because a time between two
|
|
2758
|
+
* bars matches no bar and anything anchored to it would never line up. Clicking
|
|
2759
|
+
* past the last bar keeps the projected time, which is what a pick in the empty
|
|
2760
|
+
* right-hand space means.
|
|
2761
|
+
*/
|
|
2762
|
+
declare function beginPick(host: PickHost, kind: PickKind, cb: (value: number) => void): () => void;
|
|
2763
|
+
|
|
2555
2764
|
/**
|
|
2556
2765
|
* Event markers (ARCHITECTURE.md §8.2): Earnings / Dividend / Split badges in a
|
|
2557
2766
|
* strip near the bottom of the plot. Time-anchored only (no price). Hover/click
|
|
@@ -3140,6 +3349,17 @@ declare class Chart {
|
|
|
3140
3349
|
private readonly _indicators;
|
|
3141
3350
|
/** Guards indicator recompute against re-entry via its own `series.setData`. */
|
|
3142
3351
|
private _recomputing;
|
|
3352
|
+
/** Instance id of the indicator whose colours are on the price bars, if any. */
|
|
3353
|
+
private _barColorOwner;
|
|
3354
|
+
private _barColors;
|
|
3355
|
+
/**
|
|
3356
|
+
* Each price bar's own colour, indexed like the series. The overlay overwrites
|
|
3357
|
+
* `Bar.color`, so a bar's own value is only readable the first time we touch
|
|
3358
|
+
* it, and removing the indicator has to put something back.
|
|
3359
|
+
*/
|
|
3360
|
+
private readonly _barColorBase;
|
|
3361
|
+
/** Time of bar 0 when the snapshot was taken, to catch a replaced history. */
|
|
3362
|
+
private _barColorAnchor;
|
|
3143
3363
|
/** Opaque drawing-tier payload, round-tripped through get/restoreState. */
|
|
3144
3364
|
private _drawingState;
|
|
3145
3365
|
/** Pane currently maximized, and the weights to restore when it un-maximizes. */
|
|
@@ -3309,6 +3529,30 @@ declare class Chart {
|
|
|
3309
3529
|
/** Remove one indicator instance by its handle id. Returns true if it existed. */
|
|
3310
3530
|
removeIndicator(instanceId: string): boolean;
|
|
3311
3531
|
private _indicatorHost;
|
|
3532
|
+
/**
|
|
3533
|
+
* Take (or withdraw) the price bars' colour overlay on behalf of one
|
|
3534
|
+
* indicator instance.
|
|
3535
|
+
*
|
|
3536
|
+
* Only one overlay can be on the candles, so this is last writer wins. That is
|
|
3537
|
+
* deterministic rather than arbitrary: publishers run inside
|
|
3538
|
+
* `_recomputeIndicators`, in `addIndicator` order, so the same instance wins
|
|
3539
|
+
* every frame. Withdrawal is gated on ownership, or the first publisher's
|
|
3540
|
+
* teardown would wipe the second one's colours. If the *winner* is removed
|
|
3541
|
+
* while another publisher is still live, the bars go back to their own colours
|
|
3542
|
+
* until that publisher's next recompute.
|
|
3543
|
+
*/
|
|
3544
|
+
private _setBarColors;
|
|
3545
|
+
/**
|
|
3546
|
+
* Republish the primary series with the overlay applied.
|
|
3547
|
+
*
|
|
3548
|
+
* The bars in the data layer are the **caller's own objects** (`setData` keeps
|
|
3549
|
+
* the references), so painting a colour onto them in place would reach back
|
|
3550
|
+
* into the host's array and outlive the indicator. Cloning the ones that
|
|
3551
|
+
* change is what keeps that from happening; unchanged bars are passed through,
|
|
3552
|
+
* and a pass where nothing changed writes nothing at all, which is the common
|
|
3553
|
+
* case on a live tick.
|
|
3554
|
+
*/
|
|
3555
|
+
private _applyBarColors;
|
|
3312
3556
|
/**
|
|
3313
3557
|
* Recompute every indicator after a source-data change. Reentrant-guarded:
|
|
3314
3558
|
* an indicator writes its plots with `series.setData`, which re-enters the
|
|
@@ -3562,6 +3806,14 @@ declare class Chart {
|
|
|
3562
3806
|
* in one gesture. `DrawingController` drives this for you.
|
|
3563
3807
|
*/
|
|
3564
3808
|
setPlacementMode(active: boolean): void;
|
|
3809
|
+
/**
|
|
3810
|
+
* Arm the next plot click to answer with a price or a bar time, handed to
|
|
3811
|
+
* `cb`. Returns a cancel function; arming another pick on this chart cancels
|
|
3812
|
+
* the pending one. `pick:start` and `pick:end` bracket it so a host can show
|
|
3813
|
+
* its own cursor while the pick is live. See `input/pick` for why this does
|
|
3814
|
+
* not touch placement mode.
|
|
3815
|
+
*/
|
|
3816
|
+
beginPick(kind: PickKind, cb: (value: number) => void): () => void;
|
|
3565
3817
|
/** Swap the palette at runtime (dark/light toggle) without recreating the chart. */
|
|
3566
3818
|
setTheme(theme: ChartTheme): void;
|
|
3567
3819
|
/**
|
|
@@ -3847,7 +4099,28 @@ declare class Chart {
|
|
|
3847
4099
|
/** Create a chart inside the given container element. */
|
|
3848
4100
|
declare function createChart(container: HTMLElement, options?: ChartOptions): Chart;
|
|
3849
4101
|
|
|
4102
|
+
/** The color as rgba() with the given alpha (parse failure returns the input). */
|
|
4103
|
+
declare function withAlpha(color: string, alpha: number): string;
|
|
4104
|
+
|
|
4105
|
+
/**
|
|
4106
|
+
* Re-exported, not reimplemented: one import path covers an indicator's colour
|
|
4107
|
+
* work, while the only colour parser in the engine stays in `pill.ts`. A second
|
|
4108
|
+
* copy here would cost base bytes and drift out of step with the first.
|
|
4109
|
+
*/
|
|
4110
|
+
|
|
3850
4111
|
declare function verticalGradient(ctx: CanvasRenderingContext2D, heightPx: number, topColor: string, bottomColor: string): CanvasGradient;
|
|
4112
|
+
/**
|
|
4113
|
+
* Blend `low` to `high` in sRGB by where `value` sits in [min, max], clamped
|
|
4114
|
+
* outside. Heatmap plots and per-bar colouring call this once per bar, so it
|
|
4115
|
+
* allocates only the result string: no closure, no cache, no lookup table.
|
|
4116
|
+
*
|
|
4117
|
+
* The clamp is two comparisons rather than Math.min/Math.max because both are
|
|
4118
|
+
* false against a not-available value, which lands it on `low` instead of
|
|
4119
|
+
* poisoning the output with NaN. Canvas ignores an unparseable fillStyle and
|
|
4120
|
+
* silently keeps the previous one, so a bad string would bleed a neighbour's
|
|
4121
|
+
* colour across the bar rather than fail loudly.
|
|
4122
|
+
*/
|
|
4123
|
+
declare function fromGradient(value: number, min: number, max: number, low: string, high: string): string;
|
|
3851
4124
|
|
|
3852
4125
|
/**
|
|
3853
4126
|
* Generate up to ~`maxTicks` nicely-rounded tick values spanning [min, max].
|
|
@@ -4734,6 +5007,38 @@ declare class IndicatorDrawings implements IPrimitive {
|
|
|
4734
5007
|
draw(ctx: CanvasRenderingContext2D, rc: PrimitiveRenderContext): void;
|
|
4735
5008
|
}
|
|
4736
5009
|
|
|
5010
|
+
/**
|
|
5011
|
+
* Per-bar pane shading: one full-height column behind the data, in whatever
|
|
5012
|
+
* colour the descriptor gave that bar.
|
|
5013
|
+
*
|
|
5014
|
+
* A regime study answers "which state is the market in", and that is a property
|
|
5015
|
+
* of the whole bar rather than of a price. As a column it reads at a glance and
|
|
5016
|
+
* costs the price scale nothing, where a plot would need a value to sit at and
|
|
5017
|
+
* would drag the pane's autoscale around with it.
|
|
5018
|
+
*
|
|
5019
|
+
* What makes it affordable is the work skipped: everything outside the visible
|
|
5020
|
+
* range is dropped before anything is painted, and adjacent bars sharing a
|
|
5021
|
+
* colour become one rect instead of one rect each. A year of two-state shading
|
|
5022
|
+
* is a handful of fills, not one per bar per frame.
|
|
5023
|
+
*/
|
|
5024
|
+
|
|
5025
|
+
declare class IndicatorBackground implements IPrimitive {
|
|
5026
|
+
private _colors;
|
|
5027
|
+
/** Time of `_colors[0]`'s bar. See `draw` for why this is a time, not an index. */
|
|
5028
|
+
private _anchor;
|
|
5029
|
+
private _host;
|
|
5030
|
+
private _visible;
|
|
5031
|
+
attached(host: PrimitiveHost): void;
|
|
5032
|
+
detached(): void;
|
|
5033
|
+
/** The same layer the bands use: behind the series, so the candles stay crisp. */
|
|
5034
|
+
zOrder(): ZOrder;
|
|
5035
|
+
/** Shading has no price of its own and must never widen the pane's range. */
|
|
5036
|
+
autoscaleInfo(): null;
|
|
5037
|
+
setColors(colors: readonly (string | null)[], bars: readonly Bar[]): void;
|
|
5038
|
+
setVisible(on: boolean): void;
|
|
5039
|
+
draw(ctx: CanvasRenderingContext2D, rc: PrimitiveRenderContext): void;
|
|
5040
|
+
}
|
|
5041
|
+
|
|
4737
5042
|
/**
|
|
4738
5043
|
* Price-level family, built on the primitive API (ARCHITECTURE.md §8). A price
|
|
4739
5044
|
* level is a horizontal line at a meaningful price **and** a matching tag on the
|
|
@@ -6292,6 +6597,58 @@ declare function bucketStartOf(b: Bucketing, timeSec: number, zone?: string): nu
|
|
|
6292
6597
|
* or 31 days for a month, and an hour short of that across a spring forward.
|
|
6293
6598
|
*/
|
|
6294
6599
|
declare function nextBucketStart(b: Bucketing, timeSec: number, zone?: string): number | null;
|
|
6600
|
+
/**
|
|
6601
|
+
* How a bar's length reads to a human: a count, and the unit it counts.
|
|
6602
|
+
*
|
|
6603
|
+
* `M` is months, so a quarter reads as 3 and a year as 12, keeping the token
|
|
6604
|
+
* grammar's rule that lower-case `m` is minutes and upper-case `M` is a month.
|
|
6605
|
+
* `tick` counts trades. `other` is a bucket with neither a clock length nor a
|
|
6606
|
+
* trade count, which today means volume, and is where a later count-driven
|
|
6607
|
+
* mode can land without silently changing what an existing unit means.
|
|
6608
|
+
*/
|
|
6609
|
+
interface IntervalParts {
|
|
6610
|
+
multiplier: number;
|
|
6611
|
+
unit: 's' | 'm' | 'h' | 'D' | 'W' | 'M' | 'tick' | 'other';
|
|
6612
|
+
}
|
|
6613
|
+
/**
|
|
6614
|
+
* Split a code into a count and a unit, or null when nothing recognises it.
|
|
6615
|
+
* For an indicator that knows its own interval and wants to reason about it,
|
|
6616
|
+
* rather than hard-coding the handful of codes its author happened to test on.
|
|
6617
|
+
*
|
|
6618
|
+
* Read off the bucketing rule, not off the code's spelling, so it answers for
|
|
6619
|
+
* a registered code the built-in grammar never parsed, and it answers
|
|
6620
|
+
* canonically: `120m` and `2h` are the same bar and both read as 2 h. The
|
|
6621
|
+
* coarsest unit that divides the length wins, which is also why a 90-second
|
|
6622
|
+
* bar reads as 90 s rather than as one and a half minutes.
|
|
6623
|
+
*/
|
|
6624
|
+
declare function intervalParts(code: string): IntervalParts | null;
|
|
6625
|
+
/**
|
|
6626
|
+
* True when the bar is not a whole number of minutes long, so its labels need
|
|
6627
|
+
* second precision. `1s`, `15s` and `90s` all qualify; `5m` does not.
|
|
6628
|
+
*/
|
|
6629
|
+
declare function isSecondsInterval(code: string): boolean;
|
|
6630
|
+
/**
|
|
6631
|
+
* True for a fixed-length bar shorter than a day: the ones that want a session
|
|
6632
|
+
* reset, such as a VWAP anchored to the day's open or an opening range.
|
|
6633
|
+
*
|
|
6634
|
+
* A calendar period is false because it is coarser, and a count-driven bar is
|
|
6635
|
+
* false because it has no clock length to compare, not because it is known to
|
|
6636
|
+
* be long. Ask `isTickInterval` or `intervalParts` for those.
|
|
6637
|
+
*/
|
|
6638
|
+
declare function isIntradayInterval(code: string): boolean;
|
|
6639
|
+
/**
|
|
6640
|
+
* True for a bar exactly one day long, whether spelled `D`, `24h` or `1440m`.
|
|
6641
|
+
*
|
|
6642
|
+
* Deliberately not "daily or coarser": weekly and monthly answer false, so a
|
|
6643
|
+
* caller can branch on intraday, daily and coarser as three independent
|
|
6644
|
+
* questions instead of an ordered ladder where the wrong order swallows a case.
|
|
6645
|
+
*/
|
|
6646
|
+
declare function isDailyInterval(code: string): boolean;
|
|
6647
|
+
/**
|
|
6648
|
+
* True for a bar that closes after N trades. Volume bars close on quantity, not
|
|
6649
|
+
* on trade count, so they answer false; `intervalParts` separates the two.
|
|
6650
|
+
*/
|
|
6651
|
+
declare function isTickInterval(code: string): boolean;
|
|
6295
6652
|
|
|
6296
6653
|
/**
|
|
6297
6654
|
* Tick aggregation (ARCHITECTURE.md 10.2). Aggregates raw trade ticks into
|
|
@@ -6675,6 +7032,34 @@ declare function sessionStartFlags(times: readonly number[], zone?: string): boo
|
|
|
6675
7032
|
* session.
|
|
6676
7033
|
*/
|
|
6677
7034
|
declare function calendarPeriodFlags(times: readonly number[], isNew: (prevUtcSeconds: number, utcSeconds: number) => boolean): boolean[];
|
|
7035
|
+
/** A trading window in local wall-clock terms, as parsed from a spec string. */
|
|
7036
|
+
interface SessionSpec {
|
|
7037
|
+
/** Minutes from midnight, inclusive. */
|
|
7038
|
+
start: number;
|
|
7039
|
+
/** Minutes from midnight, exclusive. */
|
|
7040
|
+
end: number;
|
|
7041
|
+
/** Days the window opens on, 1..7 with 1 = Sunday. Absent means every day. */
|
|
7042
|
+
days?: readonly number[];
|
|
7043
|
+
}
|
|
7044
|
+
/**
|
|
7045
|
+
* Parse `"0915-1015"`, optionally with a day filter after a colon:
|
|
7046
|
+
* `"0930-1600:23456"` is Monday to Friday. Whitespace around the parts is
|
|
7047
|
+
* ignored. An end at or before the start is a window that runs past midnight.
|
|
7048
|
+
*
|
|
7049
|
+
* Returns null rather than throwing, because the spec is normally a string a
|
|
7050
|
+
* user typed into a settings field and a half-typed one arrives on every
|
|
7051
|
+
* keystroke.
|
|
7052
|
+
*/
|
|
7053
|
+
declare function parseSessionSpec(spec: string): SessionSpec | null;
|
|
7054
|
+
/** True if this instant falls inside `spec` as read in `zone`. */
|
|
7055
|
+
declare function inSessionAt(utcSeconds: number, spec: SessionSpec, zone?: string): boolean;
|
|
7056
|
+
/**
|
|
7057
|
+
* Per-bar flags marking the bars inside `spec`. An unparseable spec string
|
|
7058
|
+
* marks nothing: a chart that keeps drawing beats one that dies on a stray
|
|
7059
|
+
* character, and the caller can check `parseSessionSpec` itself to tell an
|
|
7060
|
+
* empty window from a bad one.
|
|
7061
|
+
*/
|
|
7062
|
+
declare function sessionFlags(times: readonly number[], spec: string | SessionSpec, zone?: string): boolean[];
|
|
6678
7063
|
|
|
6679
7064
|
/** Clamp `value` into the inclusive range [min, max]. */
|
|
6680
7065
|
declare function clamp(value: number, min: number, max: number): number;
|
|
@@ -6687,4 +7072,4 @@ declare function lerp(a: number, b: number, t: number): number;
|
|
|
6687
7072
|
*/
|
|
6688
7073
|
declare function roundToTick(value: number, step: number): number;
|
|
6689
7074
|
|
|
6690
|
-
export { ALT_PRESET, type AddSeriesOptions, type AggTick, type AxisChromeOptions, BUILTIN_COMMANDS, type Bar, BarCache, type BarCacheOptions, type BarCacheStats, type BarCacheStore, type BarUpdate, type BarsRequest, type Bucketing, BuySellButtons, type BuySellButtonsOptions, CHART_STATE_VERSION, type CachedBars, type CachedBarsRequest, type CalendarBucketing, type CalendarUnit, CandleBuilder, type CandleBuilderOptions, type CandleStyle, type CandleUpdate, type CanvasLineStyle, type CanvasOptions, Chart, type ChartEvent, type ChartEventOptions, type ChartOptions, type ChartSettingsState, type ChartSettingsTab, type ChartSettingsTabId, type ChartSettingsValue, type ChartSettingsValues, type ChartState, ChartTable, type ChartTableOptions, type ChartTheme, type ComparisonAlignment, type ComparisonChartHost, ComparisonController, type ComparisonControllerOptions, type ComparisonHandle, type ComparisonMode, type ComparisonOptions, type ComparisonPane, type ContextMenuEvent, type ContextMenuTarget, type ContextMenuTargetKind, type CrosshairMoveEvent, type CrosshairOptions, type CrosshairStyle, type CustomShortcut, DEFAULT_CANDLE_BUILDER_OPTIONS, DEFAULT_CANDLE_STYLE, DEFAULT_CHART_TABLE_OPTIONS, DEFAULT_HISTOGRAM_STYLE, DEFAULT_KEYMAP, DEFAULT_PRICE_SCALE_OPTIONS, DEFAULT_THEME, DEFAULT_TIMEZONE, DEFAULT_TIME_NAVIGATOR_OPTIONS, DEFAULT_TIME_SCALE_OPTIONS, DEFAULT_TRADING_COLORS, type DataFeed, DataLayer, type DecodedOrder, type DepthLevel, type DrawAnchor, type DrawItem, EventMarkers, FakeDataFeed, type FeedScheduler, type FillGradient, type FillPoint, type GridAxisStyle, type GridOptions, type GridStyle, type HistogramStyle, INDICATOR_LINE_STYLES, INDICATOR_PLOT_STYLES, INDICATOR_SOURCES, type IPrimitive, IST_OFFSET_SECONDS, type IndexedBar, type IndicatorApi, type IndicatorAttachContext, type IndicatorDescriptor, type IndicatorDrawing, IndicatorDrawings, IndicatorFill, type IndicatorFillOptions, type IndicatorFillSpec, type IndicatorHost, type IndicatorInput, type IndicatorLevel, type IndicatorLevelContext, type IndicatorLineStyle, type IndicatorPlot, type IndicatorSettings, type IndicatorSource, type IndicatorState, type IndicatorStore, type IndicatorValues, type IntervalBucketing, type IntervalDescriptor, InvalidationLevel, type IstParts, type KeymapEntry, LINK_CROSSHAIR_ALPHA, type LateTickPolicy, type LegendField, type LegendStatusData, type LegendStatusLineOptions, type LegendStatusSource, type LegendTitleMode, type LegendValue, type LinePoint, type LinkChart, LinkCrosshair, type LinkDataLayer, LinkGroup, type LinkMemberOptions, type LinkMissingPolicy, type LinkOptions, type LogicalRange, LogoWatermark, type LogoWatermarkOptions, type LtpEvent, type MarkerPosition, type MarkerShape, type MarkerSize, type MarketDepth, type MarketPhase, type MarketPhaseFn, type MaybePromise, type ModeCheck, type OpenAlgoConfig, OpenAlgoDataFeed, type OpenAlgoLiveConfig, OpenAlgoLiveDataFeed, type OpenAlgoTradeConfig, OpenAlgoTradeFeed, type OpenAlgoWsConfig, OpenAlgoWsFeed, type OrderBookSnapshot, type OrderDecodeCode, type OrderDecodeIssue, type OrderDecodeResult, type OrderSide$1 as OrderSide, type OrderType$1 as OrderType, type OriginalTime, PRICE_LEVEL_KINDS, PRICE_SCALE_MODES, Pane, type PaneInvalidation, PaneLegend, type PaneLegendAction, type PaneLegendOptions, type PaneState, type PlaceOrder, type PlotMarginOptions, type PositionSide, type PriceAxisState, type PriceLevelInput, type PriceLevelKind, type PriceLevelQuote, type PriceLevelStyle, type PriceLevelValues, PriceLevels, type PriceLevelsOptions, PriceLine, type PriceLineOptions, type PriceRange, PriceScale, type PriceScaleId, type PriceScaleMode, type PriceScaleOptions, type PriceScaleState, type PrimitiveAnchor, type PrimitiveHit, type PrimitiveHost, type PrimitivePlacement, type PrimitiveRenderContext, type QuarantinedRow, type RawOrder, type RendererEntry, type ReplayChartHost, ReplayController, type ReplayOptions, type ReplayScheduler, type ReplayState, type ReplayViewport, type ResolvedLinkOptions, type RestoreReport, SCALE_FONT_MAX, SCALE_FONT_MIN, type ScaleCanvasOptions, type SeriesApi, type SeriesDataItem, type SeriesId, type SeriesMarker, SeriesMarkers, type SeriesRenderContext, type SeriesState, type SeriesStyle, type SeriesType, type ShortcutListItem, ShortcutManager, type ShortcutManagerOptions, type ShortcutPreset, type ShortcutScope, type ShortcutTriggerEvent, type Size, type SocketFactory, type SocketLike, type SupertrendPoint, type TableCell, type TablePosition, type Tick, TickBarAggregator, type TickBarOptions, type TickCountBucketing, type TickMarkType, type TickTimeframe, TimeNavigator, type TimeNavigatorAction, type TimeNavigatorOptions, TimeScale, type TimeScaleOp, type TimeScaleOptions, type TradeFeed, type TradeMarkerVariant, TradeMarkersPrimitive, type TradingColors, TradingController, type TradingHost, type TradingLineStyle, type TradingLineVariant, type TradingOrder, type TradingOrderSide, type TradingOrderType, type TradingPosition, type TradingSettings, type TradingSyncPayload, type TradingTrade, type UTCSeconds, UnknownIntervalError, type UnsubscribeFn, VERSION, type VolumeBucketing, type VolumeMode, type WatermarkPosition, type Whitespace, type WsClientWarning, type WsControlMessage, type WsMode, type WsState, type ZOrder, type ZonedParts, type ZonedPeriod, addComparison, alignToPrimary, applyChartSettings, atr, autoscaleRange, backoffDelayMs, barCacheKey, barCloseSec, bestHit, bitmapSize, bucketStartOf, calendarPeriodFlags, chartSettingsSchema, clamp, classifyAuthAck, compactVolume, comparisonController, computePriceLevels, conflateBars, conflateItems, conflationGroupSize, createChart, createLinkGroup, darkTheme, dashPattern, decodeOrder, drawLabel, drawShape, effectiveMarkerPx, ema, emaSeries, epochMsToUtcSeconds, eventToCombo, followerIndex, followerRange, formatCombo, formatIstCrosshairLabel, formatIstDate, formatIstTime, formatIstTimeSeconds, formatSubscribe, formatUnsubscribe, formatZonedCrosshairLabel, formatZonedDate, formatZonedTime, formatZonedTimeSeconds, generateBars, getChartType, getIndicator, hasIndicator, indicatorDefaults, indicatorStyleInputs, intervalToSeconds, isKnownInterval, isNewIstDay, isNewZonedDay, isNewZonedMonth, isNewZonedPeriod, isNewZonedQuarter, isNewZonedWeek, isNewZonedYear, isRebasing, isReservedCombo, isTimeBucketed, isValidCombo, isValidTimezone, isWhitespace, istStringToUtcSeconds, lastPriceLevelFromSeriesStyle, lerp, lightTheme, mapHistoryResponse, mapOrder, mapOrderStatus, mapPosition, markerSizePx, mergeBars, nextBucketStart, niceTicks, normalizeCombo, optimalBarWidth, parseCombo, parseMessage, parseTopic, plotStyleKeys, precisionForStep, readChartSettings, readSequence, registerChartType, registerIndicator, registerInterval, registeredChartTypes, registeredIndicators, registeredIntervals, resolveCrosshairStyle, resolveGridStyle, resolveInterval, resolvePlotMargins, resolveScaleStyle, roundToTick, rowTimeToUtcSeconds, rsi, rsiSeries, seriesStyleForLastPriceLevel, sessionStartFlags, sessionStartIndices, snapToDevicePixel, sourceValue, sourceValues, startOfZonedDay, startOfZonedMonth, startOfZonedWeek, supertrend, supertrendSeries, tableOrigin, toBar, trueRange, tryResolveInterval, unregisterInterval, utcSecondsToIstDateString, utcSecondsToIstParts, utcSecondsToZonedDateString, utcSecondsToZonedParts, version, verticalGradient, watermarkRect, withBarCache, zoneOffsetSeconds, zonedDayIndex, zonedStringToUtcSeconds, zonedWallClockToUtcSeconds, zonedWeekIndex };
|
|
7075
|
+
export { ALT_PRESET, type AddSeriesOptions, type AggTick, type AxisChromeOptions, BUILTIN_COMMANDS, type Bar, BarCache, type BarCacheOptions, type BarCacheStats, type BarCacheStore, type BarUpdate, type BarsRequest, type Bucketing, BuySellButtons, type BuySellButtonsOptions, CHART_STATE_VERSION, type CachedBars, type CachedBarsRequest, type CalendarBucketing, type CalendarUnit, CandleBuilder, type CandleBuilderOptions, type CandleStyle, type CandleUpdate, type CanvasLineStyle, type CanvasOptions, Chart, type ChartEvent, type ChartEventOptions, type ChartOptions, type ChartSettingsState, type ChartSettingsTab, type ChartSettingsTabId, type ChartSettingsValue, type ChartSettingsValues, type ChartState, ChartTable, type ChartTableOptions, type ChartTheme, type ComparisonAlignment, type ComparisonChartHost, ComparisonController, type ComparisonControllerOptions, type ComparisonHandle, type ComparisonMode, type ComparisonOptions, type ComparisonPane, type ContextMenuEvent, type ContextMenuTarget, type ContextMenuTargetKind, type CrosshairMoveEvent, type CrosshairOptions, type CrosshairStyle, type CustomShortcut, DEFAULT_CANDLE_BUILDER_OPTIONS, DEFAULT_CANDLE_STYLE, DEFAULT_CHART_TABLE_OPTIONS, DEFAULT_HISTOGRAM_STYLE, DEFAULT_KEYMAP, DEFAULT_PRICE_SCALE_OPTIONS, DEFAULT_THEME, DEFAULT_TIMEZONE, DEFAULT_TIME_NAVIGATOR_OPTIONS, DEFAULT_TIME_SCALE_OPTIONS, DEFAULT_TRADING_COLORS, type DataFeed, DataLayer, type DecodedOrder, type DepthLevel, type DrawAnchor, type DrawItem, EventMarkers, FakeDataFeed, type FeedScheduler, type FillGradient, type FillPoint, type GridAxisStyle, type GridOptions, type GridStyle, type HistogramStyle, INDICATOR_LINE_STYLES, INDICATOR_PLOT_STYLES, INDICATOR_SOURCES, type IPrimitive, IST_OFFSET_SECONDS, type IndexedBar, type IndicatorAlertContext, type IndicatorAlertPayload, type IndicatorAlertSpec, type IndicatorApi, type IndicatorAttachContext, IndicatorBackground, type IndicatorCalcContext, type IndicatorDescriptor, type IndicatorDrawing, IndicatorDrawings, IndicatorFill, type IndicatorFillOptions, type IndicatorFillSpec, type IndicatorHost, type IndicatorInput, type IndicatorLevel, type IndicatorLevelContext, type IndicatorLineStyle, type IndicatorPlot, type IndicatorSettings, type IndicatorSource, type IndicatorState, type IndicatorStore, type IndicatorValues, type IntervalBucketing, type IntervalDescriptor, type IntervalParts, InvalidationLevel, type IstParts, type KeymapEntry, LINK_CROSSHAIR_ALPHA, type LateTickPolicy, type LegendField, type LegendStatusData, type LegendStatusLineOptions, type LegendStatusSource, type LegendTitleMode, type LegendValue, type LinePoint, type LinkChart, LinkCrosshair, type LinkDataLayer, LinkGroup, type LinkMemberOptions, type LinkMissingPolicy, type LinkOptions, type LogicalRange, LogoWatermark, type LogoWatermarkOptions, type LtpEvent, type MarkerPosition, type MarkerShape, type MarkerSize, type MarketDepth, type MarketPhase, type MarketPhaseFn, type MaybePromise, type ModeCheck, type OpenAlgoConfig, OpenAlgoDataFeed, type OpenAlgoLiveConfig, OpenAlgoLiveDataFeed, type OpenAlgoTradeConfig, OpenAlgoTradeFeed, type OpenAlgoWsConfig, OpenAlgoWsFeed, type OrderBookSnapshot, type OrderDecodeCode, type OrderDecodeIssue, type OrderDecodeResult, type OrderSide$1 as OrderSide, type OrderType$1 as OrderType, type OriginalTime, PRICE_LEVEL_KINDS, PRICE_SCALE_MODES, Pane, type PaneInvalidation, PaneLegend, type PaneLegendAction, type PaneLegendOptions, type PaneState, type PickHost, type PickKind, type PlaceOrder, type PlotMarginOptions, type PositionSide, type PriceAxisState, type PriceLevelInput, type PriceLevelKind, type PriceLevelQuote, type PriceLevelStyle, type PriceLevelValues, PriceLevels, type PriceLevelsOptions, PriceLine, type PriceLineOptions, type PriceRange, PriceScale, type PriceScaleId, type PriceScaleMode, type PriceScaleOptions, type PriceScaleState, type PrimitiveAnchor, type PrimitiveHit, type PrimitiveHost, type PrimitivePlacement, type PrimitiveRenderContext, type QuarantinedRow, type RawOrder, type RendererEntry, type ReplayChartHost, ReplayController, type ReplayOptions, type ReplayScheduler, type ReplayState, type ReplayViewport, type ResolvedLinkOptions, type RestoreReport, SCALE_FONT_MAX, SCALE_FONT_MIN, type ScaleCanvasOptions, type SeriesApi, type SeriesDataItem, type SeriesId, type SeriesMarker, SeriesMarkers, type SeriesRenderContext, type SeriesState, type SeriesStyle, type SeriesType, type SessionSpec, type ShortcutListItem, ShortcutManager, type ShortcutManagerOptions, type ShortcutPreset, type ShortcutScope, type ShortcutTriggerEvent, type Size, type SocketFactory, type SocketLike, type SupertrendPoint, type TableCell, type TablePosition, type Tick, TickBarAggregator, type TickBarOptions, type TickCountBucketing, type TickMarkType, type TickTimeframe, TimeNavigator, type TimeNavigatorAction, type TimeNavigatorOptions, TimeScale, type TimeScaleOp, type TimeScaleOptions, type TradeFeed, type TradeMarkerVariant, TradeMarkersPrimitive, type TradingColors, TradingController, type TradingHost, type TradingLineStyle, type TradingLineVariant, type TradingOrder, type TradingOrderSide, type TradingOrderType, type TradingPosition, type TradingSettings, type TradingSyncPayload, type TradingTrade, type UTCSeconds, UnknownIntervalError, type UnsubscribeFn, VERSION, type VolumeBucketing, type VolumeMode, type WatermarkPosition, type Whitespace, type WsClientWarning, type WsControlMessage, type WsMode, type WsState, type ZOrder, type ZonedParts, type ZonedPeriod, addComparison, alignToPrimary, applyChartSettings, atr, autoscaleRange, backoffDelayMs, barCacheKey, barCloseSec, beginPick, bestHit, bitmapSize, bucketStartOf, calendarPeriodFlags, chartSettingsSchema, clamp, classifyAuthAck, compactVolume, comparisonController, computePriceLevels, conflateBars, conflateItems, conflationGroupSize, createChart, createLinkGroup, darkTheme, dashPattern, decodeOrder, drawLabel, drawShape, effectiveMarkerPx, ema, emaSeries, epochMsToUtcSeconds, eventToCombo, followerIndex, followerRange, formatCombo, formatIstCrosshairLabel, formatIstDate, formatIstTime, formatIstTimeSeconds, formatSubscribe, formatUnsubscribe, formatZonedCrosshairLabel, formatZonedDate, formatZonedTime, formatZonedTimeSeconds, fromGradient, generateBars, getChartType, getIndicator, hasIndicator, inSessionAt, indicatorDefaults, indicatorStyleInputs, intervalParts, intervalToSeconds, isDailyInterval, isIntradayInterval, isKnownInterval, isNewIstDay, isNewZonedDay, isNewZonedMonth, isNewZonedPeriod, isNewZonedQuarter, isNewZonedWeek, isNewZonedYear, isRebasing, isReservedCombo, isSecondsInterval, isTickInterval, isTimeBucketed, isValidCombo, isValidTimezone, isWhitespace, istStringToUtcSeconds, lastPriceLevelFromSeriesStyle, lerp, lightTheme, mapHistoryResponse, mapOrder, mapOrderStatus, mapPosition, markerSizePx, mergeBars, nextBucketStart, niceTicks, normalizeCombo, optimalBarWidth, parseCombo, parseMessage, parseSessionSpec, parseTopic, plotStyleKeys, precisionForStep, readChartSettings, readSequence, registerChartType, registerIndicator, registerInterval, registeredChartTypes, registeredIndicators, registeredIntervals, resolveCrosshairStyle, resolveGridStyle, resolveInterval, resolvePlotMargins, resolveScaleStyle, roundToTick, rowTimeToUtcSeconds, rsi, rsiSeries, seriesStyleForLastPriceLevel, sessionFlags, sessionStartFlags, sessionStartIndices, snapToDevicePixel, sourceValue, sourceValues, startOfZonedDay, startOfZonedMonth, startOfZonedWeek, supertrend, supertrendSeries, tableOrigin, toBar, trueRange, tryResolveInterval, unregisterInterval, utcSecondsToIstDateString, utcSecondsToIstParts, utcSecondsToZonedDateString, utcSecondsToZonedParts, version, verticalGradient, watermarkRect, withAlpha, withBarCache, zoneOffsetSeconds, zonedDayIndex, zonedStringToUtcSeconds, zonedWallClockToUtcSeconds, zonedWeekIndex };
|