@luxalgo/vela 0.9.0 → 0.9.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/dist/{DataProvider-zJGp58kb.d.cts → DataProvider-B5i0_yY4.d.cts} +1 -1
- package/dist/{DataProvider-BGlB1zSc.d.ts → DataProvider-CPFgSyAm.d.ts} +1 -1
- package/dist/{chunk-4WAHYL7Y.js → chunk-4AMWSBOW.js} +33 -2
- package/dist/{chunk-YRCL3WMD.js → chunk-Q7POFYNE.js} +7 -1
- package/dist/{chunk-XIRSR3D6.js → chunk-W4WTHJFA.js} +50 -31
- package/dist/{contributions-BjefWpxQ.d.ts → contributions-BDx47Vk0.d.ts} +11 -3
- package/dist/{contributions-CpCJisTC.d.cts → contributions-BiF6lVvJ.d.cts} +11 -3
- package/dist/index.cjs +42 -22
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +2 -2
- package/dist/{keymap-UolhuXH1.d.ts → keymap-C48ughm6.d.ts} +1 -1
- package/dist/{keymap-B9_FLhfJ.d.cts → keymap-W0hiajU6.d.cts} +1 -1
- package/dist/locales/ar.cjs +2 -0
- package/dist/locales/ar.d.cts +1 -1
- package/dist/locales/ar.d.ts +1 -1
- package/dist/locales/ar.js +2 -0
- package/dist/locales/de.cjs +2 -0
- package/dist/locales/de.d.cts +1 -1
- package/dist/locales/de.d.ts +1 -1
- package/dist/locales/de.js +2 -0
- package/dist/locales/en.cjs +2 -0
- package/dist/locales/en.d.cts +1 -1
- package/dist/locales/en.d.ts +1 -1
- package/dist/locales/en.js +2 -0
- package/dist/locales/es.cjs +2 -0
- package/dist/locales/es.d.cts +1 -1
- package/dist/locales/es.d.ts +1 -1
- package/dist/locales/es.js +2 -0
- package/dist/locales/fr.cjs +2 -0
- package/dist/locales/fr.d.cts +1 -1
- package/dist/locales/fr.d.ts +1 -1
- package/dist/locales/fr.js +2 -0
- package/dist/locales/he.cjs +2 -0
- package/dist/locales/he.d.cts +1 -1
- package/dist/locales/he.d.ts +1 -1
- package/dist/locales/he.js +2 -0
- package/dist/locales/hi.cjs +2 -0
- package/dist/locales/hi.d.cts +1 -1
- package/dist/locales/hi.d.ts +1 -1
- package/dist/locales/hi.js +2 -0
- package/dist/locales/id.cjs +2 -0
- package/dist/locales/id.d.cts +1 -1
- package/dist/locales/id.d.ts +1 -1
- package/dist/locales/id.js +2 -0
- package/dist/locales/it.cjs +2 -0
- package/dist/locales/it.d.cts +1 -1
- package/dist/locales/it.d.ts +1 -1
- package/dist/locales/it.js +2 -0
- package/dist/locales/ja.cjs +2 -0
- package/dist/locales/ja.d.cts +1 -1
- package/dist/locales/ja.d.ts +1 -1
- package/dist/locales/ja.js +2 -0
- package/dist/locales/ko.cjs +2 -0
- package/dist/locales/ko.d.cts +1 -1
- package/dist/locales/ko.d.ts +1 -1
- package/dist/locales/ko.js +2 -0
- package/dist/locales/ms.cjs +2 -0
- package/dist/locales/ms.d.cts +1 -1
- package/dist/locales/ms.d.ts +1 -1
- package/dist/locales/ms.js +2 -0
- package/dist/locales/pl.cjs +2 -0
- package/dist/locales/pl.d.cts +1 -1
- package/dist/locales/pl.d.ts +1 -1
- package/dist/locales/pl.js +2 -0
- package/dist/locales/pt-BR.cjs +2 -0
- package/dist/locales/pt-BR.d.cts +1 -1
- package/dist/locales/pt-BR.d.ts +1 -1
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru.cjs +2 -0
- package/dist/locales/ru.d.cts +1 -1
- package/dist/locales/ru.d.ts +1 -1
- package/dist/locales/ru.js +2 -0
- package/dist/locales/th.cjs +2 -0
- package/dist/locales/th.d.cts +1 -1
- package/dist/locales/th.d.ts +1 -1
- package/dist/locales/th.js +2 -0
- package/dist/locales/tr.cjs +2 -0
- package/dist/locales/tr.d.cts +1 -1
- package/dist/locales/tr.d.ts +1 -1
- package/dist/locales/tr.js +2 -0
- package/dist/locales/vi.cjs +2 -0
- package/dist/locales/vi.d.cts +1 -1
- package/dist/locales/vi.d.ts +1 -1
- package/dist/locales/vi.js +2 -0
- package/dist/locales/zh-Hans.cjs +2 -0
- package/dist/locales/zh-Hans.d.cts +1 -1
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +2 -0
- package/dist/locales/zh-Hant.cjs +2 -0
- package/dist/locales/zh-Hant.d.cts +1 -1
- package/dist/locales/zh-Hant.d.ts +1 -1
- package/dist/locales/zh-Hant.js +2 -0
- package/dist/{options-D4L3_hv_.d.ts → options-B7aL1pbf.d.ts} +1 -1
- package/dist/{options-CpegHml_.d.cts → options-I1H2HDWw.d.cts} +1 -1
- package/dist/{plugin-DTmulpKM.d.ts → plugin-CbSGKQLB.d.ts} +6 -6
- package/dist/{plugin-DpNp4aBi.d.cts → plugin-ZknmqQqo.d.cts} +6 -6
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.d.cts +7 -7
- package/dist/plugin.d.ts +7 -7
- package/dist/plugin.js +1 -1
- package/dist/providers/binance.d.cts +3 -3
- package/dist/providers/binance.d.ts +3 -3
- package/dist/providers/coinbase.d.cts +3 -3
- package/dist/providers/coinbase.d.ts +3 -3
- package/dist/providers/hyperliquid.d.cts +3 -3
- package/dist/providers/hyperliquid.d.ts +3 -3
- package/dist/{side-panel-CYmH1Opm.d.ts → side-panel-BEQJqSjR.d.cts} +2 -1
- package/dist/{side-panel-BqUnpfev.d.cts → side-panel-Ud0SBAnE.d.ts} +2 -1
- package/dist/{statusline-model-pGs3Xvp-.d.cts → statusline-model-CwYMw_Yl.d.cts} +7 -4
- package/dist/{statusline-model-C3yIY9WE.d.ts → statusline-model-ny7GXRuS.d.ts} +7 -4
- package/dist/{types-BlrXRLIR.d.cts → types-Bwf63xGI.d.cts} +4 -1
- package/dist/{types-BlrXRLIR.d.ts → types-Bwf63xGI.d.ts} +4 -1
- package/dist/ui.d.cts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/vela.global.js +42 -22
- package/dist/vela.global.min.js +55 -55
- package/dist/widget.cjs +82 -26
- package/dist/widget.d.cts +10 -10
- package/dist/widget.d.ts +10 -10
- package/dist/widget.js +4 -4
- package/dist/workspace.cjs +82 -26
- package/dist/workspace.d.cts +7 -7
- package/dist/workspace.d.ts +7 -7
- package/dist/workspace.js +3 -3
- package/package.json +1 -1
package/dist/vela.global.js
CHANGED
|
@@ -9847,7 +9847,8 @@ var Vela = (function (exports) {
|
|
|
9847
9847
|
symbol: this.config.market.symbol ?? "TEST",
|
|
9848
9848
|
timeframe: this.config.market.timeframe ?? "60",
|
|
9849
9849
|
symbolInfo: this.feed.symbolInfo?.(this.config.market),
|
|
9850
|
-
chartStyle: this.priceStyle
|
|
9850
|
+
chartStyle: this.priceStyle,
|
|
9851
|
+
session: this.config.market.session
|
|
9851
9852
|
};
|
|
9852
9853
|
}
|
|
9853
9854
|
/**
|
|
@@ -27011,6 +27012,7 @@ ${overlayScrollbarCss(".vela-dialog.vela-ind-dialog *", 9)}
|
|
|
27011
27012
|
mode: isScaleMode(ps.mode) ? ps.mode : base.priceScale.mode,
|
|
27012
27013
|
log: isBool(ps.log) ? ps.log : base.priceScale.log,
|
|
27013
27014
|
invert: isBool(ps.invert) ? ps.invert : base.priceScale.invert,
|
|
27015
|
+
priceOnly: isBool(ps.priceOnly) ? ps.priceOnly : base.priceScale.priceOnly,
|
|
27014
27016
|
borderColor: isColor(ps.borderColor) ? ps.borderColor : base.priceScale.borderColor,
|
|
27015
27017
|
labelsVisible: isBool(ps.labelsVisible) ? ps.labelsVisible : base.priceScale.labelsVisible,
|
|
27016
27018
|
currentPriceLine: isBool(ps.currentPriceLine) ? ps.currentPriceLine : base.priceScale.currentPriceLine,
|
|
@@ -29419,6 +29421,9 @@ void main() {
|
|
|
29419
29421
|
this.logScale = false;
|
|
29420
29422
|
/** Inverted price axis on the price pane (high at the bottom). Study panes carry their own. */
|
|
29421
29423
|
this.invertScale = false;
|
|
29424
|
+
/** The price pane's autoscale fits the bars alone: indicator plots, their price lines
|
|
29425
|
+
* and Pine drawings paint where they fall instead of widening the window. */
|
|
29426
|
+
this.scalePriceOnly = false;
|
|
29422
29427
|
/** Exchange tick size for the active symbol (e.g. 0.01), when known. Drives the
|
|
29423
29428
|
* price-axis decimals — the instrument's true precision instead of the zoom-derived
|
|
29424
29429
|
* formula. Undefined until symbol metadata loads (the formula is the fallback). */
|
|
@@ -31117,6 +31122,18 @@ void main() {
|
|
|
31117
31122
|
}
|
|
31118
31123
|
};
|
|
31119
31124
|
|
|
31125
|
+
// src/renderers/native/chrome/tz.ts
|
|
31126
|
+
var DAY_MS3 = 864e5;
|
|
31127
|
+
function displayZone(timeZone, barIntervalMs) {
|
|
31128
|
+
return barIntervalMs >= DAY_MS3 ? "UTC" : timeZone;
|
|
31129
|
+
}
|
|
31130
|
+
function tzOffsetMs(ms, timeZone) {
|
|
31131
|
+
return zoneOffsetMs(ms, timeZone);
|
|
31132
|
+
}
|
|
31133
|
+
function zonedDate(ms, timeZone) {
|
|
31134
|
+
return new Date(ms + tzOffsetMs(ms, timeZone));
|
|
31135
|
+
}
|
|
31136
|
+
|
|
31120
31137
|
// src/renderers/native/chrome/ticks.ts
|
|
31121
31138
|
function priceTicks(min2, max2, target = 6) {
|
|
31122
31139
|
if (!(max2 > min2) || !Number.isFinite(min2) || !Number.isFinite(max2)) return [];
|
|
@@ -31257,7 +31274,7 @@ void main() {
|
|
|
31257
31274
|
YEAR
|
|
31258
31275
|
];
|
|
31259
31276
|
function formatTimeStamp2(ms, timeZone, barIntervalMs, fmt = ENGLISH_FORMAT, surface = "crosshair") {
|
|
31260
|
-
return fmt.timeStamp(ms, { timeZone, withTime: barIntervalMs < DAY2, surface });
|
|
31277
|
+
return fmt.timeStamp(ms, { timeZone: displayZone(timeZone, barIntervalMs), withTime: barIntervalMs < DAY2, surface });
|
|
31261
31278
|
}
|
|
31262
31279
|
function pickStep(targetMs) {
|
|
31263
31280
|
for (const step of STEP_LADDER) if (step >= targetMs) return step;
|
|
@@ -31401,14 +31418,6 @@ void main() {
|
|
|
31401
31418
|
}
|
|
31402
31419
|
};
|
|
31403
31420
|
|
|
31404
|
-
// src/renderers/native/chrome/tz.ts
|
|
31405
|
-
function tzOffsetMs(ms, timeZone) {
|
|
31406
|
-
return zoneOffsetMs(ms, timeZone);
|
|
31407
|
-
}
|
|
31408
|
-
function zonedDate(ms, timeZone) {
|
|
31409
|
-
return new Date(ms + tzOffsetMs(ms, timeZone));
|
|
31410
|
-
}
|
|
31411
|
-
|
|
31412
31421
|
// src/renderers/native/chrome/countdown.ts
|
|
31413
31422
|
function countdownText2(barOpen, barMs, now2, fmt = ENGLISH_FORMAT) {
|
|
31414
31423
|
if (!(barMs > 0)) return null;
|
|
@@ -32122,7 +32131,7 @@ void main() {
|
|
|
32122
32131
|
ctx.textAlign = "center";
|
|
32123
32132
|
const y = dataH + (fullH - dataH) / 2;
|
|
32124
32133
|
const tr = coords.visibleTimeRange();
|
|
32125
|
-
const offset3 = tzOffsetMs((tr.from + tr.to) / 2, scene.timezone);
|
|
32134
|
+
const offset3 = tzOffsetMs((tr.from + tr.to) / 2, displayZone(scene.timezone, coords.barInterval));
|
|
32126
32135
|
const target = Math.max(3, Math.min(8, Math.floor(dataW / 64)));
|
|
32127
32136
|
const ticks = timeTicks(tr.from, tr.to, target, offset3, scene.format).map((tick) => ({ ...tick, x: coords.timeToX(tick.time), half: ctx.measureText(tick.label).width / 2 })).filter((tick) => tick.x >= 20 && tick.x <= dataW - 20);
|
|
32128
32137
|
const GAP = 12;
|
|
@@ -32703,6 +32712,7 @@ void main() {
|
|
|
32703
32712
|
indexedTo100: msg("chart.settings.indexedTo100", "Indexed to 100"),
|
|
32704
32713
|
logarithmic: msg("chart.settings.logarithmic", "Logarithmic"),
|
|
32705
32714
|
invertScale: msg("chart.settings.invertScale", "Invert scale"),
|
|
32715
|
+
scalePriceOnly: msg("chart.settings.scalePriceOnly", "Scale price chart only"),
|
|
32706
32716
|
lastPriceLine: msg("chart.settings.lastPriceLine", "Last price line"),
|
|
32707
32717
|
lastPriceLabel: msg("chart.settings.lastPriceLabel", "Last price label"),
|
|
32708
32718
|
countdownToBarClose: msg("chart.settings.countdownToBarClose", "Countdown to bar close"),
|
|
@@ -33211,6 +33221,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
33211
33221
|
), "scales.price-scale.mode")
|
|
33212
33222
|
);
|
|
33213
33223
|
body.append(sid(this.boolRow(TEXT8.invertScale, config.priceScale.invert, (v) => this.emit({ priceScale: { invert: v } })), "scales.price-scale.invert"));
|
|
33224
|
+
body.append(sid(this.boolRow(TEXT8.scalePriceOnly, config.priceScale.priceOnly, (v) => this.emit({ priceScale: { priceOnly: v } })), "scales.price-scale.price-only"));
|
|
33214
33225
|
body.append(sid(this.separator(), "scales.price-scale"));
|
|
33215
33226
|
body.append(sid(this.boolRow(TEXT8.lastPriceLine, config.priceScale.currentPriceLine, (v) => this.emit({ priceScale: { currentPriceLine: v } })), "scales.price-scale.last-price-line"));
|
|
33216
33227
|
body.append(sid(this.boolRow(TEXT8.lastPriceLabel, config.priceScale.priceLabel, (v) => this.emit({ priceScale: { priceLabel: v } })), "scales.price-scale.last-price-label"));
|
|
@@ -41345,7 +41356,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
41345
41356
|
ctx.globalAlpha = gridAlpha;
|
|
41346
41357
|
ctx.strokeStyle = vertColor;
|
|
41347
41358
|
const tr = coords.visibleTimeRange();
|
|
41348
|
-
const offset3 = tzOffsetMs((tr.from + tr.to) / 2, scene.timezone);
|
|
41359
|
+
const offset3 = tzOffsetMs((tr.from + tr.to) / 2, displayZone(scene.timezone, coords.barInterval));
|
|
41349
41360
|
ctx.beginPath();
|
|
41350
41361
|
for (const tick of timeTicks(tr.from, tr.to, 8, offset3)) {
|
|
41351
41362
|
const x = Math.round(coords.timeToX(tick.time)) + 0.5;
|
|
@@ -42268,7 +42279,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
42268
42279
|
this.priceStyleCbs = /* @__PURE__ */ new Set();
|
|
42269
42280
|
this.priceStyleWillChangeCbs = /* @__PURE__ */ new Set();
|
|
42270
42281
|
this.name = "native";
|
|
42271
|
-
this.features = ["logScale", "currentPriceLine", "priceLabel", "countdown", "upColor", "downColor", "glow", "animZoom", "animPan", "animScroll", "animAutoscale", "animLiveBar", "intro", "zoomAnchor", "axisDrag", "paneResize", "candleZOrder", "candleVisible", "seriesOrder", "highlights", "sessionZones", "gridlines", "axisLabels", "scaleMode", "invertScale", "paneScales", "autoScale", "timezone", "keyboard", "historyChords", "priceStyle", "priceBaseline", "baselinePrice", "settings", "attribution", "dialogHost", "tradeMarkers", "marks", "indicatorTitles", "indicatorValues", "crosshairOverride", "drawingsInteractive", "priceAxisTicks"];
|
|
42282
|
+
this.features = ["logScale", "currentPriceLine", "priceLabel", "countdown", "upColor", "downColor", "glow", "animZoom", "animPan", "animScroll", "animAutoscale", "animLiveBar", "intro", "zoomAnchor", "axisDrag", "paneResize", "candleZOrder", "candleVisible", "seriesOrder", "highlights", "sessionZones", "gridlines", "axisLabels", "scaleMode", "invertScale", "scalePriceOnly", "paneScales", "autoScale", "timezone", "keyboard", "historyChords", "priceStyle", "priceBaseline", "baselinePrice", "settings", "attribution", "dialogHost", "tradeMarkers", "marks", "indicatorTitles", "indicatorValues", "crosshairOverride", "drawingsInteractive", "priceAxisTicks"];
|
|
42272
42283
|
/** Track cursor proximity to the scroll button on the plot (bubbles from the button too,
|
|
42273
42284
|
* so moving onto the button doesn't count as leaving). */
|
|
42274
42285
|
this.onScrollProximityMove = (e) => {
|
|
@@ -42427,6 +42438,9 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
42427
42438
|
}
|
|
42428
42439
|
this.scene.invertScale = Boolean(value);
|
|
42429
42440
|
break;
|
|
42441
|
+
case "scalePriceOnly":
|
|
42442
|
+
this.scene.scalePriceOnly = Boolean(value);
|
|
42443
|
+
break;
|
|
42430
42444
|
case "autoScale":
|
|
42431
42445
|
for (const pane of this.scene.panes.values()) {
|
|
42432
42446
|
pane.manualScale = value ? null : { ...pane.scale };
|
|
@@ -42553,6 +42567,8 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
42553
42567
|
return this.scene.scaleMode;
|
|
42554
42568
|
case "invertScale":
|
|
42555
42569
|
return this.scene.invertScale;
|
|
42570
|
+
case "scalePriceOnly":
|
|
42571
|
+
return this.scene.scalePriceOnly;
|
|
42556
42572
|
case "paneScales":
|
|
42557
42573
|
return this.paneScaleInfos();
|
|
42558
42574
|
case "autoScale": {
|
|
@@ -42699,6 +42715,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
42699
42715
|
mode: this.scene.scaleMode,
|
|
42700
42716
|
log: this.scene.logScale,
|
|
42701
42717
|
invert: this.scene.invertScale,
|
|
42718
|
+
priceOnly: this.scene.scalePriceOnly,
|
|
42702
42719
|
borderColor: s.borderColor ?? t.borderColor,
|
|
42703
42720
|
labelsVisible: this.scene.showAxisLabels,
|
|
42704
42721
|
currentPriceLine: this.scene.showPriceLine,
|
|
@@ -42813,6 +42830,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
42813
42830
|
this.scene.scaleMode = next2.priceScale.mode;
|
|
42814
42831
|
this.scene.logScale = next2.priceScale.log;
|
|
42815
42832
|
this.scene.invertScale = next2.priceScale.invert;
|
|
42833
|
+
this.scene.scalePriceOnly = next2.priceScale.priceOnly;
|
|
42816
42834
|
s.borderColor = keepInherit(s.borderColor, next2.priceScale.borderColor, prevTheme.borderColor);
|
|
42817
42835
|
this.scene.showAxisLabels = next2.priceScale.labelsVisible;
|
|
42818
42836
|
this.scene.showPriceLine = next2.priceScale.currentPriceLine;
|
|
@@ -44794,7 +44812,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
44794
44812
|
const pricePane = this.dataWindowPricePane();
|
|
44795
44813
|
const ohlc = this.dataWindowOHLC(bar, pricePane);
|
|
44796
44814
|
const parts3 = [];
|
|
44797
|
-
if (bar) parts3.push(formatStamp(bar.time, this.scene.timezone));
|
|
44815
|
+
if (bar) parts3.push(formatStamp(bar.time, displayZone(this.scene.timezone, this.coords.barInterval)));
|
|
44798
44816
|
if (ohlc) parts3.push(this.t(TEXT16.barSummary, { open: ohlc.o, high: ohlc.h, low: ohlc.l, close: ohlc.c }));
|
|
44799
44817
|
for (const group of this.dataWindowGroups(idx, pricePane)) {
|
|
44800
44818
|
for (const row2 of group.rows) parts3.push(this.t(TEXT16.valueSummary, { name: row2.label, value: row2.value }));
|
|
@@ -44811,7 +44829,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
44811
44829
|
const idx = this.hoverLogical != null ? this.hoverLogical : n - 1;
|
|
44812
44830
|
const bar = this.bars[idx];
|
|
44813
44831
|
const pricePane = this.dataWindowPricePane();
|
|
44814
|
-
const parts3 = bar ? formatStampParts(bar.time, this.scene.timezone) : { date: "", time: "" };
|
|
44832
|
+
const parts3 = bar ? formatStampParts(bar.time, displayZone(this.scene.timezone, this.coords.barInterval)) : { date: "", time: "" };
|
|
44815
44833
|
return { date: parts3.date, time: parts3.time, ohlc: this.dataWindowOHLC(bar, pricePane), groups: this.dataWindowGroups(idx, pricePane) };
|
|
44816
44834
|
}
|
|
44817
44835
|
dataWindowPricePane() {
|
|
@@ -45178,7 +45196,8 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
45178
45196
|
if (or2) dr = dr ? { min: Math.min(dr.min, or2.min), max: Math.max(dr.max, or2.max) } : or2;
|
|
45179
45197
|
}
|
|
45180
45198
|
const includeCandles = pane.kind === "price" && (!this.scene.candlesHidden || this.priceLayersAnchoredToBars(masterModels) || !this.paneHasMeasurableContent(masterModels, dr));
|
|
45181
|
-
|
|
45199
|
+
const priceOnly = pane === pricePane && this.scene.scalePriceOnly && includeCandles;
|
|
45200
|
+
pane.scaleTarget = priceOnly ? computePaneScale([], this.bars, true, i0, s1, null, paneLogScale(this.scene, pane), (id) => this.scene.offsetOf(id), margins) : computePaneScale(masterModels, this.bars, includeCandles, i0, s1, dr, paneLogScale(this.scene, pane), (id) => this.scene.offsetOf(id), margins);
|
|
45182
45201
|
pane.percentBaseline = pane.kind === "price" ? this.bars[i0]?.close ?? 0 : this.firstVisibleValue(masterModels, i0);
|
|
45183
45202
|
pane.axisFormat = void 0;
|
|
45184
45203
|
pane.axisBands = void 0;
|
|
@@ -49503,16 +49522,16 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
49503
49522
|
];
|
|
49504
49523
|
|
|
49505
49524
|
// src/core/native-indicators/classics/overlays.ts
|
|
49506
|
-
var
|
|
49525
|
+
var DAY_MS4 = 864e5;
|
|
49507
49526
|
function periodKey(anchor, time) {
|
|
49508
|
-
if (anchor === "Week") return Math.floor((Math.floor(time /
|
|
49527
|
+
if (anchor === "Week") return Math.floor((Math.floor(time / DAY_MS4) + 3) / 7);
|
|
49509
49528
|
if (anchor === "Month" || anchor === "Quarter" || anchor === "Year") {
|
|
49510
49529
|
const d = new Date(time);
|
|
49511
49530
|
if (anchor === "Year") return d.getUTCFullYear();
|
|
49512
49531
|
if (anchor === "Quarter") return d.getUTCFullYear() * 4 + Math.floor(d.getUTCMonth() / 3);
|
|
49513
49532
|
return d.getUTCFullYear() * 12 + d.getUTCMonth();
|
|
49514
49533
|
}
|
|
49515
|
-
return Math.floor(time /
|
|
49534
|
+
return Math.floor(time / DAY_MS4);
|
|
49516
49535
|
}
|
|
49517
49536
|
function barInterval(bars) {
|
|
49518
49537
|
if (bars.length < 2) return 0;
|
|
@@ -49614,7 +49633,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
49614
49633
|
const anchor = str3(inputs, "anchor", "Session");
|
|
49615
49634
|
const src = sourceValues(bars, str3(inputs, "source", "HLC3"));
|
|
49616
49635
|
const n = bars.length;
|
|
49617
|
-
const hidden = bool(inputs, "hideDwm", true) && barInterval(bars) >=
|
|
49636
|
+
const hidden = bool(inputs, "hideDwm", true) && barInterval(bars) >= DAY_MS4;
|
|
49618
49637
|
const values = new Array(n).fill(Number.NaN);
|
|
49619
49638
|
const bands = VWAP_BANDS.filter((b) => bool(inputs, b.show, b.defOn)).map((b) => ({
|
|
49620
49639
|
mult: Math.max(0, num3(inputs, b.mult, b.defMult)),
|
|
@@ -49688,7 +49707,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
49688
49707
|
compute: (bars, inputs) => {
|
|
49689
49708
|
const interval = barInterval(bars);
|
|
49690
49709
|
const requested = str3(inputs, "anchor", PIVOT_AUTO);
|
|
49691
|
-
const auto = interval <= 15 * 6e4 ? "Session" : interval <
|
|
49710
|
+
const auto = interval <= 15 * 6e4 ? "Session" : interval < DAY_MS4 ? "Week" : interval <= DAY_MS4 ? "Month" : "Year";
|
|
49692
49711
|
const anchor = requested === "Daily" ? "Session" : requested === "Weekly" ? "Week" : requested === "Monthly" ? "Month" : requested === "Yearly" ? "Year" : auto;
|
|
49693
49712
|
const kind = str3(inputs, "kind", PIVOT_TRADITIONAL);
|
|
49694
49713
|
const aggs = /* @__PURE__ */ new Map();
|
|
@@ -49774,7 +49793,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
49774
49793
|
colorInput(NEUTRAL, msg("indicator.n52WeekHighLow.allTimeColor", "All-Time High/Low"), "allTimeColor", msg("indicator.n52WeekHighLow.allTimeColor.tooltip", "Color of the all-time high and all-time low levels."))
|
|
49775
49794
|
],
|
|
49776
49795
|
compute: (bars, inputs) => {
|
|
49777
|
-
const span = num3(inputs, "weeks", 52) * 7 *
|
|
49796
|
+
const span = num3(inputs, "weeks", 52) * 7 * DAY_MS4;
|
|
49778
49797
|
const n = bars.length;
|
|
49779
49798
|
const hi = new Array(n).fill(Number.NaN);
|
|
49780
49799
|
const lo = new Array(n).fill(Number.NaN);
|
|
@@ -50461,6 +50480,7 @@ ${overlayScrollbarCss(".vela-sd-pane")}
|
|
|
50461
50480
|
body: { "reset-view": -30, "remove-drawings": -20, "remove-indicators": -10, settings: 1e3 },
|
|
50462
50481
|
"price-axis": {
|
|
50463
50482
|
auto: -80,
|
|
50483
|
+
"price-only": -75,
|
|
50464
50484
|
invert: -70,
|
|
50465
50485
|
"scale:regular": -60,
|
|
50466
50486
|
"scale:percent": -50,
|