@tradecanvas/chart 1.53.1 → 1.54.1
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/dist/Chart.d.ts +55 -1
- package/dist/Chart.d.ts.map +1 -1
- package/dist/LayoutSession-Breef1mg.cjs +2 -0
- package/dist/LayoutSession-Breef1mg.cjs.map +1 -0
- package/dist/{LayoutSession-B2WYXhzD.js → LayoutSession-C5aHWgk7.js} +615 -516
- package/dist/LayoutSession-C5aHWgk7.js.map +1 -0
- package/dist/charts/ChartTypeStrategy.d.ts +11 -2
- package/dist/charts/ChartTypeStrategy.d.ts.map +1 -1
- package/dist/{i18n-CwCzRLKW.js → i18n-DGsh8zmc.js} +3 -1
- package/dist/i18n-DGsh8zmc.js.map +1 -0
- package/dist/i18n-GirmlAsM.cjs +2 -0
- package/dist/i18n-GirmlAsM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -72
- package/dist/indicatorLabel.d.ts +3 -2
- package/dist/indicatorLabel.d.ts.map +1 -1
- package/dist/layout/LayoutManager.d.ts +4 -0
- package/dist/layout/LayoutManager.d.ts.map +1 -1
- package/dist/widget/ChartWidget.d.ts +24 -0
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetDataWindow.d.ts +4 -0
- package/dist/widget/WidgetDataWindow.d.ts.map +1 -1
- package/dist/widget/WidgetDrawingSidebar.d.ts +6 -0
- package/dist/widget/WidgetDrawingSidebar.d.ts.map +1 -1
- package/dist/widget/WidgetIndicatorLegend.d.ts +12 -1
- package/dist/widget/WidgetIndicatorLegend.d.ts.map +1 -1
- package/dist/widget/WidgetToolbar.d.ts.map +1 -1
- package/dist/widget/WidgetWatchlist.d.ts.map +1 -1
- package/dist/widget/formControls.d.ts +2 -0
- package/dist/widget/formControls.d.ts.map +1 -1
- package/dist/widget/index.cjs +37 -29
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +1753 -1684
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/legendValues.d.ts +6 -0
- package/dist/widget/legendValues.d.ts.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +1 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +29 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/widgetCompare.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-B2WYXhzD.js.map +0 -1
- package/dist/LayoutSession-DTb03S73.cjs +0 -2
- package/dist/LayoutSession-DTb03S73.cjs.map +0 -1
- package/dist/i18n-CwCzRLKW.js.map +0 -1
- package/dist/i18n-D7B7uFrN.cjs +0 -2
- package/dist/i18n-D7B7uFrN.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, g as l, h as u, i as ee, l as te, m as ne, n as re, o as ie, p as ae, r as oe, s as se, t as ce, u as le, v as ue, w as de, x as fe, y as pe } from "./LayoutSession-
|
|
2
|
-
import { CHART_STYLE_KEYS as me,
|
|
3
|
-
import { AlertManager as
|
|
1
|
+
import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, g as l, h as u, i as ee, l as te, m as ne, n as re, o as ie, p as ae, r as oe, s as se, t as ce, u as le, v as ue, w as de, x as fe, y as pe } from "./LayoutSession-C5aHWgk7.js";
|
|
2
|
+
import { CHART_STYLE_KEYS as me, DARK_PRICE_LIMITS as he, DARK_TERMINAL as ge, DARK_THEME as _e, DARK_THEME as ve, DEFAULT_DRAWING_STYLE as ye, DEFAULT_FONT_FAMILY as be, DEFAULT_RECONNECT as xe, DEFAULT_SIGNAL_STYLE as Se, DEFAULT_STREAM_CONFIG as Ce, DEFAULT_TIMEFRAME_FAVORITES as we, DEFAULT_TRADE_ZONE_STYLE as Te, DEFAULT_TRADING_CONFIG as Ee, HNX_SESSIONS as d, HOSE_SESSIONS as f, LIGHT_PRICE_LIMITS as p, LIGHT_THEME as m, LIGHT_THEME as h, MARKET_CRYPTO as g, MARKET_HNX as _, MARKET_HOSE as v, MARKET_HOSE_ETF as y, MARKET_NYSE as b, MARKET_UPCOM as x, MARKET_VN30F as S, MS_TIME_THRESHOLD as C, PRICE_SOURCES as w, SANS_FONT_FAMILY as T, TC_PALETTE as E, TC_SERIES_COLORS as D, TIMEFRAMES_CRYPTO as De, TIMEFRAMES_FOREX as Oe, TIMEFRAMES_STOCK as ke, UPCOM_SESSIONS as Ae, VN30F_SESSIONS as je, VN_COLORS as Me, VOLUME_ALPHA as Ne, barTimeUnit as Pe, barsAreDaily as Fe, computePriceLimits as Ie, contrastRatio as Le, createVNTheme as Re, formatFraction as ze, formatNumber as Be, formatVND as Ve, formatVolumeLoc as He, fractionTick as Ue, getCurrentSession as We, getLocale as Ge, indicatorSource as Ke, inkOn as qe, isPriceSource as Je, isTimeFrame as Ye, isValidTimeZone as Xe, marketStatus as Ze, normalizeBar as Qe, normalizeBarTime as $e, offsetAt as et, parseIndicatorSource as tt, parseTimeframe as nt, pickBaseTimeframe as rt, priceFormatterFor as it, priceStepAt as at, rankSymbols as ot, readNews as st, readQuote as ct, readableOn as lt, registerLocale as ut, resampleBars as dt, roundToPriceStep as ft, scaleMarketPrices as pt, setLocale as mt, sourcePrice as ht, stepDecimals as gt, symbolTimeZone as _t, t as vt, tickBarCount as yt, timeframeBucketStart as bt, timeframeBucketStart as xt, timeframeToMs as St, vn30fContracts as Ct, vn30fLastTradingDay as wt, volumeColor as Tt, wallToUtc as Et, zoneOffsetMinutes as Dt } from "@tradecanvas/commons";
|
|
3
|
+
import { AlertManager as Ot, Animator as kt, BarCountdown as At, BaseFinanceChart as O, BinanceAdapter as jt, BybitAdapter as Mt, CANDLE_PATTERNS as Nt, ChartLegend as Pt, ChartStateManager as Ft, CoinbaseAdapter as It, CompareRenderer as Lt, CrosshairTooltip as Rt, CurrentPriceLine as zt, DEFAULT_LEGEND_CONFIG as Bt, DEFAULT_MAX_WEBGL_CHARTS as Vt, DEFAULT_SESSION_HOURS as Ht, DataExporter as Ut, DrawingBase as Wt, Easing as Gt, FinanceCrosshair as k, GROUP_HEADER as Kt, INDICATOR_CATEGORIES as qt, IndicatorBase as Jt, IndicatorValueMap as Yt, KEPT_BUCKETS as Xt, KeyboardHandler as Zt, KrakenAdapter as Qt, MAX_ALERT_BARS as $t, MIN_ALERT_BARS as en, MockAdapter as tn, PaperExecutionAdapter as nn, PollingAdapter as rn, RANGE_PRESETS as an, ReplayManager as on, ResamplingAdapter as sn, ReshapeMemo as cn, Screenshot as ln, SessionBreaks as un, SessionShading as dn, SignalMarkerManager as fn, StreamManager as pn, TickAggregator as mn, TickBarAdapter as A, TickBarBuilder as hn, TradeZoneManager as gn, UndoRedoManager as _n, VolumeRenderer as vn, Watermark as yn, WebSocketAdapter as bn, axisTimes as xn, barIndexToTime as Sn, barIndexToX as Cn, barIndexToX as j, canvasMeasure as wn, computeBarLayout as Tn, computeCalendarLayout as En, computeCounterClockLayout as Dn, computeDonutLayout as On, computeHistogramLayout as kn, computeMatrixLayout as An, computeScatterLayout as jn, correlationMatrix as Mn, counterClockPhase as Nn, counterClockPhase as Pn, counterClockPoints as Fn, counterClockPoints as In, detectCandlePatterns as Ln, formatTooltipTime as Rn, histogramBins as zn, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as Bn, isPriceLevelAlert as Vn, layoutGroupedTreemap as Hn, layoutSquarifiedTreemap as Un, layoutUniformGrid as Wn, lttbDownsample as Gn, lttbVisibleIndices as Kn, nearestCounterClockPoint as I, nearestPoint as L, niceScale as qn, priceToY as Jn, priceToYMapper as Yn, priceToYMapper as Xn, rangePresetStart as Zn, renderBarChart as Qn, renderCalendar as $n, renderCounterClock as er, renderDepthChart as tr, renderDonut as nr, renderEquityCurve as rr, renderGauge as ir, renderHeatmap as ar, renderHistogram as or, renderMatrix as sr, renderScatter as cr, renderSparkline as lr, renderWaterfall as ur, servesTimeframe as dr, setMaxWebGLCharts as fr, shownCount as pr, timeToX as mr, timestampToBarIndex as hr, timestampToBarIndex as gr, toHeikinAshi as _r, toKagi as vr, toLineBreak as yr, toPointAndFigure as br, toRangeBars as xr, toRenko as Sr, withResampling as Cr, withTickBars as wr, xToBarIndex as Tr, xToBarIndex as R, xToTime as Er, yToPrice as Dr, yToPrice as Or } from "@tradecanvas/core";
|
|
4
4
|
//#region src/frameworks/syncIndicators.ts
|
|
5
|
-
function
|
|
5
|
+
function kr(e) {
|
|
6
6
|
let { id: t, params: n = {}, position: r = null } = typeof e == "string" ? { id: e } : e;
|
|
7
7
|
return JSON.stringify([
|
|
8
8
|
t,
|
|
@@ -10,9 +10,9 @@ function Cr(e) {
|
|
|
10
10
|
r
|
|
11
11
|
]);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Ar(e, t, n) {
|
|
14
14
|
let r = /* @__PURE__ */ new Map(), i = t.map((e) => {
|
|
15
|
-
let t =
|
|
15
|
+
let t = kr(e), n = r.get(t) ?? 0;
|
|
16
16
|
return r.set(t, n + 1), {
|
|
17
17
|
spec: e,
|
|
18
18
|
key: `${t}#${n}`
|
|
@@ -27,7 +27,7 @@ function wr(e, t, n) {
|
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/frameworks/feedBars.ts
|
|
30
|
-
var
|
|
30
|
+
var jr = 3, z = (e) => ({
|
|
31
31
|
time: e.time,
|
|
32
32
|
open: e.open,
|
|
33
33
|
high: e.high,
|
|
@@ -35,16 +35,16 @@ var Tr = 3, z = (e) => ({
|
|
|
35
35
|
close: e.close,
|
|
36
36
|
volume: e.volume
|
|
37
37
|
}), B = (e) => e.length > 0 ? e[e.length - 1] : null;
|
|
38
|
-
function
|
|
38
|
+
function Mr(e, n, r) {
|
|
39
39
|
for (let i = 0; i < r; i++) if (!t(e[i], n[i])) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Nr(e, t) {
|
|
43
43
|
if (e.isReplayActive()) return !0;
|
|
44
44
|
let n = B(e.getData());
|
|
45
45
|
return t.inReplay ? n?.time === t.last?.time : n === t.shownBar ? n?.time === t.last?.time || !e.isExtendedHoursVisible() : !1;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Pr(e, r, i) {
|
|
48
48
|
let a = [];
|
|
49
49
|
for (let o = 0; o < r.length; o++) {
|
|
50
50
|
let s = e[i + o];
|
|
@@ -55,16 +55,16 @@ function Or(e, r, i) {
|
|
|
55
55
|
}
|
|
56
56
|
return a;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Fr(e, t) {
|
|
59
59
|
if (t.length === 0) return !0;
|
|
60
60
|
if (!e.updateBar) return !1;
|
|
61
61
|
for (let n of t) if (!e.updateBar(n)) return !1;
|
|
62
62
|
return !0;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Ir(e) {
|
|
65
65
|
return e.slice(Math.max(1, e.length - 1 - 3), -1).map(z);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Lr(e, t) {
|
|
68
68
|
let r = [];
|
|
69
69
|
for (let i = t; i < e.length; i++) {
|
|
70
70
|
if (!n(e[i]) || !(e[i].time > e[i - 1].time)) return null;
|
|
@@ -72,42 +72,42 @@ function jr(e, t) {
|
|
|
72
72
|
}
|
|
73
73
|
return r;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Rr(e, r, i) {
|
|
76
76
|
let a = i.length;
|
|
77
|
-
if (a === 0 || !i.last || !n(i.last) || r.length < a || !
|
|
77
|
+
if (a === 0 || !i.last || !n(i.last) || r.length < a || !Nr(e, i)) return !1;
|
|
78
78
|
let o = i.recent ?? [], s = a - 1 - o.length;
|
|
79
|
-
if (r !== i.source && (i.source.length !== a || !
|
|
79
|
+
if (r !== i.source && (i.source.length !== a || !Mr(i.source, r, s))) return !1;
|
|
80
80
|
let c = r[a - 1];
|
|
81
81
|
if (c.time !== i.last.time || !n(c)) return !1;
|
|
82
|
-
let l =
|
|
83
|
-
return !l || !u || !
|
|
82
|
+
let l = Pr(r, o, s), u = Lr(r, a);
|
|
83
|
+
return !l || !u || !Fr(e, l) ? !1 : (t(c, i.last) || e.updateLastBar(z(c)), u.length === 1 ? e.appendBar(u[0]) : u.length > 1 && e.appendBars(u), !0);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
(!n || !
|
|
85
|
+
function zr(e, t, n) {
|
|
86
|
+
(!n || !Rr(e, t, n)) && e.setData(t.map(z));
|
|
87
87
|
let r = t.length > 0 ? z(t[t.length - 1]) : null, i = e.isReplayActive();
|
|
88
88
|
return {
|
|
89
89
|
source: t,
|
|
90
90
|
length: t.length,
|
|
91
91
|
last: r,
|
|
92
|
-
recent:
|
|
92
|
+
recent: Ir(t),
|
|
93
93
|
shownBar: i ? null : B(e.getData()),
|
|
94
94
|
inReplay: i
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/plugins/overlayScale.ts
|
|
99
|
-
function
|
|
100
|
-
let { viewport: t, data: n } = e, r =
|
|
99
|
+
function Br(e) {
|
|
100
|
+
let { viewport: t, data: n } = e, r = Xn(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? gr(e, n) : e;
|
|
101
101
|
return {
|
|
102
102
|
timeToX: (e) => j(s(e), t),
|
|
103
103
|
xToTime: (e) => {
|
|
104
104
|
let r = R(e, t);
|
|
105
|
-
return n.length > 0 ?
|
|
105
|
+
return n.length > 0 ? Sn(r, n) : r;
|
|
106
106
|
},
|
|
107
107
|
indexToX: (e) => j(e, t),
|
|
108
108
|
xToIndex: (e) => R(e, t),
|
|
109
109
|
priceToY: r,
|
|
110
|
-
yToPrice: (e) =>
|
|
110
|
+
yToPrice: (e) => Or(e, t),
|
|
111
111
|
barWidth: t.barWidth,
|
|
112
112
|
visible: o < a ? {
|
|
113
113
|
from: 0,
|
|
@@ -153,7 +153,7 @@ var V = {
|
|
|
153
153
|
cols: 2,
|
|
154
154
|
rows: 3
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, Vr = class {
|
|
157
157
|
root;
|
|
158
158
|
cells = [];
|
|
159
159
|
layout;
|
|
@@ -260,13 +260,13 @@ var V = {
|
|
|
260
260
|
this.cells = [], this.root.remove();
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
},
|
|
263
|
+
}, Hr = class extends O {
|
|
264
264
|
options;
|
|
265
265
|
constructor(e, t) {
|
|
266
266
|
super(e, t.theme), this.options = t, this.requestRender();
|
|
267
267
|
}
|
|
268
268
|
renderChart(e, t, n, r) {
|
|
269
|
-
|
|
269
|
+
lr(e, t, n, this.options, r);
|
|
270
270
|
}
|
|
271
271
|
update(e) {
|
|
272
272
|
this.options = {
|
|
@@ -280,7 +280,7 @@ var V = {
|
|
|
280
280
|
...e
|
|
281
281
|
}, this.requestRender();
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, Ur = class extends O {
|
|
284
284
|
options;
|
|
285
285
|
crosshair = null;
|
|
286
286
|
constructor(e, t) {
|
|
@@ -288,7 +288,7 @@ var V = {
|
|
|
288
288
|
}
|
|
289
289
|
renderChart(e, t, n, r) {
|
|
290
290
|
let i = this.crosshair?.getPosition() ?? null;
|
|
291
|
-
|
|
291
|
+
tr(e, t, n, this.options, r, i);
|
|
292
292
|
}
|
|
293
293
|
update(e) {
|
|
294
294
|
this.options = {
|
|
@@ -313,7 +313,7 @@ var V = {
|
|
|
313
313
|
}
|
|
314
314
|
renderChart(e, t, n, r) {
|
|
315
315
|
let i = this.crosshair?.getPosition() ?? null;
|
|
316
|
-
|
|
316
|
+
rr(e, t, n, this.options, r, i);
|
|
317
317
|
}
|
|
318
318
|
update(e, t) {
|
|
319
319
|
this.options = {
|
|
@@ -360,20 +360,20 @@ var V = {
|
|
|
360
360
|
height: this.height
|
|
361
361
|
}, t = this.options.cellPadding ?? 2;
|
|
362
362
|
if (this.lastLayoutWidth = this.width, this.lastLayoutHeight = this.height, this.cachedGroups = [], this.options.grouped) {
|
|
363
|
-
let { groups: n, cells: r } =
|
|
363
|
+
let { groups: n, cells: r } = Hn(this.currentData.map((e) => ({
|
|
364
364
|
id: e.id,
|
|
365
365
|
weight: e.weight ?? (Math.abs(e.value) || 1),
|
|
366
366
|
group: e.group,
|
|
367
367
|
value: e.value
|
|
368
|
-
})), e, t,
|
|
368
|
+
})), e, t, Kt);
|
|
369
369
|
this.cachedRects = r, this.cachedGroups = n;
|
|
370
370
|
} else if (this.options.weighted) {
|
|
371
371
|
let n = this.currentData.map((e) => ({
|
|
372
372
|
id: e.id,
|
|
373
373
|
weight: e.weight ?? (Math.abs(e.value) || 1)
|
|
374
374
|
}));
|
|
375
|
-
this.cachedRects =
|
|
376
|
-
} else this.cachedRects =
|
|
375
|
+
this.cachedRects = Un(n, e, t);
|
|
376
|
+
} else this.cachedRects = Wn(this.currentData.map((e) => ({ id: e.id })), e, t);
|
|
377
377
|
}
|
|
378
378
|
onCanvasClick(e, t) {
|
|
379
379
|
if (this.options.onCellClick) for (let n of this.cachedRects) {
|
|
@@ -388,7 +388,7 @@ var V = {
|
|
|
388
388
|
renderChart(e, t, n, r) {
|
|
389
389
|
(t !== this.lastLayoutWidth || n !== this.lastLayoutHeight) && this.recomputeLayout();
|
|
390
390
|
let i = this.crosshair?.getPosition() ?? null;
|
|
391
|
-
|
|
391
|
+
ar(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
|
|
392
392
|
}
|
|
393
393
|
update(e) {
|
|
394
394
|
this.currentData = e, this.options = {
|
|
@@ -405,7 +405,7 @@ var V = {
|
|
|
405
405
|
destroy() {
|
|
406
406
|
this.crosshair?.destroy(), this.handleClick && this.canvas.removeEventListener("click", this.handleClick), super.destroy();
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, Wr = class extends O {
|
|
409
409
|
options;
|
|
410
410
|
crosshair = null;
|
|
411
411
|
constructor(e, t) {
|
|
@@ -413,7 +413,7 @@ var V = {
|
|
|
413
413
|
}
|
|
414
414
|
renderChart(e, t, n, r) {
|
|
415
415
|
let i = this.crosshair?.getPosition() ?? null;
|
|
416
|
-
|
|
416
|
+
ur(e, t, n, this.options, r, i);
|
|
417
417
|
}
|
|
418
418
|
update(e) {
|
|
419
419
|
this.options = {
|
|
@@ -430,12 +430,12 @@ var V = {
|
|
|
430
430
|
destroy() {
|
|
431
431
|
this.crosshair?.destroy(), super.destroy();
|
|
432
432
|
}
|
|
433
|
-
},
|
|
434
|
-
function
|
|
433
|
+
}, Gr = 500;
|
|
434
|
+
function Kr(e) {
|
|
435
435
|
let t = 1 - e;
|
|
436
436
|
return 1 - t * t * t;
|
|
437
437
|
}
|
|
438
|
-
var
|
|
438
|
+
var qr = class extends O {
|
|
439
439
|
options;
|
|
440
440
|
currentValue;
|
|
441
441
|
targetValue;
|
|
@@ -446,7 +446,7 @@ var Vr = class extends O {
|
|
|
446
446
|
super(e, t.theme), this.options = t, this.currentValue = t.value, this.targetValue = t.value, this.requestRender();
|
|
447
447
|
}
|
|
448
448
|
renderChart(e, t, n, r) {
|
|
449
|
-
|
|
449
|
+
ir(e, t, n, this.options, r, this.currentValue);
|
|
450
450
|
}
|
|
451
451
|
setValue(e) {
|
|
452
452
|
if (this.options.animate === !1) {
|
|
@@ -476,7 +476,7 @@ var Vr = class extends O {
|
|
|
476
476
|
if (this.animationFrameId !== null) return;
|
|
477
477
|
let e = () => {
|
|
478
478
|
if (this.animationFrameId = null, this.animationStart === null) return;
|
|
479
|
-
let t = this.options.animationDuration ??
|
|
479
|
+
let t = this.options.animationDuration ?? Gr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Kr(r);
|
|
480
480
|
this.currentValue = this.animationFrom + (this.targetValue - this.animationFrom) * i, this.requestRender(), r < 1 ? this.animationFrameId = requestAnimationFrame(e) : (this.currentValue = this.targetValue, this.animationStart = null);
|
|
481
481
|
};
|
|
482
482
|
this.animationFrameId = requestAnimationFrame(e);
|
|
@@ -506,7 +506,7 @@ var Vr = class extends O {
|
|
|
506
506
|
}
|
|
507
507
|
renderChart(e, t, n, r) {
|
|
508
508
|
let i = this.options.crosshair === !1 ? null : this.crosshair.getPosition(), a = this.layoutFor;
|
|
509
|
-
(!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r,
|
|
509
|
+
(!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, wn(e, r)), this.layoutFor = {
|
|
510
510
|
options: this.options,
|
|
511
511
|
width: t,
|
|
512
512
|
height: n,
|
|
@@ -525,12 +525,12 @@ var Vr = class extends O {
|
|
|
525
525
|
destroy() {
|
|
526
526
|
this.crosshair.destroy(), this.canvas.removeEventListener("click", this.onClick), this.canvas.removeEventListener("pointermove", this.onMove), super.destroy();
|
|
527
527
|
}
|
|
528
|
-
},
|
|
528
|
+
}, Jr = class extends W {
|
|
529
529
|
compute(e, t, n, r) {
|
|
530
|
-
return
|
|
530
|
+
return Tn(this.options, e, t, n, r);
|
|
531
531
|
}
|
|
532
532
|
draw(e, t, n, r, i, a) {
|
|
533
|
-
|
|
533
|
+
Qn(e, t, n, this.options, r, i, a);
|
|
534
534
|
}
|
|
535
535
|
describe() {
|
|
536
536
|
return `Bar chart of ${this.options.series.map((e) => e.name).join(", ")}, ${this.options.categories.length} categories`;
|
|
@@ -556,12 +556,12 @@ var Vr = class extends O {
|
|
|
556
556
|
series: t
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
-
},
|
|
559
|
+
}, Yr = class extends W {
|
|
560
560
|
compute(e, t, n, r) {
|
|
561
|
-
return
|
|
561
|
+
return On(this.options, e, t, n, r);
|
|
562
562
|
}
|
|
563
563
|
draw(e, t, n, r, i, a) {
|
|
564
|
-
|
|
564
|
+
nr(e, t, n, this.options, r, i, a);
|
|
565
565
|
}
|
|
566
566
|
describe() {
|
|
567
567
|
let e = this.options.data.filter((e) => Number.isFinite(e.value) && e.value > 0).map((e) => e.label).join(", ");
|
|
@@ -580,12 +580,12 @@ var Vr = class extends O {
|
|
|
580
580
|
update(e) {
|
|
581
581
|
this.setOptions({ data: e });
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, Xr = class extends W {
|
|
584
584
|
compute(e, t, n, r) {
|
|
585
|
-
return
|
|
585
|
+
return jn(this.options, e, t, n, r);
|
|
586
586
|
}
|
|
587
587
|
draw(e, t, n, r, i, a) {
|
|
588
|
-
|
|
588
|
+
cr(e, t, n, this.options, r, i, a);
|
|
589
589
|
}
|
|
590
590
|
describe() {
|
|
591
591
|
let e = this.options.series.reduce((e, t) => e + t.points.length, 0);
|
|
@@ -604,12 +604,12 @@ var Vr = class extends O {
|
|
|
604
604
|
update(e) {
|
|
605
605
|
this.setOptions({ series: e });
|
|
606
606
|
}
|
|
607
|
-
},
|
|
607
|
+
}, Zr = class extends W {
|
|
608
608
|
compute(e, t, n, r) {
|
|
609
|
-
return
|
|
609
|
+
return kn(this.options, e, t, n, r);
|
|
610
610
|
}
|
|
611
611
|
draw(e, t, n, r, i, a) {
|
|
612
|
-
|
|
612
|
+
or(e, t, n, this.options, r, i, a);
|
|
613
613
|
}
|
|
614
614
|
describe() {
|
|
615
615
|
return `Histogram of ${this.options.values.length} values`;
|
|
@@ -624,12 +624,12 @@ var Vr = class extends O {
|
|
|
624
624
|
update(e) {
|
|
625
625
|
this.setOptions({ values: e });
|
|
626
626
|
}
|
|
627
|
-
},
|
|
627
|
+
}, Qr = class extends W {
|
|
628
628
|
compute(e, t, n, r) {
|
|
629
|
-
return
|
|
629
|
+
return En(this.options, e, t, n, r);
|
|
630
630
|
}
|
|
631
631
|
draw(e, t, n, r, i, a) {
|
|
632
|
-
|
|
632
|
+
$n(e, t, n, this.options, r, i, a);
|
|
633
633
|
}
|
|
634
634
|
describe() {
|
|
635
635
|
let e = this.options.data.map((e) => e.date).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e)).sort(), t = this.options.from ?? e[0], n = this.options.to ?? e[e.length - 1];
|
|
@@ -648,12 +648,12 @@ var Vr = class extends O {
|
|
|
648
648
|
update(e) {
|
|
649
649
|
this.setOptions({ data: e });
|
|
650
650
|
}
|
|
651
|
-
}, G = 12,
|
|
651
|
+
}, G = 12, $r = class extends W {
|
|
652
652
|
compute(e, t, n, r) {
|
|
653
|
-
return
|
|
653
|
+
return An(this.options, e, t, n, r);
|
|
654
654
|
}
|
|
655
655
|
draw(e, t, n, r, i, a) {
|
|
656
|
-
|
|
656
|
+
sr(e, t, n, this.options, r, i, a);
|
|
657
657
|
}
|
|
658
658
|
describe() {
|
|
659
659
|
let { rows: e, columns: t } = this.options;
|
|
@@ -672,12 +672,12 @@ var Vr = class extends O {
|
|
|
672
672
|
update(e) {
|
|
673
673
|
this.setOptions({ values: e });
|
|
674
674
|
}
|
|
675
|
-
},
|
|
675
|
+
}, ei = class extends W {
|
|
676
676
|
compute(e, t, n, r) {
|
|
677
|
-
return
|
|
677
|
+
return Dn(this.options, e, t, n, r);
|
|
678
678
|
}
|
|
679
679
|
draw(e, t, n, r, i, a) {
|
|
680
|
-
|
|
680
|
+
er(e, t, n, this.options, r, i, a);
|
|
681
681
|
}
|
|
682
682
|
describe() {
|
|
683
683
|
return `Counter-clock chart of price against volume, ${this.options.period ?? 25}-bar averages`;
|
|
@@ -693,12 +693,12 @@ var Vr = class extends O {
|
|
|
693
693
|
r && this.options.onPointClick?.(r.point);
|
|
694
694
|
}
|
|
695
695
|
getPhase() {
|
|
696
|
-
return
|
|
696
|
+
return Pn(In(this.options.data, this.options.period ?? 25, pr(this.options)));
|
|
697
697
|
}
|
|
698
698
|
update(e) {
|
|
699
699
|
this.setOptions({ data: e });
|
|
700
700
|
}
|
|
701
|
-
},
|
|
701
|
+
}, ti = [
|
|
702
702
|
"Jan",
|
|
703
703
|
"Feb",
|
|
704
704
|
"Mar",
|
|
@@ -733,7 +733,7 @@ function J(e) {
|
|
|
733
733
|
if (e.length === 0) return [];
|
|
734
734
|
let t = [];
|
|
735
735
|
for (let n of e) {
|
|
736
|
-
let e =
|
|
736
|
+
let e = xt(n.time, "1M"), r = t[t.length - 1];
|
|
737
737
|
r && r.key === e ? r.close = n.equity : t.push({
|
|
738
738
|
key: e,
|
|
739
739
|
close: n.equity
|
|
@@ -746,7 +746,7 @@ function J(e) {
|
|
|
746
746
|
let a = new Date(e.key), o = a.getUTCFullYear(), s = a.getUTCMonth();
|
|
747
747
|
r.push({
|
|
748
748
|
id: `${o}-${String(s + 1).padStart(2, "0")}`,
|
|
749
|
-
label:
|
|
749
|
+
label: ti[s],
|
|
750
750
|
group: String(o),
|
|
751
751
|
value: i
|
|
752
752
|
});
|
|
@@ -807,9 +807,9 @@ function Q(e) {
|
|
|
807
807
|
//#endregion
|
|
808
808
|
//#region src/finance/PerformanceDashboard.ts
|
|
809
809
|
function $(e) {
|
|
810
|
-
return !e || e === "dark" ?
|
|
810
|
+
return !e || e === "dark" ? ve : e === "light" ? h : e;
|
|
811
811
|
}
|
|
812
|
-
var
|
|
812
|
+
var ni = class {
|
|
813
813
|
options;
|
|
814
814
|
theme;
|
|
815
815
|
root;
|
|
@@ -958,6 +958,6 @@ var Xr = class {
|
|
|
958
958
|
}
|
|
959
959
|
};
|
|
960
960
|
//#endregion
|
|
961
|
-
export {
|
|
961
|
+
export { Ot as AlertManager, kt as Animator, Jr as BarChart, At as BarCountdown, jt as BinanceAdapter, Mt as BybitAdapter, Nt as CANDLE_PATTERNS, me as CHART_STYLE_KEYS, jr as CORRECTABLE_BARS, Qr as CalendarChart, c as Chart, Vr as ChartGrid, Pt as ChartLegend, Ft as ChartStateManager, It as CoinbaseAdapter, Lt as CompareRenderer, ei as CounterClockChart, Rt as CrosshairTooltip, zt as CurrentPriceLine, he as DARK_PRICE_LIMITS, ge as DARK_TERMINAL, _e as DARK_THEME, ye as DEFAULT_DRAWING_STYLE, be as DEFAULT_FONT_FAMILY, e as DEFAULT_HISTORY_PAGE_SIZE, Bt as DEFAULT_LEGEND_CONFIG, Vt as DEFAULT_MAX_WEBGL_CHARTS, xe as DEFAULT_RECONNECT, Ht as DEFAULT_SESSION_HOURS, Se as DEFAULT_SIGNAL_STYLE, Ce as DEFAULT_STREAM_CONFIG, we as DEFAULT_TIMEFRAME_FAVORITES, Te as DEFAULT_TRADE_ZONE_STYLE, Ee as DEFAULT_TRADING_CONFIG, Ut as DataExporter, i as DataManager, Ur as DepthChart, Yr as DonutChart, ie as DragDropImporter, Wt as DrawingBase, te as EXCHANGE_TIMEZONE, le as EXCHANGE_TIME_ZONE, Gt as Easing, H as EquityCurveChart, qr as GaugeChart, de as HISTORY_RETRY_MS, d as HNX_SESSIONS, f as HOSE_SESSIONS, U as HeatmapChart, Zr as HistogramChart, qt as INDICATOR_CATEGORIES, Jt as IndicatorBase, Yt as IndicatorValueMap, Xt as KEPT_BUCKETS, Zt as KeyboardHandler, Qt as KrakenAdapter, p as LIGHT_PRICE_LIMITS, m as LIGHT_THEME, fe as LayoutManager, ce as LayoutSession, g as MARKET_CRYPTO, _ as MARKET_HNX, v as MARKET_HOSE, y as MARKET_HOSE_ETF, b as MARKET_NYSE, x as MARKET_UPCOM, S as MARKET_VN30F, $t as MAX_ALERT_BARS, re as MAX_LAYOUT_NAME, en as MIN_ALERT_BARS, C as MS_TIME_THRESHOLD, $r as MatrixChart, tn as MockAdapter, ue as PLUGIN_API_VERSION, w as PRICE_SOURCES, nn as PaperExecutionAdapter, ni as PerformanceDashboard, ae as PluginManager, rn as PollingAdapter, an as RANGE_PRESETS, on as ReplayManager, sn as ResamplingAdapter, cn as ReshapeMemo, T as SANS_FONT_FAMILY, Xr as ScatterChart, ln as Screenshot, un as SessionBreaks, dn as SessionShading, fn as SignalMarkerManager, Hr as SparklineChart, pn as StreamManager, E as TC_PALETTE, D as TC_SERIES_COLORS, De as TIMEFRAMES_CRYPTO, Oe as TIMEFRAMES_FOREX, ke as TIMEFRAMES_STOCK, r as ThemeManager, mn as TickAggregator, A as TickBarAdapter, hn as TickBarBuilder, gn as TradeZoneManager, Ae as UPCOM_SESSIONS, _n as UndoRedoManager, je as VN30F_SESSIONS, Me as VN_COLORS, Ne as VOLUME_ALPHA, vn as VolumeRenderer, Wr as WaterfallChart, yn as Watermark, bn as WebSocketAdapter, xn as axisTimes, Cn as barIndexToX, Pe as barTimeUnit, Fe as barsAreDaily, oe as cleanLayoutName, ne as clearGlobalPlugins, q as computeDrawdownCurve, J as computeMonthlyReturns, Ie as computePriceLimits, Le as contrastRatio, Mn as correlationMatrix, Nn as counterClockPhase, Fn as counterClockPoints, Re as createVNTheme, Ln as detectCandlePatterns, zr as feedBars, ze as formatFraction, Be as formatNumber, Rn as formatTooltipTime, Ve as formatVND, He as formatVolumeLoc, Ue as fractionTick, We as getCurrentSession, u as getGlobalPlugins, Ge as getLocale, zn as histogramBins, Bn as indicatorCategory, Ke as indicatorSource, qe as inkOn, Vn as isPriceLevelAlert, Je as isPriceSource, Ye as isTimeFrame, Xe as isValidTimeZone, ee as localStorageLayouts, Gn as lttbDownsample, Kn as lttbVisibleIndices, Ze as marketStatus, o as memoryLayouts, qn as niceScale, Qe as normalizeBar, $e as normalizeBarTime, et as offsetAt, Br as overlayScale, pe as overlaysForLayer, tt as parseIndicatorSource, se as parseOHLCV, nt as parseTimeframe, rt as pickBaseTimeframe, s as pluginKey, it as priceFormatterFor, at as priceStepAt, Jn as priceToY, Yn as priceToYMapper, Zn as rangePresetStart, ot as rankSymbols, st as readNews, ct as readQuote, lt as readableOn, ut as registerLocale, l as registerPlugin, dt as resampleBars, ft as roundToPriceStep, pt as scaleMarketPrices, Q as selectKeyStats, dr as servesTimeframe, mt as setLocale, fr as setMaxWebGLCharts, ht as sourcePrice, gt as stepDecimals, _t as symbolTimeZone, Ar as syncIndicators, vt as t, yt as tickBarCount, mr as timeToX, bt as timeframeBucketStart, St as timeframeToMs, hr as timestampToBarIndex, K as toEquityPoints, _r as toHeikinAshi, vr as toKagi, yr as toLineBreak, br as toPointAndFigure, xr as toRangeBars, Sr as toRenko, a as unregisterPlugin, Ct as vn30fContracts, wt as vn30fLastTradingDay, Tt as volumeColor, Et as wallToUtc, Cr as withResampling, wr as withTickBars, Tr as xToBarIndex, Er as xToTime, Dr as yToPrice, Dt as zoneOffsetMinutes };
|
|
962
962
|
|
|
963
963
|
//# sourceMappingURL=index.js.map
|
package/dist/indicatorLabel.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* "EMA 20", "BB 20 2", "MACD 12 26 9": the short name (`shortName`, else the
|
|
3
|
-
* id in capitals) plus up to three numeric parameters
|
|
4
|
-
* order, so two instances of the same indicator
|
|
3
|
+
* id in capitals) plus up to three numeric parameters (four for Stochastic
|
|
4
|
+
* RSI), in the indicator's own order, so two instances of the same indicator
|
|
5
|
+
* can be told apart.
|
|
5
6
|
*/
|
|
6
7
|
export declare function indicatorChipLabel(id: string, params: Record<string, unknown>, defaults?: Record<string, unknown>, shortName?: string): string;
|
|
7
8
|
//# sourceMappingURL=indicatorLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicatorLabel.d.ts","sourceRoot":"","sources":["../src/indicatorLabel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"indicatorLabel.d.ts","sourceRoot":"","sources":["../src/indicatorLabel.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAWR"}
|
|
@@ -12,6 +12,8 @@ export declare class LayoutManager {
|
|
|
12
12
|
private leftAxisWidth;
|
|
13
13
|
/** The pane that takes the room of the others (they fold to their headers), or null. */
|
|
14
14
|
private maximized;
|
|
15
|
+
/** Panes set aside: kept with their size and place, but not laid out (nothing drawn in them on this chart type). */
|
|
16
|
+
private aside;
|
|
15
17
|
resize(width: number, height: number): void;
|
|
16
18
|
addPanel(instanceId: string, position?: PanelPosition, size?: number): void;
|
|
17
19
|
/** Hand a pane to another indicator, keeping its place and size. */
|
|
@@ -62,6 +64,8 @@ export declare class LayoutManager {
|
|
|
62
64
|
/** Width reserved left of the plot for the left price scale (0 = none). */
|
|
63
65
|
setLeftAxisWidth(width: number): void;
|
|
64
66
|
getPanels(): PanelConfig[];
|
|
67
|
+
/** Set the panes laid out as if they weren't there, and bring back the others; true when that changed any. */
|
|
68
|
+
setPanelsAside(ids: ReadonlySet<string>): boolean;
|
|
65
69
|
resolve(): ResolvedLayout;
|
|
66
70
|
getMainChartRect(): Rect;
|
|
67
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutManager.d.ts","sourceRoot":"","sources":["../../src/layout/LayoutManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAA8B,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAKzH,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,gEAAgE;AAChE,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAIjD,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,cAAc,CAAoB;IAC1C,2DAA2D;IAC3D,OAAO,CAAC,aAAa,CAAK;IAC1B,wFAAwF;IACxF,OAAO,CAAC,SAAS,CAAuB;
|
|
1
|
+
{"version":3,"file":"LayoutManager.d.ts","sourceRoot":"","sources":["../../src/layout/LayoutManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAA8B,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAKzH,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,gEAAgE;AAChE,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAIjD,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,cAAc,CAAoB;IAC1C,2DAA2D;IAC3D,OAAO,CAAC,aAAa,CAAK;IAC1B,wFAAwF;IACxF,OAAO,CAAC,SAAS,CAAuB;IACxC,oHAAoH;IACpH,OAAO,CAAC,KAAK,CAAkC;IAE/C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAK3C,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAE,aAAwB,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAarF,oEAAoE;IACpE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ/C,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKrC;;;;OAIG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO;IASlE,oEAAoE;IACpE,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI7C,iEAAiE;IACjE,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAMlD,8FAA8F;IAC9F,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAmBzG,4DAA4D;IAC5D,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO;IAOxD;;;OAGG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO;IASrD,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAIlC;;;OAGG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO;IAgBrD,6FAA6F;IAC7F,WAAW,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAQzC,yEAAyE;IACzE,OAAO,CAAC,SAAS;IAMjB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAkBnE;;;;OAIG;IACH,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAWpD,iEAAiE;IACjE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAItC,2EAA2E;IAC3E,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrC,SAAS,IAAI,WAAW,EAAE;IAI1B,8GAA8G;IAC9G,cAAc,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO;IAMjD,OAAO,IAAI,cAAc;IAiGzB,gBAAgB,IAAI,IAAI;CAGzB"}
|
|
@@ -95,8 +95,13 @@ export declare class ChartWidget {
|
|
|
95
95
|
private depthLadder;
|
|
96
96
|
private dataWindow;
|
|
97
97
|
private lastHoverIndex;
|
|
98
|
+
/** The bar the crosshair reported at it: on Renko and the like a brick, not a data bar. */
|
|
99
|
+
private lastHoverBar;
|
|
100
|
+
private lastHoverPrevClose;
|
|
98
101
|
/** The bar the on-chart indicator values are read at; null = the latest. */
|
|
99
102
|
private legendHoverIndex;
|
|
103
|
+
/** The pointer's own crosshair is on this chart: it wins over one mirrored from another chart. */
|
|
104
|
+
private pointerOnChart;
|
|
100
105
|
private favoritesStore;
|
|
101
106
|
/** The indicators starred in the indicators dialog. */
|
|
102
107
|
private indicatorFavorites;
|
|
@@ -601,6 +606,12 @@ export declare class ChartWidget {
|
|
|
601
606
|
setDepth(depth: DepthData | null): void;
|
|
602
607
|
/** Begin a draggable bracket order at the latest price and show the action bar. */
|
|
603
608
|
startBracket(side: 'buy' | 'sell'): void;
|
|
609
|
+
/**
|
|
610
|
+
* The bar under the pointer and the close before it. On candles the data
|
|
611
|
+
* bar at the index, as it is now (a live tick moves it); on Renko and the
|
|
612
|
+
* like the brick the crosshair reported, whose index is not the data's.
|
|
613
|
+
*/
|
|
614
|
+
private hoveredBar;
|
|
604
615
|
private buildDataWindowModel;
|
|
605
616
|
private toggleDataWindow;
|
|
606
617
|
private toggleObjects;
|
|
@@ -747,7 +758,18 @@ export declare class ChartWidget {
|
|
|
747
758
|
private formatMoney;
|
|
748
759
|
/** A plain figure to `decimals`, in the number locale. */
|
|
749
760
|
private formatNumber;
|
|
761
|
+
/**
|
|
762
|
+
* `scale`: the price whose size picks the decimals when nothing sets them
|
|
763
|
+
* (a change takes its bar's, so it reads in the decimals its prices do).
|
|
764
|
+
*/
|
|
750
765
|
private formatAlertPrice;
|
|
766
|
+
/**
|
|
767
|
+
* An indicator's value as the legend and the data window write it: a line
|
|
768
|
+
* in the chart's prices as the chart writes them; one in a pane of its own,
|
|
769
|
+
* on a scale of its own or of another symbol in the decimals its size
|
|
770
|
+
* calls for; both in the number locale.
|
|
771
|
+
*/
|
|
772
|
+
private indicatorValueText;
|
|
751
773
|
/** Whether the market or the symbol sets the decimals prices show (the market's win, as on the chart). */
|
|
752
774
|
private chartSetsDecimals;
|
|
753
775
|
/** The user picked a chart type: applied, and undoable. */
|
|
@@ -930,6 +952,8 @@ export declare class ChartWidget {
|
|
|
930
952
|
* the chart: the bar's height changes with its rows and its words.
|
|
931
953
|
*/
|
|
932
954
|
private liftOverReplayBar;
|
|
955
|
+
/** Where the plot starts in the body, for the phone's drawing button to sit over it. */
|
|
956
|
+
private placeDrawingButton;
|
|
933
957
|
private bodyEl;
|
|
934
958
|
/**
|
|
935
959
|
* Where the replay is, as the readout says it: the step's open time in
|