@orangecharts/wrun-chart-host 0.9.0 → 0.11.0
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.d.ts +15 -1
- package/dist/constants/feature-flags.constants.js +130 -24
- package/dist/constants/governed-exchanges.constants.d.ts +12 -0
- package/dist/constants/governed-exchanges.constants.js +16 -0
- package/dist/constants/opra-compliance.constants.d.ts +3 -2
- package/dist/constants/opra-compliance.constants.js +3 -2
- package/dist/constants/option-venues.constants.d.ts +2 -2
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
- package/dist/constants/venue-presets.constants.d.ts +20 -20
- package/dist/constants/venue-presets.constants.js +24 -26
- package/dist/host-env.d.ts +21 -5
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +102 -19
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
- package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
- package/dist/interfaces/cme-realtime.interface.js +6 -3
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +12 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
- package/dist/interfaces/prediction-market.interface.d.ts +7 -0
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
- package/dist/interfaces/stocks-realtime.interface.js +32 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +62 -94
- package/dist/kscript-data/controls/live-trades-merge.util.js +106 -171
- package/dist/market-data/billing.interface.d.ts +174 -36
- package/dist/market-data/billing.interface.js +58 -8
- package/dist/market-data/venue.d.ts +152 -7
- package/dist/market-data/venues/cme.contract.copy.json +66 -0
- package/dist/market-data/venues/cme.d.ts +126 -0
- package/dist/market-data/venues/cme.js +133 -0
- package/dist/market-data/venues/index.d.ts +294 -7
- package/dist/market-data/venues/index.js +49 -6
- package/dist/market-data/venues/opra.contract.copy.json +3 -2
- package/dist/market-data/venues/opra.d.ts +2 -2
- package/dist/market-data/venues/opra.js +5 -2
- package/dist/market-data/venues/stocks.contract.copy.json +64 -0
- package/dist/market-data/venues/stocks.d.ts +130 -0
- package/dist/market-data/venues/stocks.js +117 -0
- package/dist/settings-templates/footprint-rows.js +35 -2
- package/dist/settings-templates/form-rows.d.ts +2 -1
- package/dist/settings-templates/index.js +7 -3
- package/dist/settings-templates/indicator-fields.d.ts +5 -4
- package/dist/settings-templates/indicator-fields.js +79 -10
- package/dist/settings-templates/tool-rules.d.ts +32 -15
- package/dist/settings-templates/tool-rules.js +33 -11
- package/dist/settings-templates/tool-tables.generated.js +95 -31
- package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
- package/dist/utility/chart/book-live-bucket.util.js +47 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
- package/dist/utility/chart/cme-cache-context.util.js +10 -6
- package/dist/utility/chart/cme-realtime.util.js +10 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
- package/dist/utility/chart/effective-chart-session.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
- package/dist/utility/chart/host-bar-placement.util.js +170 -30
- package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
- package/dist/utility/chart/index-host-tier.util.js +7 -2
- package/dist/utility/chart/index-mode-admission.util.js +30 -3
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +9 -7
- package/dist/utility/chart/kscript-live-coalesce.util.js +13 -8
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
- package/dist/utility/chart/kscript-provenance-keys.util.js +13 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +5 -1
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +156 -43
- package/dist/utility/chart/kscript-venue-policy.util.js +249 -59
- package/dist/utility/chart/live-bucket.util.d.ts +24 -8
- package/dist/utility/chart/live-bucket.util.js +85 -27
- package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
- package/dist/utility/chart/market-session-schedule.util.js +16 -0
- package/dist/utility/chart/marketKind.util.js +5 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
- package/dist/utility/chart/mixed-mode.util.js +14 -0
- package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
- package/dist/utility/chart/opra-read-access.leaf.js +5 -3
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
- package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
- package/dist/utility/chart/rth-session.util.d.ts +12 -10
- package/dist/utility/chart/rth-session.util.js +25 -21
- package/dist/utility/chart/trading-day.util.d.ts +17 -0
- package/dist/utility/chart/trading-day.util.js +59 -0
- package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
- package/dist/utility/chart/window-geometry.leaf.js +22 -6
- package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
- package/dist/utility/chart/window-owner.leaf.js +45 -3
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
- package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
- package/dist/utility/chart/wrun-run-result.util.d.ts +12 -0
- package/dist/utility/chart/wrun-run-result.util.js +141 -6
- package/dist/utility/intl-locale.util.js +5 -0
- package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
- package/dist/utility/options/option-bar-anchor.util.js +340 -0
- package/dist/utility/options/option-venue.util.d.ts +18 -0
- package/dist/utility/options/option-venue.util.js +27 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +4 -0
- package/dist/utility/v2/gate-plane.util.d.ts +12 -3
- package/dist/utility/v2/gate-plane.util.js +30 -4
- package/dist/utility/v2/gate-session-latch.util.js +1 -1
- package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
- package/dist/utility/v2/stocks-governed.util.js +34 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
- package/dist/utility/wrun/derived-roots.leaf.js +27 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +205 -0
- package/dist/utility/wrun/derived-roots.util.js +451 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +43 -7
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -2
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -2
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
- package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
- package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +3 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +19 -4
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +52 -13
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +88 -19
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +2 -1
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +24 -9
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +41 -10
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +111 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +133 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +15 -3
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +22 -3
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +197 -13
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +761 -27
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +60 -16
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +113 -61
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +14 -2
- package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
- package/dist/utility/wrun/wrun-frames.d.ts +27 -6
- package/dist/utility/wrun/wrun-frames.js +73 -10
- package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-handles.util.js +9 -8
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +18 -4
- package/dist/utility/wrun/wrun-hud-looks.util.js +45 -13
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
- package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +35 -15
- package/dist/utility/wrun/wrun-live-intake.util.js +243 -126
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-live-tick.util.js +279 -99
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +60 -11
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +70 -5
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +31 -5
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
- package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
- package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
- package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +23 -6
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +47 -11
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +86 -19
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +168 -62
- package/dist/utility/wrun/wrun-option-views.util.d.ts +323 -28
- package/dist/utility/wrun/wrun-option-views.util.js +484 -71
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
- package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-output-style.util.js +20 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +32 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +160 -42
- package/dist/utility/wrun/wrun-overlay-run.util.js +1244 -209
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +114 -19
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +10 -9
- package/dist/utility/wrun/wrun-panel-style.util.js +58 -9
- package/dist/utility/wrun/wrun-param-map.util.d.ts +14 -11
- package/dist/utility/wrun/wrun-param-map.util.js +10 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +14 -4
- package/dist/utility/wrun/wrun-param-values.util.js +4 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.js +39 -14
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
- package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal.util.js +22 -0
- package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
- package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +43 -9
- package/dist/utility/wrun/wrun-run-interval.util.js +58 -15
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +45 -1
- package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
- package/dist/utility/wrun/wrun-socket-row-source.js +118 -8
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -18
- package/dist/utility/wrun/wrun-source-rows.util.js +61 -27
- package/dist/utility/wrun/wrun-style-words.util.js +6 -4
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
- package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-tape-per-order.util.js +7 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
- package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/dist/workers/constants/socket-slots.d.ts +91 -6
- package/dist/workers/constants/socket-slots.js +85 -6
- package/package.json +5 -5
|
@@ -9,15 +9,24 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
9
9
|
lineWidth: 2,
|
|
10
10
|
lineStyle: 'solid',
|
|
11
11
|
fillBackground: true,
|
|
12
|
+
fillColor: '#4DA3FF',
|
|
12
13
|
backgroundOpacity: 10,
|
|
13
14
|
showLabels: true,
|
|
14
15
|
},
|
|
15
|
-
AnchoredNote: {
|
|
16
|
+
AnchoredNote: {
|
|
17
|
+
fontColor: '#4DA3FF',
|
|
18
|
+
fontFamily: 'Poppins',
|
|
19
|
+
fontSize: 24,
|
|
20
|
+
fontStyle: 'normal',
|
|
21
|
+
textPosition: 'center',
|
|
22
|
+
color: '#4DA3FF',
|
|
23
|
+
},
|
|
16
24
|
AnchoredText: {
|
|
17
25
|
fontColor: '#4DA3FF',
|
|
18
26
|
fontFamily: 'Poppins',
|
|
19
27
|
fontSize: 24,
|
|
20
28
|
fontStyle: 'normal',
|
|
29
|
+
textPosition: 'center',
|
|
21
30
|
color: '#4DA3FF',
|
|
22
31
|
fillBackground: false,
|
|
23
32
|
fillColor: '#F7D774',
|
|
@@ -77,7 +86,14 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
77
86
|
ArrowMarker: { color: '#1E90FF80', lineWidth: 2, lineStyle: 'solid' },
|
|
78
87
|
BarPattern: { color: '#4DA3FF', patternMode: 'lineClose', transparency: 0, mirrored: false, flipped: false },
|
|
79
88
|
Burj: { color: '#FFBED3', highlight: false, lineWidth: 2 },
|
|
80
|
-
Callout: {
|
|
89
|
+
Callout: {
|
|
90
|
+
fontColor: '#4DA3FF',
|
|
91
|
+
fontFamily: 'Poppins',
|
|
92
|
+
fontSize: 24,
|
|
93
|
+
fontStyle: 'normal',
|
|
94
|
+
textPosition: 'center',
|
|
95
|
+
color: '#4DA3FF',
|
|
96
|
+
},
|
|
81
97
|
Circle: {
|
|
82
98
|
color: '#4DA3FF',
|
|
83
99
|
borderColor: '#4DA3FF',
|
|
@@ -102,26 +118,28 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
102
118
|
lineWidth: 2,
|
|
103
119
|
lineStyle: 'solid',
|
|
104
120
|
fillBackground: true,
|
|
121
|
+
fillColor: '#4DA3FF',
|
|
105
122
|
backgroundOpacity: 10,
|
|
106
123
|
showLabels: true,
|
|
107
124
|
},
|
|
108
|
-
DatePriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232' },
|
|
109
|
-
DateRange: { color: '#00C2A8' },
|
|
110
|
-
DisjointChannel: {
|
|
111
|
-
Divergence: { bullishColor: '#60F09A', bearishColor: '#FF6E5F', highlight: false, lineWidth: 2 },
|
|
112
|
-
DoubleCurve: {
|
|
125
|
+
DatePriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232', lineWidth: 2, lineStyle: 'solid' },
|
|
126
|
+
DateRange: { color: '#00C2A8', lineWidth: 2, lineStyle: 'solid' },
|
|
127
|
+
DisjointChannel: {
|
|
113
128
|
color: '#4DA3FF',
|
|
114
|
-
borderColor: '#4DA3FF',
|
|
115
129
|
lineWidth: 2,
|
|
116
130
|
lineStyle: 'solid',
|
|
117
131
|
fillBackground: true,
|
|
118
|
-
|
|
132
|
+
fillColor: '#4DA3FF',
|
|
133
|
+
backgroundOpacity: 10,
|
|
119
134
|
},
|
|
135
|
+
Divergence: { bullishColor: '#60F09A', bearishColor: '#FF6E5F', highlight: false, lineWidth: 2 },
|
|
136
|
+
DoubleCurve: { borderColor: '#4DA3FF', lineWidth: 2, lineStyle: 'solid' },
|
|
120
137
|
ElliottCorrection: {
|
|
121
138
|
color: '#4DA3FF',
|
|
122
139
|
lineWidth: 2,
|
|
123
140
|
lineStyle: 'solid',
|
|
124
141
|
fillBackground: false,
|
|
142
|
+
fillColor: '#4DA3FF',
|
|
125
143
|
backgroundOpacity: 10,
|
|
126
144
|
showLabels: true,
|
|
127
145
|
},
|
|
@@ -130,6 +148,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
130
148
|
lineWidth: 2,
|
|
131
149
|
lineStyle: 'solid',
|
|
132
150
|
fillBackground: false,
|
|
151
|
+
fillColor: '#4DA3FF',
|
|
133
152
|
backgroundOpacity: 10,
|
|
134
153
|
showLabels: true,
|
|
135
154
|
},
|
|
@@ -138,6 +157,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
138
157
|
lineWidth: 2,
|
|
139
158
|
lineStyle: 'solid',
|
|
140
159
|
fillBackground: false,
|
|
160
|
+
fillColor: '#4DA3FF',
|
|
141
161
|
backgroundOpacity: 10,
|
|
142
162
|
showLabels: true,
|
|
143
163
|
},
|
|
@@ -146,6 +166,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
146
166
|
lineWidth: 2,
|
|
147
167
|
lineStyle: 'solid',
|
|
148
168
|
fillBackground: false,
|
|
169
|
+
fillColor: '#4DA3FF',
|
|
149
170
|
backgroundOpacity: 10,
|
|
150
171
|
showLabels: true,
|
|
151
172
|
},
|
|
@@ -154,6 +175,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
154
175
|
lineWidth: 2,
|
|
155
176
|
lineStyle: 'solid',
|
|
156
177
|
fillBackground: false,
|
|
178
|
+
fillColor: '#4DA3FF',
|
|
157
179
|
backgroundOpacity: 10,
|
|
158
180
|
showLabels: true,
|
|
159
181
|
},
|
|
@@ -376,6 +398,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
376
398
|
{ value: 4.618, color: '#9E7548', enabled: false },
|
|
377
399
|
{ value: 4.764, color: '#00BCD4', enabled: false },
|
|
378
400
|
],
|
|
401
|
+
levelsOnLogScale: false,
|
|
379
402
|
},
|
|
380
403
|
FibonacciTrend: {
|
|
381
404
|
lineWidth: 2,
|
|
@@ -416,10 +439,18 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
416
439
|
{ value: 4.618, color: '#9E7548', enabled: false },
|
|
417
440
|
{ value: 4.764, color: '#00BCD4', enabled: false },
|
|
418
441
|
],
|
|
442
|
+
levelsOnLogScale: false,
|
|
419
443
|
},
|
|
420
444
|
FixedRangeVolumeProfile: {},
|
|
421
445
|
FlagMark: { color: '#4DA3FF' },
|
|
422
|
-
FlatTopBottom: {
|
|
446
|
+
FlatTopBottom: {
|
|
447
|
+
color: '#4DA3FF',
|
|
448
|
+
lineWidth: 2,
|
|
449
|
+
lineStyle: 'solid',
|
|
450
|
+
fillBackground: true,
|
|
451
|
+
fillColor: '#4DA3FF',
|
|
452
|
+
backgroundOpacity: 10,
|
|
453
|
+
},
|
|
423
454
|
Flow: { color: '#044391', highlight: false, lineWidth: 2 },
|
|
424
455
|
Fork: { color: '#5AA0FF', highlight: false, lineWidth: 2 },
|
|
425
456
|
GannBox: {
|
|
@@ -584,10 +615,11 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
584
615
|
lineWidth: 2,
|
|
585
616
|
lineStyle: 'solid',
|
|
586
617
|
fillBackground: true,
|
|
618
|
+
fillColor: '#4DA3FF',
|
|
587
619
|
backgroundOpacity: 10,
|
|
588
620
|
showLabels: true,
|
|
589
621
|
},
|
|
590
|
-
Highlighter: { color: 'rgba(242, 201, 76, 0.4)', lineWidth: 14, smoothing: 10 },
|
|
622
|
+
Highlighter: { color: 'rgba(242, 201, 76, 0.4)', lineStyle: 'solid', lineWidth: 14, smoothing: 10 },
|
|
591
623
|
HorizontalLine: {
|
|
592
624
|
color: '#4DA3FF',
|
|
593
625
|
fontColor: '#4DA3FF',
|
|
@@ -689,7 +721,14 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
689
721
|
],
|
|
690
722
|
},
|
|
691
723
|
Momentum: { color: '#00FF7F', highlight: true, lineWidth: 2 },
|
|
692
|
-
Note: {
|
|
724
|
+
Note: {
|
|
725
|
+
fontColor: '#4DA3FF',
|
|
726
|
+
fontFamily: 'Poppins',
|
|
727
|
+
fontSize: 24,
|
|
728
|
+
fontStyle: 'normal',
|
|
729
|
+
textPosition: 'center',
|
|
730
|
+
color: '#4DA3FF',
|
|
731
|
+
},
|
|
693
732
|
ParallelLine: {
|
|
694
733
|
color: '#4DA3FF',
|
|
695
734
|
fontColor: '#4DA3FF',
|
|
@@ -701,9 +740,10 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
701
740
|
fontWeight: 400,
|
|
702
741
|
fontStyle: 'normal',
|
|
703
742
|
fillBackground: true,
|
|
743
|
+
fillColor: '#4DA3FF26',
|
|
704
744
|
middleLine: true,
|
|
705
745
|
},
|
|
706
|
-
Path: { color: '#4DA3FF' },
|
|
746
|
+
Path: { color: '#4DA3FF', lineStyle: 'solid', lineWidth: 1.5 },
|
|
707
747
|
Pencil: { color: '#4DA3FF', lineStyle: 'solid', lineWidth: 2, smoothing: 10 },
|
|
708
748
|
Pitchfan: {
|
|
709
749
|
medianColor: '#F23645',
|
|
@@ -761,8 +801,8 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
761
801
|
stopColor: 'rgb(245, 39, 78)',
|
|
762
802
|
},
|
|
763
803
|
PriceLabel: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12 },
|
|
764
|
-
PriceNote: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12 },
|
|
765
|
-
PriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232' },
|
|
804
|
+
PriceNote: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12, lineWidth: 1.5, lineStyle: 'solid' },
|
|
805
|
+
PriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232', lineWidth: 2, lineStyle: 'solid' },
|
|
766
806
|
Ray: {
|
|
767
807
|
color: '#4DA3FF',
|
|
768
808
|
fontColor: '#4DA3FF',
|
|
@@ -859,6 +899,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
859
899
|
fontFamily: 'Poppins',
|
|
860
900
|
fontSize: 24,
|
|
861
901
|
fontStyle: 'normal',
|
|
902
|
+
textPosition: 'center',
|
|
862
903
|
color: '#4DA3FF',
|
|
863
904
|
fillBackground: false,
|
|
864
905
|
fillColor: '#F7D774',
|
|
@@ -920,6 +961,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
920
961
|
lineWidth: 2,
|
|
921
962
|
lineStyle: 'solid',
|
|
922
963
|
fillBackground: true,
|
|
964
|
+
fillColor: '#4DA3FF',
|
|
923
965
|
backgroundOpacity: 10,
|
|
924
966
|
showLabels: true,
|
|
925
967
|
},
|
|
@@ -940,6 +982,7 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
940
982
|
lineWidth: 2,
|
|
941
983
|
lineStyle: 'solid',
|
|
942
984
|
fillBackground: true,
|
|
985
|
+
fillColor: '#4DA3FF',
|
|
943
986
|
backgroundOpacity: 10,
|
|
944
987
|
showLabels: true,
|
|
945
988
|
},
|
|
@@ -950,16 +993,18 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
950
993
|
'lineWidth',
|
|
951
994
|
'lineStyle',
|
|
952
995
|
'fillBackground',
|
|
996
|
+
'fillColor',
|
|
953
997
|
'backgroundOpacity',
|
|
954
998
|
'showLabels',
|
|
955
999
|
'visibleIntervalsMs',
|
|
956
1000
|
],
|
|
957
|
-
AnchoredNote: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'color', 'visibleIntervalsMs'],
|
|
1001
|
+
AnchoredNote: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'textPosition', 'color', 'visibleIntervalsMs'],
|
|
958
1002
|
AnchoredText: [
|
|
959
1003
|
'fontColor',
|
|
960
1004
|
'fontFamily',
|
|
961
1005
|
'fontSize',
|
|
962
1006
|
'fontStyle',
|
|
1007
|
+
'textPosition',
|
|
963
1008
|
'color',
|
|
964
1009
|
'fillBackground',
|
|
965
1010
|
'fillColor',
|
|
@@ -1014,7 +1059,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1014
1059
|
ArrowMarker: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
|
|
1015
1060
|
BarPattern: ['color', 'patternMode', 'transparency', 'mirrored', 'flipped'],
|
|
1016
1061
|
Burj: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1017
|
-
Callout: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'color', 'visibleIntervalsMs'],
|
|
1062
|
+
Callout: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'textPosition', 'color', 'visibleIntervalsMs'],
|
|
1018
1063
|
Circle: [
|
|
1019
1064
|
'color',
|
|
1020
1065
|
'borderColor',
|
|
@@ -1041,28 +1086,30 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1041
1086
|
'lineWidth',
|
|
1042
1087
|
'lineStyle',
|
|
1043
1088
|
'fillBackground',
|
|
1089
|
+
'fillColor',
|
|
1044
1090
|
'backgroundOpacity',
|
|
1045
1091
|
'showLabels',
|
|
1046
1092
|
'visibleIntervalsMs',
|
|
1047
1093
|
],
|
|
1048
|
-
DatePriceRange: ['bullishColor', 'bearishColor', 'visibleIntervalsMs'],
|
|
1049
|
-
DateRange: ['color', 'visibleIntervalsMs'],
|
|
1050
|
-
DisjointChannel: [
|
|
1051
|
-
Divergence: ['bullishColor', 'bearishColor', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1052
|
-
DoubleCurve: [
|
|
1094
|
+
DatePriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
|
|
1095
|
+
DateRange: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
|
|
1096
|
+
DisjointChannel: [
|
|
1053
1097
|
'color',
|
|
1054
|
-
'borderColor',
|
|
1055
1098
|
'lineWidth',
|
|
1056
1099
|
'lineStyle',
|
|
1057
1100
|
'fillBackground',
|
|
1101
|
+
'fillColor',
|
|
1058
1102
|
'backgroundOpacity',
|
|
1059
1103
|
'visibleIntervalsMs',
|
|
1060
1104
|
],
|
|
1105
|
+
Divergence: ['bullishColor', 'bearishColor', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1106
|
+
DoubleCurve: ['borderColor', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
|
|
1061
1107
|
ElliottCorrection: [
|
|
1062
1108
|
'color',
|
|
1063
1109
|
'lineWidth',
|
|
1064
1110
|
'lineStyle',
|
|
1065
1111
|
'fillBackground',
|
|
1112
|
+
'fillColor',
|
|
1066
1113
|
'backgroundOpacity',
|
|
1067
1114
|
'showLabels',
|
|
1068
1115
|
'visibleIntervalsMs',
|
|
@@ -1072,6 +1119,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1072
1119
|
'lineWidth',
|
|
1073
1120
|
'lineStyle',
|
|
1074
1121
|
'fillBackground',
|
|
1122
|
+
'fillColor',
|
|
1075
1123
|
'backgroundOpacity',
|
|
1076
1124
|
'showLabels',
|
|
1077
1125
|
'visibleIntervalsMs',
|
|
@@ -1081,6 +1129,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1081
1129
|
'lineWidth',
|
|
1082
1130
|
'lineStyle',
|
|
1083
1131
|
'fillBackground',
|
|
1132
|
+
'fillColor',
|
|
1084
1133
|
'backgroundOpacity',
|
|
1085
1134
|
'showLabels',
|
|
1086
1135
|
'visibleIntervalsMs',
|
|
@@ -1090,6 +1139,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1090
1139
|
'lineWidth',
|
|
1091
1140
|
'lineStyle',
|
|
1092
1141
|
'fillBackground',
|
|
1142
|
+
'fillColor',
|
|
1093
1143
|
'backgroundOpacity',
|
|
1094
1144
|
'showLabels',
|
|
1095
1145
|
'visibleIntervalsMs',
|
|
@@ -1099,6 +1149,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1099
1149
|
'lineWidth',
|
|
1100
1150
|
'lineStyle',
|
|
1101
1151
|
'fillBackground',
|
|
1152
|
+
'fillColor',
|
|
1102
1153
|
'backgroundOpacity',
|
|
1103
1154
|
'showLabels',
|
|
1104
1155
|
'visibleIntervalsMs',
|
|
@@ -1210,6 +1261,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1210
1261
|
'levelFormat',
|
|
1211
1262
|
'textPosition',
|
|
1212
1263
|
'fibLevels',
|
|
1264
|
+
'levelsOnLogScale',
|
|
1213
1265
|
'visibleIntervalsMs',
|
|
1214
1266
|
],
|
|
1215
1267
|
FibonacciTrend: [
|
|
@@ -1226,6 +1278,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1226
1278
|
'levelFormat',
|
|
1227
1279
|
'textPosition',
|
|
1228
1280
|
'fibLevels',
|
|
1281
|
+
'levelsOnLogScale',
|
|
1229
1282
|
'visibleIntervalsMs',
|
|
1230
1283
|
],
|
|
1231
1284
|
FixedRangeVolumeProfile: [
|
|
@@ -1277,7 +1330,15 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1277
1330
|
'levelLineStyle',
|
|
1278
1331
|
],
|
|
1279
1332
|
FlagMark: ['color', 'visibleIntervalsMs'],
|
|
1280
|
-
FlatTopBottom: [
|
|
1333
|
+
FlatTopBottom: [
|
|
1334
|
+
'color',
|
|
1335
|
+
'lineWidth',
|
|
1336
|
+
'lineStyle',
|
|
1337
|
+
'fillBackground',
|
|
1338
|
+
'fillColor',
|
|
1339
|
+
'backgroundOpacity',
|
|
1340
|
+
'visibleIntervalsMs',
|
|
1341
|
+
],
|
|
1281
1342
|
Flow: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1282
1343
|
Fork: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1283
1344
|
GannBox: [
|
|
@@ -1327,8 +1388,6 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1327
1388
|
],
|
|
1328
1389
|
GhostFeed: [
|
|
1329
1390
|
'followChartTheme',
|
|
1330
|
-
'averageHL',
|
|
1331
|
-
'variance',
|
|
1332
1391
|
'transparency',
|
|
1333
1392
|
'candleUpColor',
|
|
1334
1393
|
'candleDownColor',
|
|
@@ -1343,11 +1402,12 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1343
1402
|
'lineWidth',
|
|
1344
1403
|
'lineStyle',
|
|
1345
1404
|
'fillBackground',
|
|
1405
|
+
'fillColor',
|
|
1346
1406
|
'backgroundOpacity',
|
|
1347
1407
|
'showLabels',
|
|
1348
1408
|
'visibleIntervalsMs',
|
|
1349
1409
|
],
|
|
1350
|
-
Highlighter: ['color', 'lineWidth', 'smoothing', 'visibleIntervalsMs'],
|
|
1410
|
+
Highlighter: ['color', 'lineStyle', 'lineWidth', 'smoothing', 'visibleIntervalsMs'],
|
|
1351
1411
|
HorizontalLine: [
|
|
1352
1412
|
'color',
|
|
1353
1413
|
'fontColor',
|
|
@@ -1440,7 +1500,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1440
1500
|
'visibleIntervalsMs',
|
|
1441
1501
|
],
|
|
1442
1502
|
Momentum: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
|
|
1443
|
-
Note: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'color', 'visibleIntervalsMs'],
|
|
1503
|
+
Note: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'textPosition', 'color', 'visibleIntervalsMs'],
|
|
1444
1504
|
ParallelLine: [
|
|
1445
1505
|
'color',
|
|
1446
1506
|
'fontColor',
|
|
@@ -1452,11 +1512,12 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1452
1512
|
'fontWeight',
|
|
1453
1513
|
'fontStyle',
|
|
1454
1514
|
'fillBackground',
|
|
1515
|
+
'fillColor',
|
|
1455
1516
|
'middleLine',
|
|
1456
1517
|
'text',
|
|
1457
1518
|
'visibleIntervalsMs',
|
|
1458
1519
|
],
|
|
1459
|
-
Path: ['color', 'visibleIntervalsMs'],
|
|
1520
|
+
Path: ['color', 'lineStyle', 'lineWidth', 'visibleIntervalsMs'],
|
|
1460
1521
|
Pencil: ['color', 'lineStyle', 'lineWidth', 'smoothing', 'visibleIntervalsMs'],
|
|
1461
1522
|
Pitchfan: [
|
|
1462
1523
|
'medianColor',
|
|
@@ -1493,8 +1554,8 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1493
1554
|
],
|
|
1494
1555
|
PositionForecast: ['color', 'lineWidth', 'lineStyle', 'profitColor', 'stopColor', 'visibleIntervalsMs'],
|
|
1495
1556
|
PriceLabel: ['color', 'fontColor', 'fontSize', 'visibleIntervalsMs'],
|
|
1496
|
-
PriceNote: ['color', 'fontColor', 'fontSize', 'text', 'visibleIntervalsMs'],
|
|
1497
|
-
PriceRange: ['bullishColor', 'bearishColor', 'visibleIntervalsMs'],
|
|
1557
|
+
PriceNote: ['color', 'fontColor', 'fontSize', 'lineWidth', 'lineStyle', 'text', 'visibleIntervalsMs'],
|
|
1558
|
+
PriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
|
|
1498
1559
|
Ray: [
|
|
1499
1560
|
'color',
|
|
1500
1561
|
'fontColor',
|
|
@@ -1591,6 +1652,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1591
1652
|
'fontFamily',
|
|
1592
1653
|
'fontSize',
|
|
1593
1654
|
'fontStyle',
|
|
1655
|
+
'textPosition',
|
|
1594
1656
|
'color',
|
|
1595
1657
|
'fillBackground',
|
|
1596
1658
|
'fillColor',
|
|
@@ -1658,6 +1720,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1658
1720
|
'lineWidth',
|
|
1659
1721
|
'lineStyle',
|
|
1660
1722
|
'fillBackground',
|
|
1723
|
+
'fillColor',
|
|
1661
1724
|
'backgroundOpacity',
|
|
1662
1725
|
'showLabels',
|
|
1663
1726
|
'visibleIntervalsMs',
|
|
@@ -1681,6 +1744,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1681
1744
|
'lineWidth',
|
|
1682
1745
|
'lineStyle',
|
|
1683
1746
|
'fillBackground',
|
|
1747
|
+
'fillColor',
|
|
1684
1748
|
'backgroundOpacity',
|
|
1685
1749
|
'showLabels',
|
|
1686
1750
|
'visibleIntervalsMs',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type LiveBucketVenue } from './live-bucket.util.js';
|
|
2
|
+
/**
|
|
3
|
+
* The lattice bar an END-stamped book frame closes, or null off the lattice (another venue, a
|
|
4
|
+
* coin-aggregated book that passes no venue, an interval the gateway does not roll): the stamp is
|
|
5
|
+
* read one millisecond early, so a stamp exactly on a boundary closes the bar before it whatever
|
|
6
|
+
* the width (45m bars open on the quarter hour, not only on whole hours). A weekly stamp keeps its
|
|
7
|
+
* own week, as in `roundObTimestamp`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function cmeLatticeBookBucketMs(stampMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number | null;
|
|
10
|
+
/** The bar a live book row is keyed on: the CME session lattice bar on a CME Group market, else
|
|
11
|
+
* `roundObTimestamp`'s END reading of the plain grid. */
|
|
12
|
+
export declare function bookLiveBucketMs(stampMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number;
|
|
13
|
+
/** Copies of book rows `[stamp, ...levels]`, each keyed on its bar (`bookLiveBucketMs`). An unknown
|
|
14
|
+
* interval keeps every row's own stamp; the inputs are never written. */
|
|
15
|
+
export declare function bookLiveBucketRows(rows: ReadonlyArray<ArrayLike<number>>, intervalMs: number, venue: LiveBucketVenue | null | undefined): Float64Array[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bar a live order book row belongs to: ONE key for every writer of per-bar book rows (the
|
|
3
|
+
* heatmap's live and replay columns, the K_ORDERBOOK source rows of a kScript, the wrun book lane
|
|
4
|
+
* and the heatmap riders' projected rows), keyed the way the history those rows extend is keyed.
|
|
5
|
+
*
|
|
6
|
+
* A book frame is stamped at its observation, an END label: the snapshot stamped exactly on a bar
|
|
7
|
+
* boundary is the closing snapshot of the bar before it (`roundObTimestamp`). tsdb-gateway rolls a
|
|
8
|
+
* CME Group market's per-symbol BLOCK_BOOK_SNAPSHOT_AGG onto the 17:00 America/Chicago session
|
|
9
|
+
* lattice and end-stamps each bar (pkg/tsdb/selects/cme.go `usesCMESessionRollup`,
|
|
10
|
+
* `cmeBlockBookResultBucket`); the history shift (`bookBarStartMs`) lands each row on its lattice
|
|
11
|
+
* start, so GC 4h history in CDT sits at 22/02/06/10/14/18Z. A live row floored on the UTC grid
|
|
12
|
+
* landed an 11:00Z snapshot at 08:00Z, a key no history row and no candle has.
|
|
13
|
+
*
|
|
14
|
+
* `venue` is the SERIES' own market (its exchange and symbol), never the chart's: a book source on
|
|
15
|
+
* another market keys its own grid. It is a required argument, so no writer keys a book row without
|
|
16
|
+
* naming the market it belongs to.
|
|
17
|
+
*/
|
|
18
|
+
import { Intervals } from '../../constants/interval.constants.js';
|
|
19
|
+
import { roundObTimestamp } from '../common/data-processing.util.js';
|
|
20
|
+
import { cmeSessionLatticeBucketMs } from './live-bucket.util.js';
|
|
21
|
+
/**
|
|
22
|
+
* The lattice bar an END-stamped book frame closes, or null off the lattice (another venue, a
|
|
23
|
+
* coin-aggregated book that passes no venue, an interval the gateway does not roll): the stamp is
|
|
24
|
+
* read one millisecond early, so a stamp exactly on a boundary closes the bar before it whatever
|
|
25
|
+
* the width (45m bars open on the quarter hour, not only on whole hours). A weekly stamp keeps its
|
|
26
|
+
* own week, as in `roundObTimestamp`.
|
|
27
|
+
*/
|
|
28
|
+
export function cmeLatticeBookBucketMs(stampMs, intervalMs, venue) {
|
|
29
|
+
const closingMs = intervalMs === Intervals.WEEK ? stampMs : stampMs - 1;
|
|
30
|
+
return cmeSessionLatticeBucketMs(closingMs, intervalMs, venue);
|
|
31
|
+
}
|
|
32
|
+
/** The bar a live book row is keyed on: the CME session lattice bar on a CME Group market, else
|
|
33
|
+
* `roundObTimestamp`'s END reading of the plain grid. */
|
|
34
|
+
export function bookLiveBucketMs(stampMs, intervalMs, venue) {
|
|
35
|
+
return cmeLatticeBookBucketMs(stampMs, intervalMs, venue) ?? roundObTimestamp(stampMs, intervalMs);
|
|
36
|
+
}
|
|
37
|
+
/** Copies of book rows `[stamp, ...levels]`, each keyed on its bar (`bookLiveBucketMs`). An unknown
|
|
38
|
+
* interval keeps every row's own stamp; the inputs are never written. */
|
|
39
|
+
export function bookLiveBucketRows(rows, intervalMs, venue) {
|
|
40
|
+
const keyed = Number.isFinite(intervalMs) && intervalMs > 0;
|
|
41
|
+
return rows.map((row) => {
|
|
42
|
+
const copy = Float64Array.from(row);
|
|
43
|
+
if (keyed && copy.length > 0)
|
|
44
|
+
copy[0] = bookLiveBucketMs(copy[0], intervalMs, venue);
|
|
45
|
+
return copy;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
import type { CmeServedAccess, CmeServedAccessByExchange } from '../../interfaces/cme-realtime.interface.js';
|
|
25
25
|
import type { GateProvider } from '../../workers/constants/socket-slots.js';
|
|
26
26
|
/** Bars + indicator history: timing only, provider-prefixed off CME. */
|
|
27
|
-
export type CmeBarCacheContext = 'delayed' | 'realtime' | 'opra-delayed' | 'opra-realtime';
|
|
27
|
+
export type CmeBarCacheContext = 'delayed' | 'realtime' | 'opra-delayed' | 'opra-realtime' | 'stocks-delayed' | 'stocks-realtime';
|
|
28
28
|
/** The served timing a bar context names, whatever its plane. */
|
|
29
29
|
export declare function barCacheTiming(context: CmeBarCacheContext): 'delayed' | 'realtime';
|
|
30
|
-
/** The bar context of one plane at one timing (CME unprefixed: its keys predate a second plane). */
|
|
30
|
+
/** The bar context of one plane at one timing (CME unprefixed: its keys predate a second plane; the others carry their provider). */
|
|
31
31
|
export declare function barCacheContextFor(provider: GateProvider, timing: 'delayed' | 'realtime'): CmeBarCacheContext;
|
|
32
32
|
/**
|
|
33
33
|
* Order book + heatmap: timing plus served depth, prefixed with the units era.
|
|
@@ -62,6 +62,8 @@ export declare function cmeBarCacheContext(exchange: string | undefined | null):
|
|
|
62
62
|
export declare const CME_BAR_CACHE_SHAPE_VERSION = 4;
|
|
63
63
|
/** The OPRA twin of {@link CME_BAR_CACHE_SHAPE_VERSION} (`opra{N}-<timing>`); same bump rule. */
|
|
64
64
|
export declare const OPRA_BAR_CACHE_SHAPE_VERSION = 1;
|
|
65
|
+
/** The stocks tape's bars shape era (`stocks{N}-<timing>`): its keys never met a Polygon chart's (the tape codes differ). */
|
|
66
|
+
export declare const STOCKS_BAR_CACHE_SHAPE_VERSION = 1;
|
|
65
67
|
/** The chart-session component of a bars cache key. Only the RTH-filtered
|
|
66
68
|
* data set is ever tagged: ETH is the default full-session set, and leaving
|
|
67
69
|
* it untagged keeps every non-RTH key byte-identical within a version era. */
|
|
@@ -71,7 +73,7 @@ export type CmeBarCacheSession = 'rth' | null;
|
|
|
71
73
|
* served-access transition purge predicate must agree byte-for-byte, across
|
|
72
74
|
* BOTH session variants of a timing (see `cmeDelayedBarShapeSuffixes`).
|
|
73
75
|
* The plane rides the prefix: `cme{N}-<timing>` for CME, `opra{N}-<timing>`
|
|
74
|
-
* for OPRA. */
|
|
76
|
+
* for OPRA, `stocks{N}-<timing>` for the US stocks tape. */
|
|
75
77
|
export declare function cmeBarCacheShape(context: CmeBarCacheContext, session?: CmeBarCacheSession): string;
|
|
76
78
|
/** Every shape suffix a delayed-timing bars entry of one plane (CME unless
|
|
77
79
|
* named) can carry in the current version era: the session x back-adjustment
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
import { governedPlaneOf } from '../v2/gate-plane.util.js';
|
|
25
25
|
/** The served timing a bar context names, whatever its plane. */
|
|
26
26
|
export function barCacheTiming(context) {
|
|
27
|
-
return context === 'realtime' || context
|
|
27
|
+
return context === 'realtime' || context.endsWith('-realtime') ? 'realtime' : 'delayed';
|
|
28
28
|
}
|
|
29
|
-
/** The bar context of one plane at one timing (CME unprefixed: its keys predate a second plane). */
|
|
29
|
+
/** The bar context of one plane at one timing (CME unprefixed: its keys predate a second plane; the others carry their provider). */
|
|
30
30
|
export function barCacheContextFor(provider, timing) {
|
|
31
|
-
return provider === 'cme' ? timing :
|
|
31
|
+
return provider === 'cme' ? timing : `${provider}-${timing}`;
|
|
32
32
|
}
|
|
33
33
|
/** The two book context values, exported so consumers (transition detection,
|
|
34
34
|
* purge substrings) never hand-spell the era prefix. */
|
|
@@ -95,16 +95,20 @@ export function cmeBarCacheContext(exchange) {
|
|
|
95
95
|
export const CME_BAR_CACHE_SHAPE_VERSION = 4;
|
|
96
96
|
/** The OPRA twin of {@link CME_BAR_CACHE_SHAPE_VERSION} (`opra{N}-<timing>`); same bump rule. */
|
|
97
97
|
export const OPRA_BAR_CACHE_SHAPE_VERSION = 1;
|
|
98
|
+
/** The stocks tape's bars shape era (`stocks{N}-<timing>`): its keys never met a Polygon chart's (the tape codes differ). */
|
|
99
|
+
export const STOCKS_BAR_CACHE_SHAPE_VERSION = 1;
|
|
98
100
|
/** The bars cache-key shape suffix for a governed bar context. Single
|
|
99
101
|
* authority for the format: the key builder (`cacheKeyForMetadata`) and the
|
|
100
102
|
* served-access transition purge predicate must agree byte-for-byte, across
|
|
101
103
|
* BOTH session variants of a timing (see `cmeDelayedBarShapeSuffixes`).
|
|
102
104
|
* The plane rides the prefix: `cme{N}-<timing>` for CME, `opra{N}-<timing>`
|
|
103
|
-
* for OPRA. */
|
|
105
|
+
* for OPRA, `stocks{N}-<timing>` for the US stocks tape. */
|
|
104
106
|
export function cmeBarCacheShape(context, session = null) {
|
|
105
|
-
const prefix = context
|
|
107
|
+
const prefix = context.startsWith('opra-')
|
|
106
108
|
? `opra${OPRA_BAR_CACHE_SHAPE_VERSION}`
|
|
107
|
-
:
|
|
109
|
+
: context.startsWith('stocks-')
|
|
110
|
+
? `stocks${STOCKS_BAR_CACHE_SHAPE_VERSION}`
|
|
111
|
+
: `cme${CME_BAR_CACHE_SHAPE_VERSION}`;
|
|
108
112
|
return `${prefix}-${barCacheTiming(context)}${session ? `-${session}` : ''}`;
|
|
109
113
|
}
|
|
110
114
|
/** Every shape suffix a delayed-timing bars entry of one plane (CME unless
|
|
@@ -47,6 +47,16 @@ export function getExchangeFullName(exchange, t) {
|
|
|
47
47
|
return t('cmeRealtimeData.exchanges.globex');
|
|
48
48
|
case 'OPRA':
|
|
49
49
|
return t('cmeRealtimeData.exchanges.opra');
|
|
50
|
+
// A listing venue and its tape read the same name: the tape code is the same venue through the stocks gate.
|
|
51
|
+
case 'NYSE':
|
|
52
|
+
case 'NYSE_TAPE':
|
|
53
|
+
return t('cmeRealtimeData.exchanges.nyse');
|
|
54
|
+
case 'NYSE_ARCA':
|
|
55
|
+
case 'NYSE_ARCA_TAPE':
|
|
56
|
+
return t('cmeRealtimeData.exchanges.nyseArca');
|
|
57
|
+
case 'NASDAQ':
|
|
58
|
+
case 'NASDAQ_TAPE':
|
|
59
|
+
return t('cmeRealtimeData.exchanges.nasdaq');
|
|
50
60
|
default:
|
|
51
61
|
return exchange;
|
|
52
62
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `cme-user-scripts` gate as the venue policy reads it (kscript-venue-policy.util, the one decider of the governed
|
|
3
|
+
* walls: `isCmeUserScriptRun`), and the authorisation epoch every door that lands a CME user study's answer compares.
|
|
4
|
+
* Dependency-free on purpose (zero imports), the shape of the pre-retirement opra-user-scripts gate: the venue policy
|
|
5
|
+
* stays worker-safe and store-free, so the main thread hands it readers instead.
|
|
6
|
+
*
|
|
7
|
+
* The gate is open only while BOTH of its facts answer `true`, each read live on every call:
|
|
8
|
+
* - The flag. The flags store registers its override-aware `isOn` as the fallback when it is created, and publishes
|
|
9
|
+
* its reader again after every successful fetch. Until a fetch publishes, the fallback answers, so the dev and
|
|
10
|
+
* internal `kiyo.flag-overrides` lens reaches the walls before the map lands and through a failed fetch, exactly as
|
|
11
|
+
* it reaches every surface that reads `isOn`: the walls and the surfaces never disagree.
|
|
12
|
+
* - The viewer's CME entitlement. The web hands its `viewerMayReadCme()` reader: signed in, not a guest, the CME data
|
|
13
|
+
* terms not blocked. Delayed and real-time access both count: the tier a read rides is the gate plane's, decided per
|
|
14
|
+
* socket, never this answer's.
|
|
15
|
+
*
|
|
16
|
+
* Fail closed everywhere: in any context neither reader reached (a worker, a guest, a spec without a store), a reader
|
|
17
|
+
* that throws and a reader that answers anything but `true` read the gate closed, today's CME wall. The flag is never
|
|
18
|
+
* read server-side: kscript-backend denies CME to every user run whatever it says.
|
|
19
|
+
*
|
|
20
|
+
* The authorisation epoch (`cmeStudyAuthEpoch`, `bumpCmeStudyAuthEpoch`, `captureCmeStudyAuth`,
|
|
21
|
+
* `isCmeStudyAuthCurrent`): the generation model of the options chain's governed access
|
|
22
|
+
* (src/workers/indicators/options-chain-state.worker.util.ts `syncGovernedChainAccess`), moved to the main thread. The
|
|
23
|
+
* main-thread lifecycle watcher (web: `installCmeUserStudyLifecycle`, cme-user-scripts-lifecycle.util) bumps it
|
|
24
|
+
* whenever an input of a CME user study's authorisation moves: the account id, the CME data-terms state, the CME served
|
|
25
|
+
* access, the flag, a session expiry or a session swap. A run captures a token before it asks; every door that lands
|
|
26
|
+
* its answer (titan-charts' dataFetch result, the script engine's result, the wrun run's `isCurrent`) compares the
|
|
27
|
+
* token and drops an answer from a previous authorisation context, so a late answer never lands after access changed.
|
|
28
|
+
* A missing token is never current. The epoch is main-thread state: a worker's copy of this module never sees a bump,
|
|
29
|
+
* so a worker carries the captured token back and never judges it. Publishing a reader never moves the epoch (a flag
|
|
30
|
+
* fetch publishes after every fetch, moved or not): only the watcher bumps it, on a move it saw.
|
|
31
|
+
*
|
|
32
|
+
* The stopped-study register (`markCmeStudyStopped`, `clearCmeStudyStopped`, `cmeStudyStopReason`,
|
|
33
|
+
* `isCmeStudyStopped`): the studies the lifecycle watcher stopped in place when the gate closed (the viewer's access
|
|
34
|
+
* changed, or the flag went dark), keyed by chart index and overlay id. Main-thread state, never persisted: the
|
|
35
|
+
* workspace row and the editor tab keep their source and settings, the register only tells Door H which words to paint
|
|
36
|
+
* ("Access changed; the study stopped" or "CME chart studies are turned off") and the local-engine self-heal which rows
|
|
37
|
+
* to leave alone. The re-judgment that mounts a study again clears its row; a chart teardown clears the chart's rows.
|
|
38
|
+
*
|
|
39
|
+
* The remount stash (`stashCmeStudyRemount`, `cmeStudyRemountStash`): what a stopped study's remount needs that its
|
|
40
|
+
* workspace row does not carry, kept beside its register row and dropped with it by `clearCmeStudyStopped` (one clear,
|
|
41
|
+
* so a stash never outlives the stop it belongs to). An editor draft's source is the case: the add strips
|
|
42
|
+
* `settings.script` from the mounted config once the worker engine holds it, and a draft's row is session-only, so
|
|
43
|
+
* once its engine is destroyed nothing else on the page holds its code. Typed `unknown` here: the web lifecycle writes
|
|
44
|
+
* it, the web re-judgment reads it. Main-thread state, never persisted.
|
|
45
|
+
*/
|
|
46
|
+
/** Why the lifecycle stopped a study: the viewer's access moved, or the flag went dark. */
|
|
47
|
+
export type CmeStudyStopReason = 'access-changed' | 'studies-off';
|
|
48
|
+
/** Record a study the lifecycle stopped in place (Door H paints the reason's words until it is cleared). */
|
|
49
|
+
export declare function markCmeStudyStopped(chartIndex: number, overlayId: string, reason: CmeStudyStopReason): void;
|
|
50
|
+
/** Forget one stopped study, or every stopped study of a chart when no overlay id is given, with its remount stash. */
|
|
51
|
+
export declare function clearCmeStudyStopped(chartIndex: number, overlayId?: string): void;
|
|
52
|
+
/** Keep what a stopped study's remount needs and its row does not carry (the header); `clearCmeStudyStopped` drops it. */
|
|
53
|
+
export declare function stashCmeStudyRemount(chartIndex: number, overlayId: string, remount: unknown): void;
|
|
54
|
+
/** What the lifecycle kept for a stopped study's remount, or undefined when its row carries all it needs. */
|
|
55
|
+
export declare function cmeStudyRemountStash(chartIndex: number, overlayId: string): unknown;
|
|
56
|
+
/** The reason a study was stopped, or undefined for a study the lifecycle never stopped. */
|
|
57
|
+
export declare function cmeStudyStopReason(chartIndex: number, overlayId: string): CmeStudyStopReason | undefined;
|
|
58
|
+
/** Whether the lifecycle stopped this study and nothing has mounted it again since. */
|
|
59
|
+
export declare function isCmeStudyStopped(chartIndex: number, overlayId: string): boolean;
|
|
60
|
+
/** Called by the flags store after a successful fetch (and by specs); null unpublishes. */
|
|
61
|
+
export declare function publishCmeUserScriptsFlag(next: (() => boolean) | null): void;
|
|
62
|
+
/** Called by the flags store when it is created: its override-aware `isOn`, read until a fetch publishes. */
|
|
63
|
+
export declare function setCmeUserScriptsFlagFallback(next: (() => boolean) | null): void;
|
|
64
|
+
/** Called by the web with its `viewerMayReadCme()` reader (signed in, not a guest, CME data terms not blocked); null
|
|
65
|
+
* unregisters, and no reader reads closed. */
|
|
66
|
+
export declare function setCmeUserScriptsEntitlementReader(next: (() => boolean) | null): void;
|
|
67
|
+
/** Whether the `cme-user-scripts` flag is on for this session: the published answer, else the store's own; closed
|
|
68
|
+
* when neither can tell. The flag alone: the walls read `isCmeUserScriptsGateOpen`. */
|
|
69
|
+
export declare function isCmeUserScriptsFlagOn(): boolean;
|
|
70
|
+
/** Whether the CME plane may open to a user run the browser executes: the flag lit AND the viewer entitled. */
|
|
71
|
+
export declare function isCmeUserScriptsGateOpen(): boolean;
|
|
72
|
+
/** The authorisation epoch now (see the header). */
|
|
73
|
+
export declare function cmeStudyAuthEpoch(): number;
|
|
74
|
+
/** Move the epoch on: every token captured before is no longer current. Returns the new epoch. */
|
|
75
|
+
export declare function bumpCmeStudyAuthEpoch(): number;
|
|
76
|
+
/** The token a run captures before it asks (frozen: a holder cannot move it forward). */
|
|
77
|
+
export declare function captureCmeStudyAuth(): {
|
|
78
|
+
epoch: number;
|
|
79
|
+
};
|
|
80
|
+
/** Whether a captured token is from the current authorisation context; a missing or malformed token is not. */
|
|
81
|
+
export declare function isCmeStudyAuthCurrent(token: {
|
|
82
|
+
epoch: number;
|
|
83
|
+
} | null | undefined): boolean;
|