@orangecharts/wrun-chart-host 0.18.0 → 0.19.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/README.md +2 -0
- package/dist/constants/feature-flags.constants.js +6 -5
- package/dist/host-ports.types.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/settings-templates/frvp-fields.js +28 -19
- package/dist/settings-templates/index.d.ts +33 -0
- package/dist/settings-templates/index.js +91 -2
- package/dist/settings-templates/indicator-fields.d.ts +35 -0
- package/dist/settings-templates/indicator-fields.js +261 -114
- package/dist/settings-templates/market-bound.d.ts +215 -0
- package/dist/settings-templates/market-bound.js +386 -0
- package/dist/utility/v2/gate-plane.util.d.ts +7 -0
- package/dist/utility/v2/gate-plane.util.js +6 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.js +32 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +5 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +1 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.js +122 -15
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -1
- package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.js +17 -0
- package/package.json +7 -7
|
@@ -18,20 +18,42 @@
|
|
|
18
18
|
* object), its lanes, whether it is instance state (which instance this is: never written by a template or a saved
|
|
19
19
|
* default, kept by a reset) and whether it is bound to the market it was saved on. Imports nothing, so the tool
|
|
20
20
|
* tables' generator can read the FRVP table beside it without the package graph.
|
|
21
|
+
*
|
|
22
|
+
* Quantities (market-bound values, ./market-bound): every field that holds a number, or a container of numbers, says
|
|
23
|
+
* what the number measures, so a reader knows whether it means the same on another market:
|
|
24
|
+
* - `relative`: the same on any market (a percent, ratio, count, period, length, opacity, width, a time);
|
|
25
|
+
* - `bound`: an absolute in the market's native unit (coins, contracts, shares, price units). With `keep` it is
|
|
26
|
+
* reconciled per market (reconcileMarketBound): `typed` values are kept per market and given back on a return,
|
|
27
|
+
* `measured` ones are dropped. Without `keep` it is classified only: a heatmap's meta scale (its own path,
|
|
28
|
+
* settleHeatmapScale) and the FRVP's threshold (left as it is on purpose);
|
|
29
|
+
* - `amount`: an absolute that is carried onto any market as it is: a dollar amount, and an absolute whose unit no
|
|
30
|
+
* reader settles (the shared rows of a field a bound type overrides, price-unit sizes outside the typed thresholds).
|
|
31
|
+
* A field that is bound only in a native unit names that unit (`boundWhen`): in another unit (USD) it is an amount.
|
|
32
|
+
* A field's group companions (`with`) are kept, given back and removed with it as one unit.
|
|
21
33
|
*/
|
|
22
34
|
/** The type every technical script runs as: its declared inputs and viewer rows are fields of the instance. */
|
|
23
35
|
export const SCRIPT_INDICATOR_TYPE = 'TECHNICAL_SCRIPT';
|
|
24
36
|
/** A preference: the workspace row keeps it, a template carries it, Save as default keeps it. */
|
|
25
37
|
const PREFERENCE = { lanes: ['row', 'template', 'default'] };
|
|
38
|
+
/** A preference whose number means the same on any market. */
|
|
39
|
+
const RELATIVE = { lanes: ['row', 'template', 'default'], quantity: 'relative' };
|
|
40
|
+
/** A preference whose number is an absolute carried as it is (see the file header). */
|
|
41
|
+
const AMOUNT = { lanes: ['row', 'template', 'default'], quantity: 'amount' };
|
|
26
42
|
/** "Show on": a preference whose All intervals is the empty list (titan reads `[]` as every interval). */
|
|
27
|
-
const SHOW_ON = {
|
|
43
|
+
const SHOW_ON = {
|
|
44
|
+
lanes: ['row', 'template', 'default'],
|
|
45
|
+
unset: Object.freeze([]),
|
|
46
|
+
quantity: 'relative',
|
|
47
|
+
};
|
|
28
48
|
/** The naked-level cap: a preference whose "all levels" is 0 (titan keeps every unfilled level). */
|
|
29
|
-
const ALL_LEVELS = { lanes: ['row', 'template', 'default'], unset: 0 };
|
|
49
|
+
const ALL_LEVELS = { lanes: ['row', 'template', 'default'], unset: 0, quantity: 'relative' };
|
|
30
50
|
/**
|
|
31
51
|
* Instance state the row keeps: which instance this is (its market, venue legs, script identity, host pane, run mode).
|
|
32
52
|
* Never carried onto another instance by a template or a saved default, and a reset keeps it.
|
|
33
53
|
*/
|
|
34
54
|
const INSTANCE = { lanes: ['row'], instance: true };
|
|
55
|
+
/** Instance state that is a number meaning the same on any market (a time, an order, a count). */
|
|
56
|
+
const INSTANCE_RELATIVE = { lanes: ['row'], instance: true, quantity: 'relative' };
|
|
35
57
|
/** Instance identity the row never keeps (the overlay's id and type, a script's inline source). */
|
|
36
58
|
const IDENTITY = { lanes: [], instance: true };
|
|
37
59
|
/** Row payload that is no preference: a fetch cache the row keeps and a template never carries. */
|
|
@@ -40,8 +62,12 @@ const ROW_PAYLOAD = { lanes: ['row'] };
|
|
|
40
62
|
const RUNTIME = { lanes: [] };
|
|
41
63
|
/** A meta preference: the user's choice on any market. */
|
|
42
64
|
const META_PREFERENCE = { owner: 'meta', lanes: ['template', 'default'] };
|
|
65
|
+
/** A meta preference whose number means the same on any market. */
|
|
66
|
+
const META_RELATIVE = { owner: 'meta', lanes: ['template', 'default'], quantity: 'relative' };
|
|
43
67
|
/** A meta absolute in the market's own units: carried only onto the market it was saved on. */
|
|
44
68
|
const META_MARKET_BOUND = { owner: 'meta', lanes: ['template', 'default'], marketBound: true };
|
|
69
|
+
/** A numeric meta absolute in the market's own units: a heatmap's scale and brick, settled by the heatmap's own path. */
|
|
70
|
+
const META_BOUND = { ...META_MARKET_BOUND, quantity: 'bound' };
|
|
45
71
|
/** A meta key the type derives from its own state: never carried. */
|
|
46
72
|
const META_DERIVED = { owner: 'meta', lanes: [] };
|
|
47
73
|
/** Meta identity a settings dialog writes (which market or series the instance reads): never carried. */
|
|
@@ -84,10 +110,10 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
84
110
|
['showLastValueLine', PREFERENCE],
|
|
85
111
|
['showYAxisNameLabel', PREFERENCE],
|
|
86
112
|
// Swing-anchored VWAP lookback and profile rows layout (competitor parity round, 2026-09-20)
|
|
87
|
-
['anchorLookback',
|
|
113
|
+
['anchorLookback', RELATIVE],
|
|
88
114
|
['rowsLayout', PREFERENCE],
|
|
89
|
-
['rowsCount',
|
|
90
|
-
['digits',
|
|
115
|
+
['rowsCount', RELATIVE],
|
|
116
|
+
['digits', RELATIVE],
|
|
91
117
|
['exchange', INSTANCE],
|
|
92
118
|
['displayExchange', INSTANCE],
|
|
93
119
|
['symbol', INSTANCE],
|
|
@@ -106,32 +132,32 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
106
132
|
['unlocksLabel', PREFERENCE],
|
|
107
133
|
['cachedRawData', ROW_PAYLOAD],
|
|
108
134
|
['coin', INSTANCE],
|
|
109
|
-
['turnoverRatioPeriod',
|
|
110
|
-
['normalizedLength',
|
|
111
|
-
['lookbackPeriod',
|
|
135
|
+
['turnoverRatioPeriod', RELATIVE],
|
|
136
|
+
['normalizedLength', RELATIVE],
|
|
137
|
+
['lookbackPeriod', RELATIVE],
|
|
112
138
|
['side', PREFERENCE],
|
|
113
|
-
['minRange',
|
|
114
|
-
['maxRange',
|
|
139
|
+
['minRange', AMOUNT],
|
|
140
|
+
['maxRange', AMOUNT],
|
|
115
141
|
['expiry', PREFERENCE],
|
|
116
142
|
['skipMissingGap', PREFERENCE],
|
|
117
143
|
// Options GEX (per-strike profile + key levels); `basis` is the GEX sign
|
|
118
144
|
// basis ('naive' | 'dealerFlow') shared with the GEX curve
|
|
119
145
|
['expiryFilter', PREFERENCE],
|
|
120
146
|
['basis', PREFERENCE],
|
|
121
|
-
['levelThickness',
|
|
122
|
-
['strikeWindowPct',
|
|
123
|
-
['refreshSec',
|
|
147
|
+
['levelThickness', RELATIVE],
|
|
148
|
+
['strikeWindowPct', RELATIVE],
|
|
149
|
+
['refreshSec', RELATIVE],
|
|
124
150
|
// Options domain panes (IV smile expiry-series count; term-structure skew
|
|
125
151
|
// toggle; implied-move unit)
|
|
126
|
-
['expiryCount',
|
|
152
|
+
['expiryCount', RELATIVE],
|
|
127
153
|
['showSkew', PREFERENCE],
|
|
128
154
|
['moveUnit', PREFERENCE],
|
|
129
155
|
// Options heatmap cell metric + color palette + color sensitivity +
|
|
130
156
|
// surface opacity + gamma-flip contour toggle
|
|
131
157
|
['metric', PREFERENCE],
|
|
132
158
|
['palette', PREFERENCE],
|
|
133
|
-
['sensitivity',
|
|
134
|
-
['surfaceOpacity',
|
|
159
|
+
['sensitivity', RELATIVE],
|
|
160
|
+
['surfaceOpacity', RELATIVE],
|
|
135
161
|
['surfaceStyle', PREFERENCE],
|
|
136
162
|
// Options pane visual styling: the named color theme (all nine
|
|
137
163
|
// foreign-domain panes) and the curve panes' fill style. Persisted user
|
|
@@ -141,7 +167,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
141
167
|
['fillStyle', PREFERENCE],
|
|
142
168
|
['showFlipContour', PREFERENCE],
|
|
143
169
|
// Options flow-by-expiry trailing window
|
|
144
|
-
['lookbackHours',
|
|
170
|
+
['lookbackHours', RELATIVE],
|
|
145
171
|
// Foreign-domain pane interactivity toggles (titan hover tooltip, X zoom,
|
|
146
172
|
// %-vs-spot subline). ONLY the user toggles persist: presentation keys
|
|
147
173
|
// (xLabel/xFormat/valueFormat/xValueLabels/spotDeltaLabel/zoomResetLabel)
|
|
@@ -158,7 +184,9 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
158
184
|
['callWallColor', PREFERENCE],
|
|
159
185
|
['putWallColor', PREFERENCE],
|
|
160
186
|
['colors', PREFERENCE],
|
|
161
|
-
|
|
187
|
+
// Holds two levels in the plotted value's own unit (separatingLevel, baseValue) beside its colours: classified,
|
|
188
|
+
// carried as it is on purpose (no `keep`, so no reader settles it).
|
|
189
|
+
['multiColorSettings', { ...PREFERENCE, quantity: 'bound' }],
|
|
162
190
|
// Native VWAP direction coloring (the user-facing trio; multiColorSettings
|
|
163
191
|
// above carries the derived renderer contract).
|
|
164
192
|
['colorByDirection', PREFERENCE],
|
|
@@ -167,7 +195,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
167
195
|
// Native VWAP main-line style (line | momentumFill), the momentum
|
|
168
196
|
// companion's EMA length, and the derived momentum color layout.
|
|
169
197
|
['style', PREFERENCE],
|
|
170
|
-
['momentumLength',
|
|
198
|
+
['momentumLength', RELATIVE],
|
|
171
199
|
['momentumFillColors', PREFERENCE],
|
|
172
200
|
['gradientColors', PREFERENCE],
|
|
173
201
|
// Color-ownership state. Without these two, a refresh keeps the custom
|
|
@@ -176,30 +204,30 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
176
204
|
// theme default, so the boot theme pass re-themed the overridden line.
|
|
177
205
|
['colorsCustomized', PREFERENCE],
|
|
178
206
|
['customizedColorIndices', PREFERENCE],
|
|
179
|
-
['width',
|
|
207
|
+
['width', RELATIVE],
|
|
180
208
|
// Candle-mode overlays persist a themed border stroke; without this the
|
|
181
209
|
// tc-metadata-derived save paths (saveWorkspaceImmediately, addIndicator
|
|
182
210
|
// tail) silently dropped it every boot.
|
|
183
211
|
['strokeColor', PREFERENCE],
|
|
184
|
-
['lineWidth',
|
|
212
|
+
['lineWidth', RELATIVE],
|
|
185
213
|
['lineStyle', PREFERENCE],
|
|
186
214
|
['fill', PREFERENCE],
|
|
187
215
|
['glow', PREFERENCE],
|
|
188
|
-
['opacity',
|
|
216
|
+
['opacity', RELATIVE],
|
|
189
217
|
['showPriceDisplay', PREFERENCE],
|
|
190
|
-
['verticalPadding',
|
|
218
|
+
['verticalPadding', RELATIVE],
|
|
191
219
|
['transformations', INSTANCE],
|
|
192
220
|
['displayTransformations', INSTANCE],
|
|
193
221
|
['hideWeekends', PREFERENCE],
|
|
194
222
|
['preventGapInterpolation', PREFERENCE],
|
|
195
223
|
['traderCategory', PREFERENCE],
|
|
196
|
-
['period',
|
|
224
|
+
['period', RELATIVE],
|
|
197
225
|
['multiSymbolExchanges', INSTANCE],
|
|
198
226
|
// CVD-by-Size bucket selection: column identity for its whole row contract.
|
|
199
227
|
// Workspace saves re-pick settings through this list (chart.ts), so a key
|
|
200
228
|
// missing here is silently dropped on refresh even though the live overlay
|
|
201
229
|
// keeps working from in-memory settings.
|
|
202
|
-
['orderSizeBuckets',
|
|
230
|
+
['orderSizeBuckets', AMOUNT],
|
|
203
231
|
// Binance margin long/short ratio: the dialog persists the selected ratio
|
|
204
232
|
// series here; absent from the whitelist the re-pick sites stripped it
|
|
205
233
|
// (settings-loss audit, binance-margin-lsr-ratiotypes-strip). 'ratioType'
|
|
@@ -210,7 +238,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
210
238
|
['region', PREFERENCE],
|
|
211
239
|
['displayMode', PREFERENCE],
|
|
212
240
|
['sectors', PREFERENCE],
|
|
213
|
-
['computeSince',
|
|
241
|
+
['computeSince', RELATIVE],
|
|
214
242
|
['subType', INSTANCE],
|
|
215
243
|
// Catalog-source breadcrumb ('official' | community): the CME venue policy
|
|
216
244
|
// classifies restored technical scripts as first-party vs user off this.
|
|
@@ -300,16 +328,16 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
300
328
|
// into a backtest, and a backtest keeps its mode through a reset.
|
|
301
329
|
['runMode', INSTANCE],
|
|
302
330
|
['editorRunKey', INSTANCE],
|
|
303
|
-
['gridHeight',
|
|
331
|
+
['gridHeight', RELATIVE],
|
|
304
332
|
['currency', PREFERENCE],
|
|
305
|
-
['barHeightMultiplier',
|
|
306
|
-
['intervalBarHeights',
|
|
307
|
-
['barHeight',
|
|
333
|
+
['barHeightMultiplier', RELATIVE],
|
|
334
|
+
['intervalBarHeights', AMOUNT],
|
|
335
|
+
['barHeight', AMOUNT],
|
|
308
336
|
// Order Book Profile grouping as the brick-to-base MULTIPLIER: the only
|
|
309
337
|
// symbol-independent form of the choice. The control reads it first and the
|
|
310
338
|
// dialog writes it, but off this list a saved default carried just the
|
|
311
339
|
// absolute brick, so a re-add fell back to the stock x10 grouping.
|
|
312
|
-
['brickMultiplier',
|
|
340
|
+
['brickMultiplier', RELATIVE],
|
|
313
341
|
['stickToLeft', PREFERENCE],
|
|
314
342
|
['showPOC', PREFERENCE],
|
|
315
343
|
['pocColor', PREFERENCE],
|
|
@@ -317,7 +345,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
317
345
|
['showPOCNaked', PREFERENCE],
|
|
318
346
|
['showValue', PREFERENCE],
|
|
319
347
|
['showValueArea', PREFERENCE],
|
|
320
|
-
['valueArea',
|
|
348
|
+
['valueArea', RELATIVE],
|
|
321
349
|
['showVAH', PREFERENCE],
|
|
322
350
|
['vahColor', PREFERENCE],
|
|
323
351
|
['showVAHLabel', PREFERENCE],
|
|
@@ -337,7 +365,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
337
365
|
['statsRows', PREFERENCE],
|
|
338
366
|
['statsRowsPosition', PREFERENCE],
|
|
339
367
|
['statsRowsLabels', PREFERENCE],
|
|
340
|
-
['liquidationMarkers',
|
|
368
|
+
['liquidationMarkers', AMOUNT],
|
|
341
369
|
['showVALLabel', PREFERENCE],
|
|
342
370
|
['showVALNaked', PREFERENCE],
|
|
343
371
|
['showBackground', PREFERENCE],
|
|
@@ -351,7 +379,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
351
379
|
// persistence scanner checks every dialog field against this list.
|
|
352
380
|
['hollowBars', PREFERENCE],
|
|
353
381
|
['sessionType', PREFERENCE],
|
|
354
|
-
['session',
|
|
382
|
+
['session', RELATIVE],
|
|
355
383
|
// CME futures RTH/ETH session-hours toggle (VP family fetch identity)
|
|
356
384
|
['sessionHours', PREFERENCE],
|
|
357
385
|
// 24/7 venues: daily session start intent ('chart' tz vs 'utc'). The derived
|
|
@@ -359,15 +387,15 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
359
387
|
// this setting on every mount/apply/timezone change.
|
|
360
388
|
['sessionStart', PREFERENCE],
|
|
361
389
|
['showDelta', PREFERENCE],
|
|
362
|
-
['barWidth',
|
|
363
|
-
['minimumBarHeight',
|
|
390
|
+
['barWidth', RELATIVE],
|
|
391
|
+
['minimumBarHeight', AMOUNT],
|
|
364
392
|
// Footprint anchor tick (footprint-anchor-tick.util.ts): the exchange tick the
|
|
365
393
|
// rows center on, valid for the instrument named by its identity.
|
|
366
|
-
['anchorTick',
|
|
394
|
+
['anchorTick', AMOUNT],
|
|
367
395
|
['anchorTickIdentity', PREFERENCE],
|
|
368
396
|
// Footprint big-trades-only data filter (fetch parse + live merge)
|
|
369
397
|
['bigTradesOnly', PREFERENCE],
|
|
370
|
-
['bigTradesThreshold',
|
|
398
|
+
['bigTradesThreshold', AMOUNT],
|
|
371
399
|
['bigTradesThresholdUnit', PREFERENCE],
|
|
372
400
|
['fundingInterval', PREFERENCE],
|
|
373
401
|
['showSplineLabels', PREFERENCE],
|
|
@@ -377,27 +405,27 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
377
405
|
['isFillTransparent', PREFERENCE],
|
|
378
406
|
['isInverse', PREFERENCE],
|
|
379
407
|
['showMagnifier', PREFERENCE],
|
|
380
|
-
['customAnchorCandles',
|
|
408
|
+
['customAnchorCandles', RELATIVE],
|
|
381
409
|
['source', PREFERENCE],
|
|
382
410
|
['showBand1', PREFERENCE],
|
|
383
411
|
['showBand2', PREFERENCE],
|
|
384
412
|
['showBand3', PREFERENCE],
|
|
385
413
|
['anchor', PREFERENCE],
|
|
386
414
|
['bandCalcMode', PREFERENCE],
|
|
387
|
-
['bandMult1',
|
|
388
|
-
['bandMult2',
|
|
389
|
-
['bandMult3',
|
|
415
|
+
['bandMult1', RELATIVE],
|
|
416
|
+
['bandMult2', RELATIVE],
|
|
417
|
+
['bandMult3', RELATIVE],
|
|
390
418
|
['bands', PREFERENCE],
|
|
391
419
|
['showLetters', PREFERENCE],
|
|
392
420
|
['showVolumeProfile', PREFERENCE],
|
|
393
421
|
['volumeProfilePosition', PREFERENCE],
|
|
394
|
-
['volumeProfileWidth',
|
|
422
|
+
['volumeProfileWidth', RELATIVE],
|
|
395
423
|
['volumeDisplayMode', PREFERENCE],
|
|
396
424
|
['blockDisplay', PREFERENCE],
|
|
397
425
|
['showVolumeValues', PREFERENCE],
|
|
398
|
-
['valueAreaPercentage',
|
|
399
|
-
['ibrPeriod',
|
|
400
|
-
['ibrMinutes',
|
|
426
|
+
['valueAreaPercentage', RELATIVE],
|
|
427
|
+
['ibrPeriod', RELATIVE],
|
|
428
|
+
['ibrMinutes', RELATIVE],
|
|
401
429
|
['showIBR', PREFERENCE],
|
|
402
430
|
['ibrColor', PREFERENCE],
|
|
403
431
|
['showPoorHighs', PREFERENCE],
|
|
@@ -412,7 +440,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
412
440
|
['singlePrintsColor', PREFERENCE],
|
|
413
441
|
['showSinglePrintsNaked', PREFERENCE],
|
|
414
442
|
['showBuyingSellingTails', PREFERENCE],
|
|
415
|
-
['outsideVAOpacity',
|
|
443
|
+
['outsideVAOpacity', RELATIVE],
|
|
416
444
|
['showOutsideVAColors', PREFERENCE],
|
|
417
445
|
['outsideVAColor', PREFERENCE],
|
|
418
446
|
// Profile-family outside-value-area row colors (VRVP/SVP/FRVP/aggregated).
|
|
@@ -449,14 +477,14 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
449
477
|
['showVolumeVAL', PREFERENCE],
|
|
450
478
|
['volumeVALColor', PREFERENCE],
|
|
451
479
|
['showVolumeVALNaked', PREFERENCE],
|
|
452
|
-
['tpoBlockSizeMinutes',
|
|
480
|
+
['tpoBlockSizeMinutes', RELATIVE],
|
|
453
481
|
['tradingHour', PREFERENCE],
|
|
454
|
-
['customTimeRange',
|
|
482
|
+
['customTimeRange', RELATIVE],
|
|
455
483
|
['customSessionName', PREFERENCE],
|
|
456
484
|
// TPO custom sessions: the editor writes these but they were never on the
|
|
457
485
|
// whitelist, so the boot-time re-pick dropped them and the sessions died on
|
|
458
486
|
// the second reload (settings-loss audit, tpo-custom-sessions-never-persisted).
|
|
459
|
-
['customSessions',
|
|
487
|
+
['customSessions', RELATIVE],
|
|
460
488
|
['periodPalettes', PREFERENCE],
|
|
461
489
|
['blockColorMode', PREFERENCE],
|
|
462
490
|
// TPO POC/VAH/VAL line style: the settings tab writes it and TpoScene reads
|
|
@@ -485,14 +513,14 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
485
513
|
// The FRED series a comparison plots.
|
|
486
514
|
['fredMetadata', INSTANCE],
|
|
487
515
|
['isFredChart', INSTANCE],
|
|
488
|
-
['threshold',
|
|
516
|
+
['threshold', AMOUNT],
|
|
489
517
|
['imbalance', PREFERENCE],
|
|
490
518
|
['skipZeroValues', PREFERENCE],
|
|
491
|
-
['imbalanceRatio',
|
|
519
|
+
['imbalanceRatio', RELATIVE],
|
|
492
520
|
['imbalanceBuyColor', PREFERENCE],
|
|
493
521
|
['imbalanceSellColor', PREFERENCE],
|
|
494
522
|
['showDecimals', PREFERENCE],
|
|
495
|
-
['volumeDecimals',
|
|
523
|
+
['volumeDecimals', RELATIVE],
|
|
496
524
|
['showSummary', PREFERENCE],
|
|
497
525
|
['visibleRangeScaling', PREFERENCE],
|
|
498
526
|
['dynamicCandleWidth', PREFERENCE],
|
|
@@ -502,8 +530,8 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
502
530
|
['showTradingHourLabel', PREFERENCE],
|
|
503
531
|
['legendsCollapsed', PREFERENCE],
|
|
504
532
|
['__localKScriptSourceHash', INSTANCE],
|
|
505
|
-
['fromTimestamp',
|
|
506
|
-
['toTimestamp',
|
|
533
|
+
['fromTimestamp', INSTANCE_RELATIVE],
|
|
534
|
+
['toTimestamp', INSTANCE_RELATIVE],
|
|
507
535
|
// FRVP "Follow chart": per-instance open-ceiling mode; must survive
|
|
508
536
|
// workspace saves so reload restores follow and catches the box up.
|
|
509
537
|
['followChart', PREFERENCE],
|
|
@@ -526,14 +554,14 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
526
554
|
['hideLegendName', PREFERENCE],
|
|
527
555
|
// The slot charge of the script this instance runs (indicator-source-charge.util), derived from
|
|
528
556
|
// its own sheet or source: never another script's.
|
|
529
|
-
['weightedSourceCount',
|
|
530
|
-
['uniqueSourceCount',
|
|
557
|
+
['weightedSourceCount', INSTANCE_RELATIVE],
|
|
558
|
+
['uniqueSourceCount', INSTANCE_RELATIVE],
|
|
531
559
|
['hasDynamicSources', PREFERENCE],
|
|
532
560
|
['signalInterval', PREFERENCE],
|
|
533
561
|
// The Polymarket market a PM signal follows.
|
|
534
562
|
['pmSignalMarkets', INSTANCE],
|
|
535
563
|
['pmSignalSlug', INSTANCE],
|
|
536
|
-
['pmSignalEndDate',
|
|
564
|
+
['pmSignalEndDate', INSTANCE_RELATIVE],
|
|
537
565
|
// TWEET_CALLER_CALLS per-pane settings. Without these in the whitelist,
|
|
538
566
|
// workspace persistence silently drops them on save and reload restores
|
|
539
567
|
// an empty indicator shell: the user's caller selection vanishes after
|
|
@@ -544,9 +572,9 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
544
572
|
['chunksUrl', INSTANCE],
|
|
545
573
|
['showAllCalls', PREFERENCE],
|
|
546
574
|
['overlayKey', INSTANCE],
|
|
547
|
-
['viewportStart',
|
|
548
|
-
['viewportEnd',
|
|
549
|
-
['_instanceOrder',
|
|
575
|
+
['viewportStart', INSTANCE_RELATIVE],
|
|
576
|
+
['viewportEnd', INSTANCE_RELATIVE],
|
|
577
|
+
['_instanceOrder', INSTANCE_RELATIVE],
|
|
550
578
|
// HYPERLIQUID_ADDRESS indicator settings (per-chart wallet attachment).
|
|
551
579
|
// `familiesStatePositions` rides with the list it describes: it says the list was written where
|
|
552
580
|
// the Positions row could be seen, which is what tells a hidden position line apart from one the
|
|
@@ -572,12 +600,12 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
572
600
|
// all); a template states it, 0 where the engine holds none.
|
|
573
601
|
['maxNakedLevels', ALL_LEVELS],
|
|
574
602
|
['showPOCOutline', PREFERENCE],
|
|
575
|
-
['stackedImbalances',
|
|
576
|
-
['pocThickness',
|
|
603
|
+
['stackedImbalances', RELATIVE],
|
|
604
|
+
['pocThickness', RELATIVE],
|
|
577
605
|
['volumeColor', PREFERENCE],
|
|
578
606
|
['colorImbalanceText', PREFERENCE],
|
|
579
|
-
['buyTailEdges',
|
|
580
|
-
['sellTailEdges',
|
|
607
|
+
['buyTailEdges', RELATIVE],
|
|
608
|
+
['sellTailEdges', RELATIVE],
|
|
581
609
|
['dayTypeColor', PREFERENCE],
|
|
582
610
|
['openTypeColor', PREFERENCE],
|
|
583
611
|
['developingAllPeriods', PREFERENCE],
|
|
@@ -592,8 +620,8 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
592
620
|
['highlightStartEnd', PREFERENCE],
|
|
593
621
|
['fillValueArea', PREFERENCE],
|
|
594
622
|
['valueAreaFillColor', PREFERENCE],
|
|
595
|
-
['valueAreaFillOpacity',
|
|
596
|
-
['profileSpacing',
|
|
623
|
+
['valueAreaFillOpacity', RELATIVE],
|
|
624
|
+
['profileSpacing', RELATIVE],
|
|
597
625
|
['rangeExtensionColor', PREFERENCE],
|
|
598
626
|
['showRangeExtension', PREFERENCE],
|
|
599
627
|
['showStatistics', PREFERENCE],
|
|
@@ -613,9 +641,9 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
613
641
|
['showPriorValLabel', PREFERENCE],
|
|
614
642
|
['showPriorHighLabel', PREFERENCE],
|
|
615
643
|
['showPriorLowLabel', PREFERENCE],
|
|
616
|
-
['compositeSessions',
|
|
644
|
+
['compositeSessions', RELATIVE],
|
|
617
645
|
['volumeColorGrade', PREFERENCE],
|
|
618
|
-
['volumeThreshold',
|
|
646
|
+
['volumeThreshold', AMOUNT],
|
|
619
647
|
['variant', PREFERENCE],
|
|
620
648
|
// Delta Profile accumulation scope ('session' | 'visible-range' | 'recent');
|
|
621
649
|
// drives the persisted titan variant, so dropping it would revert the scope
|
|
@@ -625,14 +653,14 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
625
653
|
// column's inset from the right pane edge (fraction of the pane width).
|
|
626
654
|
// Stamped only on rows that use them (delta-profile/index.ts), so listing
|
|
627
655
|
// them here adds nothing to any other row.
|
|
628
|
-
['profileWindowMs',
|
|
629
|
-
['edgeOffset',
|
|
656
|
+
['profileWindowMs', RELATIVE],
|
|
657
|
+
['edgeOffset', RELATIVE],
|
|
630
658
|
// The metric profiles' Current period scope: which period ('day' | 'week' |
|
|
631
659
|
// 'month') the profile covers. Its derived engine keys (the period start, the
|
|
632
660
|
// translated header and POC label) are never persisted.
|
|
633
661
|
['profilePeriod', PREFERENCE],
|
|
634
662
|
// Footprint cell-rule filters + second per-cell metric row.
|
|
635
|
-
['cellRules',
|
|
663
|
+
['cellRules', AMOUNT],
|
|
636
664
|
// Footprint display-only zero-digit suppression.
|
|
637
665
|
['hideZeroText', PREFERENCE],
|
|
638
666
|
['secondaryCellMetric', PREFERENCE],
|
|
@@ -640,8 +668,8 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
640
668
|
['cellTextColor', PREFERENCE],
|
|
641
669
|
// Session VP custom intraday window: the dialog state and the composed
|
|
642
670
|
// titan contract both persist (the control recomposes on restore).
|
|
643
|
-
['customWindow',
|
|
644
|
-
['customSessionWindow',
|
|
671
|
+
['customWindow', RELATIVE],
|
|
672
|
+
['customSessionWindow', RELATIVE],
|
|
645
673
|
// TPO current-period VAH/POC/VAL key-level tags on naked extension rays.
|
|
646
674
|
['showLevelLabels', PREFERENCE],
|
|
647
675
|
['hideLegendValues', PREFERENCE],
|
|
@@ -685,26 +713,26 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
685
713
|
// The Hyperliquid liquidation heatmap's Running total (its profile's cumulative arms); no other heatmap writes it.
|
|
686
714
|
['runningTotal', META_PREFERENCE],
|
|
687
715
|
// Order book depth bands (percent of price) and the depth and funding display modes.
|
|
688
|
-
['smallerThanPct',
|
|
689
|
-
['greaterThanPct',
|
|
716
|
+
['smallerThanPct', META_RELATIVE],
|
|
717
|
+
['greaterThanPct', META_RELATIVE],
|
|
690
718
|
['displayMode', META_PREFERENCE],
|
|
691
719
|
// The long/short ratio series and the margin rate VIP tiers.
|
|
692
720
|
['selectedRatioTypes', META_PREFERENCE],
|
|
693
721
|
['selectedVipLevel', META_PREFERENCE],
|
|
694
722
|
['binanceVipLevel', META_PREFERENCE],
|
|
695
723
|
['bybitVipLevel', META_PREFERENCE],
|
|
696
|
-
['brickSize',
|
|
724
|
+
['brickSize', META_BOUND],
|
|
697
725
|
// A heatmap's brick is derived from its resolution and the fetch trusts a persisted brick verbatim, so the
|
|
698
726
|
// resolution travels only with the brick it was saved with.
|
|
699
727
|
['resolution', META_MARKET_BOUND],
|
|
700
728
|
// The heatmap color range is in the market's size units; its source (calibrated or the user's) decides whether it is
|
|
701
729
|
// recalibrated, so it travels with the range.
|
|
702
|
-
['range',
|
|
703
|
-
['outerRange',
|
|
730
|
+
['range', META_BOUND],
|
|
731
|
+
['outerRange', META_BOUND],
|
|
704
732
|
['rangeSource', META_MARKET_BOUND],
|
|
705
733
|
['coinOfAdjustedRange', META_MARKET_BOUND],
|
|
706
734
|
// The volumetric size window is a volume in those same units.
|
|
707
|
-
['sizeCeil',
|
|
735
|
+
['sizeCeil', META_BOUND],
|
|
708
736
|
['venueChoice', META_VENUE_CHOICE],
|
|
709
737
|
// Both footprints' Row size mode ('auto' | 'manual'): kept so a default saved in Auto resizes on the next chart.
|
|
710
738
|
['rowSizeMode', META_PREFERENCE],
|
|
@@ -722,29 +750,29 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
722
750
|
['priorLevelsEverySession', PREFERENCE],
|
|
723
751
|
// Peaks and valleys (HVN/LVN): TPO and the volume profiles share these keys.
|
|
724
752
|
['peaksValleys', PREFERENCE],
|
|
725
|
-
['peaksValleysSensitivity',
|
|
753
|
+
['peaksValleysSensitivity', RELATIVE],
|
|
726
754
|
['hvnColor', PREFERENCE],
|
|
727
755
|
['lvnColor', PREFERENCE],
|
|
728
756
|
['showIBLines', PREFERENCE],
|
|
729
|
-
['ibExtensionPercents',
|
|
757
|
+
['ibExtensionPercents', RELATIVE],
|
|
730
758
|
['ibLineColor', PREFERENCE],
|
|
731
759
|
['ibExtensionColor', PREFERENCE],
|
|
732
|
-
['openingRangeMinutes',
|
|
733
|
-
['closingRangeMinutes',
|
|
760
|
+
['openingRangeMinutes', RELATIVE],
|
|
761
|
+
['closingRangeMinutes', RELATIVE],
|
|
734
762
|
['showMidpoint', PREFERENCE],
|
|
735
763
|
['midpointColor', PREFERENCE],
|
|
736
764
|
['statsItems', PREFERENCE],
|
|
737
765
|
['statsLastProfileOnly', PREFERENCE],
|
|
738
766
|
['statsOnHover', PREFERENCE],
|
|
739
767
|
['splitPeriodsMap', PREFERENCE],
|
|
740
|
-
['periodLength',
|
|
768
|
+
['periodLength', RELATIVE],
|
|
741
769
|
['ownColumnBesideStandard', PREFERENCE],
|
|
742
770
|
['hideEveningExceptLatest', PREFERENCE],
|
|
743
771
|
// VRVP / Agg VRVP Last bars and Last days scopes: the bar and trading-day counts (stamped only on rows that use them).
|
|
744
|
-
['compositeBars',
|
|
745
|
-
['compositeDays',
|
|
772
|
+
['compositeBars', RELATIVE],
|
|
773
|
+
['compositeDays', RELATIVE],
|
|
746
774
|
// SVP / Agg SVP Custom session: the block length ({ count, unit }); `session` carries the derived ms.
|
|
747
|
-
['customSessionLength',
|
|
775
|
+
['customSessionLength', RELATIVE],
|
|
748
776
|
// Volume profiles: the printed profile stats (profileStatsLabels is derived on every mount and never declared).
|
|
749
777
|
['profileStats', PREFERENCE],
|
|
750
778
|
['profileStatsPosition', PREFERENCE],
|
|
@@ -752,7 +780,7 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
752
780
|
['showVWAP', PREFERENCE],
|
|
753
781
|
['vwapColor', PREFERENCE],
|
|
754
782
|
['showVWAPLabel', PREFERENCE],
|
|
755
|
-
['levelLineWidth',
|
|
783
|
+
['levelLineWidth', RELATIVE],
|
|
756
784
|
['levelLineStyle', PREFERENCE],
|
|
757
785
|
['rowText', PREFERENCE],
|
|
758
786
|
// Footprint live animation (the Animate Live Updates switch writes both); absent = titan's on.
|
|
@@ -760,16 +788,16 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
760
788
|
['liveGrowth', PREFERENCE],
|
|
761
789
|
// Stepped shading: footprint cells and volume-profile bars (heat by % of the POC) share these keys.
|
|
762
790
|
['cellShading', PREFERENCE],
|
|
763
|
-
['shadingSteps',
|
|
764
|
-
['shadingThresholds',
|
|
791
|
+
['shadingSteps', RELATIVE],
|
|
792
|
+
['shadingThresholds', RELATIVE],
|
|
765
793
|
['shadingStepColors', PREFERENCE],
|
|
766
794
|
// Footprint Sierra look and columns layout.
|
|
767
795
|
['highlightExtremes', PREFERENCE],
|
|
768
796
|
['highlightMaxColor', PREFERENCE],
|
|
769
797
|
['highlightMinColor', PREFERENCE],
|
|
770
798
|
['imbalanceMethod', PREFERENCE],
|
|
771
|
-
['imbalanceMinVolume',
|
|
772
|
-
['cellFontSize',
|
|
799
|
+
['imbalanceMinVolume', AMOUNT],
|
|
800
|
+
['cellFontSize', RELATIVE],
|
|
773
801
|
['fullNumbers', PREFERENCE],
|
|
774
802
|
['showValueAreaBand', PREFERENCE],
|
|
775
803
|
['candleMarker', PREFERENCE],
|
|
@@ -813,10 +841,10 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
813
841
|
['colorsBySide', PREFERENCE],
|
|
814
842
|
// TPO's trading-hour stamp (2026-11-05, TPO_TRADING_HOUR_VERSION): without it a reload reads a picked All Hours as
|
|
815
843
|
// the old default and turns it into Chart.
|
|
816
|
-
['tradingHourVersion',
|
|
844
|
+
['tradingHourVersion', RELATIVE],
|
|
817
845
|
// The footprint anchor's read stamp (2026-11-07, footprint-anchor-tick.util): a stamped anchor only moves finer, an
|
|
818
846
|
// older read's may heal coarser. Appended here, after the rows the golden fixture knows (row-keys.golden.spec).
|
|
819
|
-
['anchorTickInference',
|
|
847
|
+
['anchorTickInference', AMOUNT],
|
|
820
848
|
// The Fixed Range Volume Profile's range candle (2026-11-13, Dynamic Profile parity): 'none', 'body', 'outline' or
|
|
821
849
|
// 'openClose'. Declared here so the companion's workspace row keeps it; draw-only, no refetch.
|
|
822
850
|
['rangeCandle', PREFERENCE],
|
|
@@ -829,13 +857,13 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
829
857
|
*/
|
|
830
858
|
const FEED_FIELDS = [
|
|
831
859
|
['title', PREFERENCE],
|
|
832
|
-
['cadence_s',
|
|
860
|
+
['cadence_s', RELATIVE],
|
|
833
861
|
['units', PREFERENCE],
|
|
834
862
|
['version', PREFERENCE],
|
|
835
863
|
['plot', PREFERENCE],
|
|
836
864
|
['color', PREFERENCE],
|
|
837
865
|
['pane', PREFERENCE],
|
|
838
|
-
['column',
|
|
866
|
+
['column', RELATIVE],
|
|
839
867
|
];
|
|
840
868
|
/**
|
|
841
869
|
* The metric profiles (metric-profile.util): the render keys the save door derives from `scope` and the row's display
|
|
@@ -854,7 +882,7 @@ const METRIC_PROFILE_FIELDS = [
|
|
|
854
882
|
['levelBasis', PREFERENCE],
|
|
855
883
|
['rowDisplay', PREFERENCE],
|
|
856
884
|
// The Cluster labels row of a member with a cluster look; its suffix, floor and row sizes are engine-only defaults.
|
|
857
|
-
['clusterLabelCount',
|
|
885
|
+
['clusterLabelCount', RELATIVE],
|
|
858
886
|
];
|
|
859
887
|
/**
|
|
860
888
|
* The Symbol Comparison overlays (new price scale, same % scale, new pane): the name the user gave the series (`label`,
|
|
@@ -880,18 +908,18 @@ const DERIVED_CHAIN_PICK = { lanes: ['row', 'template', 'default'], marketBound:
|
|
|
880
908
|
const OPTIONS_HEATMAP_FIELDS = [
|
|
881
909
|
['chain', DERIVED_CHAIN_PICK],
|
|
882
910
|
['showNodes', PREFERENCE],
|
|
883
|
-
['nodePct',
|
|
884
|
-
['velocityWindow',
|
|
911
|
+
['nodePct', RELATIVE],
|
|
912
|
+
['velocityWindow', RELATIVE],
|
|
885
913
|
['cellShape', PREFERENCE],
|
|
886
914
|
['lowNodes', PREFERENCE],
|
|
887
915
|
['dataSource', PREFERENCE],
|
|
888
916
|
// The node look knobs (NODE-KNOBS 2026-10-28): the smallest node and the faintest, percent sliders, and the biggest
|
|
889
917
|
// in px (`nodeMaxPx`, NODE-PX 2026-11-02). `nodeMaxSize` is the biggest node's legacy percent: kept so a save carries
|
|
890
918
|
// a saved value through for the production build, which still reads it from the settings store INT shares.
|
|
891
|
-
['nodeMinSize',
|
|
892
|
-
['nodeMaxSize',
|
|
893
|
-
['nodeMaxPx',
|
|
894
|
-
['nodeMinOpacity',
|
|
919
|
+
['nodeMinSize', RELATIVE],
|
|
920
|
+
['nodeMaxSize', RELATIVE],
|
|
921
|
+
['nodeMaxPx', RELATIVE],
|
|
922
|
+
['nodeMinOpacity', RELATIVE],
|
|
895
923
|
// 'user' once the user picked the basis in the settings dialog: a governed host's market switch and restore reset
|
|
896
924
|
// only a naive basis the old switch forced (the control's `governedBasisReset`), so the mark travels with `basis`.
|
|
897
925
|
['basisSource', PREFERENCE],
|
|
@@ -932,10 +960,95 @@ const TPO_FIELDS = [
|
|
|
932
960
|
// whose own pick turned the volume on, that TPO's note stands (review 2026-11-17, left as is: no reader can tell).
|
|
933
961
|
['volumeOnlyTurnedVolumeOn', { lanes: ['row', 'template', 'default'], unset: false }],
|
|
934
962
|
];
|
|
963
|
+
/**
|
|
964
|
+
* A heatmap's scale stamp (settings-templates/market-bound): `boundKey` names the market its `meta` range, outer
|
|
965
|
+
* range, range source and size ceiling were measured or typed on, with a signature of those values, and
|
|
966
|
+
* `boundByMarket` keeps the typed values of the markets the row left. The row keeps both; they are no preference (a
|
|
967
|
+
* template or a saved default never carries a stamp of another instance) and no identity (the factory init never
|
|
968
|
+
* reads them as which instance this is). Declared per heatmap type, never shared: a shared row would shadow a script
|
|
969
|
+
* input of the same name.
|
|
970
|
+
*/
|
|
971
|
+
const BOUND_STAMP = { lanes: ['row'] };
|
|
972
|
+
/**
|
|
973
|
+
* The same two rows on every type with a kept bound field (a typed threshold, ./market-bound reconcileMarketBound):
|
|
974
|
+
* the market the typed values were typed on, with their signature, and the typed values of the markets the row left.
|
|
975
|
+
*/
|
|
976
|
+
const BOUND_STAMP_FIELDS = [
|
|
977
|
+
['boundKey', BOUND_STAMP],
|
|
978
|
+
['boundByMarket', BOUND_STAMP],
|
|
979
|
+
];
|
|
980
|
+
const HEATMAP_SCALE_STAMP_FIELDS = BOUND_STAMP_FIELDS;
|
|
981
|
+
/** The four heatmap types whose meta scale is settled by the heatmap's own path (wave 1: settleHeatmapScale). */
|
|
982
|
+
export const HEATMAP_SCALE_TYPES = [
|
|
983
|
+
'ORDERBOOK_HEATMAP',
|
|
984
|
+
'AGGREGATED_ORDERBOOK_HEATMAP',
|
|
985
|
+
'HYPERLIQUID_LIQUIDATION_HEATMAP',
|
|
986
|
+
'HYPERLIQUID_TPSL_HEATMAP',
|
|
987
|
+
];
|
|
988
|
+
/** A volume in the row's unit (`currency`: 'Coin' or 'USD', missing reads 'Coin'): native unless the unit is USD. */
|
|
989
|
+
const UNIT_NOT_USD = { key: 'currency', noneOf: ['USD'] };
|
|
990
|
+
/** A typed threshold preference, bound in the row's native unit. */
|
|
991
|
+
const TYPED_IN_UNIT = { ...PREFERENCE, quantity: 'bound', keep: 'typed', boundWhen: UNIT_NOT_USD };
|
|
992
|
+
/** A volume profile's or TPO's threshold, typed in the row's unit, and the two stamp rows. */
|
|
993
|
+
const PROFILE_THRESHOLD_FIELDS = [['threshold', TYPED_IN_UNIT], ...BOUND_STAMP_FIELDS];
|
|
994
|
+
/**
|
|
995
|
+
* Both footprints' typed volumes (the Filters tab's threshold and cell rules, the imbalance minimum volume): compared
|
|
996
|
+
* with cell volumes in the row's unit. `cellRules` is one container, kept and given back whole.
|
|
997
|
+
*/
|
|
998
|
+
const FOOTPRINT_VOLUME_FIELDS = [
|
|
999
|
+
['threshold', TYPED_IN_UNIT],
|
|
1000
|
+
['imbalanceMinVolume', TYPED_IN_UNIT],
|
|
1001
|
+
['cellRules', TYPED_IN_UNIT],
|
|
1002
|
+
];
|
|
1003
|
+
/** A Big Trades floor in coins or contracts. Its rows keep no lane: the type's own code persists and carries them. */
|
|
1004
|
+
const BIG_TRADES_FLOOR = { lanes: [], quantity: 'bound', keep: 'typed' };
|
|
1005
|
+
/** A Big Trades size's market default: kept, given back and removed with its size (the size's `with`). */
|
|
1006
|
+
const BIG_TRADES_FLOOR_DEFAULT = { lanes: [], quantity: 'bound' };
|
|
1007
|
+
const BIG_TRADES_DOLLARS = { lanes: [], quantity: 'amount' };
|
|
1008
|
+
const BIG_TRADES_RELATIVE = { lanes: [], quantity: 'relative' };
|
|
1009
|
+
/**
|
|
1010
|
+
* The phone app's Big Trades (`BIG_TRADES`), in both spellings its rows hold: the camelCase settings its chart page
|
|
1011
|
+
* reads (chart-web big-trades fold.ts resolveBigTradesSettings, market-size.ts BIG_TRADES_SIZE_DEFAULT_KEYS) and the
|
|
1012
|
+
* snake_case rows of its browser-run twin (big-trades-template-carry.ts FLOORS). Coin and contract floors are typed
|
|
1013
|
+
* in the market's unit; the dollar floors are amounts; the cap and the bubble size are counts. Only a row of type
|
|
1014
|
+
* `BIG_TRADES` is settled: the twin's rows live on a script row, which no reader settles (its values follow the run
|
|
1015
|
+
* head's market size rule, utility/wrun/wrun-market-size-defaults.util), so their class here is a record only.
|
|
1016
|
+
*/
|
|
1017
|
+
const BIG_TRADES_FIELDS = [
|
|
1018
|
+
['minCoins', BIG_TRADES_FLOOR],
|
|
1019
|
+
['whaleCoins', BIG_TRADES_FLOOR],
|
|
1020
|
+
['minSize', { ...BIG_TRADES_FLOOR, with: ['minSizeDefault'] }],
|
|
1021
|
+
['minSizeDefault', BIG_TRADES_FLOOR_DEFAULT],
|
|
1022
|
+
['whaleSize', { ...BIG_TRADES_FLOOR, with: ['whaleSizeDefault'] }],
|
|
1023
|
+
['whaleSizeDefault', BIG_TRADES_FLOOR_DEFAULT],
|
|
1024
|
+
['minValue', BIG_TRADES_DOLLARS],
|
|
1025
|
+
['whaleValue', BIG_TRADES_DOLLARS],
|
|
1026
|
+
// The dollar floors' market defaults and the values carried over from the coin sizes: dollars too.
|
|
1027
|
+
['minValueDefault', BIG_TRADES_DOLLARS],
|
|
1028
|
+
['whaleValueDefault', BIG_TRADES_DOLLARS],
|
|
1029
|
+
['minValueCarried', BIG_TRADES_DOLLARS],
|
|
1030
|
+
['whaleValueCarried', BIG_TRADES_DOLLARS],
|
|
1031
|
+
['maxPerBar', BIG_TRADES_RELATIVE],
|
|
1032
|
+
['bubbleSize', BIG_TRADES_RELATIVE],
|
|
1033
|
+
['min_size', BIG_TRADES_FLOOR],
|
|
1034
|
+
['whale_size', BIG_TRADES_FLOOR],
|
|
1035
|
+
['min_coins', BIG_TRADES_FLOOR],
|
|
1036
|
+
['whale_coins', BIG_TRADES_FLOOR],
|
|
1037
|
+
['min_contracts', BIG_TRADES_FLOOR],
|
|
1038
|
+
['whale_contracts', BIG_TRADES_FLOOR],
|
|
1039
|
+
['min_value', BIG_TRADES_DOLLARS],
|
|
1040
|
+
['whale_value', BIG_TRADES_DOLLARS],
|
|
1041
|
+
['max_per_bar', BIG_TRADES_RELATIVE],
|
|
1042
|
+
...BOUND_STAMP_FIELDS,
|
|
1043
|
+
];
|
|
935
1044
|
/** The VRVP own-window scope rows (see INDICATOR_TYPE_FIELDS below). */
|
|
936
1045
|
const VISIBLE_RANGE_PROFILE_FIELDS = [
|
|
937
1046
|
['profileWindow', PREFERENCE],
|
|
938
1047
|
['periodMarkers', PREFERENCE],
|
|
1048
|
+
// The Current period scope's period ('day' | 'week' | 'month' | 'year', absent reads 'month'): its own key, never
|
|
1049
|
+
// `profilePeriod`, which an older build resolves as a prior period ('year' would read 'day'). The engine-only keys
|
|
1050
|
+
// it derives (`periodStartMs`, `profileRowMs`, `cleanText`) stay out: `cleanText` is translated text.
|
|
1051
|
+
['currentPeriod', PREFERENCE],
|
|
939
1052
|
];
|
|
940
1053
|
/**
|
|
941
1054
|
* The fields one indicator type declares beyond INDICATOR_COMMON_FIELDS: a row here adds a key, or replaces the shared
|
|
@@ -950,21 +1063,55 @@ export const INDICATOR_TYPE_FIELDS = {
|
|
|
950
1063
|
* `profileWindow: 'data'` on every mount, and a shared row would make the restore pick write that into each of its
|
|
951
1064
|
* rows.
|
|
952
1065
|
*/
|
|
953
|
-
DELTA_PROFILE: [['profileWindow', PREFERENCE]],
|
|
1066
|
+
DELTA_PROFILE: [['profileWindow', PREFERENCE], ...PROFILE_THRESHOLD_FIELDS],
|
|
954
1067
|
/**
|
|
955
|
-
* VRVP and Agg VRVP own-window scopes (Recent, Last bars, Last days, Prior period): the window kind
|
|
956
|
-
* markers the scope writes beside `scope
|
|
1068
|
+
* VRVP and Agg VRVP own-window scopes (Recent, Last bars, Last days, Prior period, Current period): the window kind,
|
|
1069
|
+
* the period markers the scope writes beside `scope`, and the current period it reads. Scoped like DELTA_PROFILE, because the Developing Session Profile stamps
|
|
957
1070
|
* `profileWindow: 'data'` on every mount.
|
|
958
1071
|
*/
|
|
959
|
-
VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
|
|
960
|
-
AGGREGATED_VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
|
|
1072
|
+
VISIBLE_RANGE_VOLUME_PROFILE: [...VISIBLE_RANGE_PROFILE_FIELDS, ...PROFILE_THRESHOLD_FIELDS],
|
|
1073
|
+
AGGREGATED_VISIBLE_RANGE_VOLUME_PROFILE: [...VISIBLE_RANGE_PROFILE_FIELDS, ...PROFILE_THRESHOLD_FIELDS],
|
|
1074
|
+
// The volume profiles' threshold is a volume in the row's unit (each control: `currency ?? 'Coin'`).
|
|
1075
|
+
SESSION_VOLUME_PROFILE: PROFILE_THRESHOLD_FIELDS,
|
|
1076
|
+
AGGREGATED_SESSION_VOLUME_PROFILE: PROFILE_THRESHOLD_FIELDS,
|
|
1077
|
+
DEVELOPING_SESSION_PROFILE: PROFILE_THRESHOLD_FIELDS,
|
|
1078
|
+
// The FRVP companion's threshold is a volume too, left carried on purpose (classified, never reconciled).
|
|
1079
|
+
FIXED_RANGE_VOLUME_PROFILE: [['threshold', { ...PREFERENCE, quantity: 'bound' }]],
|
|
1080
|
+
// Both footprints' typed volumes; the single-venue one's Big trades threshold is bound only in Native.
|
|
1081
|
+
VOLUME_FOOTPRINT: [
|
|
1082
|
+
...FOOTPRINT_VOLUME_FIELDS,
|
|
1083
|
+
[
|
|
1084
|
+
'bigTradesThreshold',
|
|
1085
|
+
{
|
|
1086
|
+
...PREFERENCE,
|
|
1087
|
+
quantity: 'bound',
|
|
1088
|
+
keep: 'typed',
|
|
1089
|
+
boundWhen: { key: 'bigTradesThresholdUnit', oneOf: ['native'] },
|
|
1090
|
+
},
|
|
1091
|
+
],
|
|
1092
|
+
...BOUND_STAMP_FIELDS,
|
|
1093
|
+
],
|
|
1094
|
+
AGGREGATED_VOLUME_FOOTPRINT: [...FOOTPRINT_VOLUME_FIELDS, ...BOUND_STAMP_FIELDS],
|
|
961
1095
|
ORDERBOOK_PROFILE: ORDERBOOK_PROFILE_FIELDS,
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1096
|
+
// The TPO volume threshold hides rows under a volume in the row's unit (`currency || 'Coin'`).
|
|
1097
|
+
TIME_PRICE_OPPORTUNITY: [...TPO_FIELDS, ['volumeThreshold', TYPED_IN_UNIT], ...BOUND_STAMP_FIELDS],
|
|
1098
|
+
AGGREGATED_TIME_PRICE_OPPORTUNITY: [...TPO_FIELDS, ['volumeThreshold', TYPED_IN_UNIT], ...BOUND_STAMP_FIELDS],
|
|
1099
|
+
// The Open Interest Profile reads native units whatever the row holds (its member's fixed 'Coin'); the Liquidation
|
|
1100
|
+
// Profile reads USD, so its threshold is the shared row's amount.
|
|
1101
|
+
OPEN_INTEREST_PROFILE: [
|
|
1102
|
+
...METRIC_PROFILE_FIELDS,
|
|
1103
|
+
['threshold', { ...PREFERENCE, quantity: 'bound', keep: 'typed' }],
|
|
1104
|
+
...BOUND_STAMP_FIELDS,
|
|
1105
|
+
],
|
|
965
1106
|
LIQUIDATION_PROFILE: METRIC_PROFILE_FIELDS,
|
|
1107
|
+
BIG_TRADES: BIG_TRADES_FIELDS,
|
|
966
1108
|
OPTIONS_HEATMAP: OPTIONS_HEATMAP_FIELDS,
|
|
967
1109
|
OPTIONS_GEX: OPTIONS_GEX_FIELDS,
|
|
1110
|
+
// The four heatmaps whose scale is bound to the market it was measured on (HEATMAP_SCALE_STAMP_FIELDS).
|
|
1111
|
+
ORDERBOOK_HEATMAP: HEATMAP_SCALE_STAMP_FIELDS,
|
|
1112
|
+
AGGREGATED_ORDERBOOK_HEATMAP: HEATMAP_SCALE_STAMP_FIELDS,
|
|
1113
|
+
HYPERLIQUID_LIQUIDATION_HEATMAP: HEATMAP_SCALE_STAMP_FIELDS,
|
|
1114
|
+
HYPERLIQUID_TPSL_HEATMAP: HEATMAP_SCALE_STAMP_FIELDS,
|
|
968
1115
|
SYMBOL_COMPARISON_SCALE: SYMBOL_COMPARISON_FIELDS,
|
|
969
1116
|
SYMBOL_COMPARISON_PCT_SCALE: SYMBOL_COMPARISON_FIELDS,
|
|
970
1117
|
SYMBOL_COMPARISON_PANE: SYMBOL_COMPARISON_FIELDS,
|
|
@@ -978,7 +1125,7 @@ export const INDICATOR_TYPE_FIELDS = {
|
|
|
978
1125
|
/** The trade sides and the period (TurnoverRatioSettings.vue); the control re-checks the period on its interval. */
|
|
979
1126
|
TURNOVER_RATIO: [
|
|
980
1127
|
['sides', META_PREFERENCE],
|
|
981
|
-
['period',
|
|
1128
|
+
['period', META_RELATIVE],
|
|
982
1129
|
],
|
|
983
1130
|
/**
|
|
984
1131
|
* The asset type (SectorVolumeSettings.vue `meta.assetType`) is a preference. The exchanges are derived: the asset
|
|
@@ -1019,7 +1166,7 @@ export const INDICATOR_TYPE_FIELDS = {
|
|
|
1019
1166
|
* are a preference; the Style page's names (`meta.plots`) are derived from them at every mount.
|
|
1020
1167
|
*/
|
|
1021
1168
|
MA_RIBBON: [
|
|
1022
|
-
['lines',
|
|
1169
|
+
['lines', META_RELATIVE],
|
|
1023
1170
|
['plots', META_DERIVED],
|
|
1024
1171
|
],
|
|
1025
1172
|
/** Net Longs & Shorts: Per candle or Running total (OpenInterestPositionsSettings.vue `meta.display`). */
|