@orangecharts/wrun-chart-host 0.11.1 → 0.14.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 +1 -0
- package/dist/constants/feature-flags.constants.d.ts +3 -4
- package/dist/constants/feature-flags.constants.js +34 -52
- package/dist/constants/feature-limits.constants.d.ts +1 -1
- package/dist/constants/feature-limits.constants.js +5 -4
- package/dist/constants/interval.constants.d.ts +7 -0
- package/dist/constants/interval.constants.js +7 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
- package/dist/constants/stocks-compliance.constants.d.ts +15 -0
- package/dist/constants/stocks-compliance.constants.js +15 -0
- package/dist/host-env.d.ts +55 -3
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +17 -0
- package/dist/index.js +18 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +52 -12
- package/dist/indicators/controls/tpo-session.util.js +113 -16
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
- package/dist/interfaces/cme-realtime.interface.js +2 -1
- package/dist/interfaces/feed.interface.d.ts +15 -1
- package/dist/interfaces/replay.interface.d.ts +5 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
- package/dist/interfaces/stocks-realtime.interface.js +5 -4
- package/dist/interfaces/wrun-runtime.interface.d.ts +97 -19
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
- package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
- package/dist/market-data/billing.interface.d.ts +9 -1
- package/dist/market-data/venue.d.ts +1 -1
- package/dist/market-data/venues/index.d.ts +4 -4
- package/dist/market-data/venues/stocks.contract.copy.json +4 -4
- package/dist/market-data/venues/stocks.d.ts +4 -4
- package/dist/market-data/venues/stocks.js +15 -13
- package/dist/settings-templates/frvp-fields.d.ts +12 -1
- package/dist/settings-templates/frvp-fields.js +15 -4
- package/dist/settings-templates/index.js +12 -5
- package/dist/settings-templates/indicator-fields.js +28 -2
- package/dist/settings-templates/tool-rules.d.ts +17 -8
- package/dist/settings-templates/tool-rules.js +15 -8
- package/dist/settings-templates/tool-tables.generated.js +4 -2
- package/dist/utility/auth/server-clock.util.d.ts +3 -1
- package/dist/utility/auth/server-clock.util.js +3 -1
- package/dist/utility/chart/book-live-bucket.util.js +2 -2
- package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
- package/dist/utility/chart/cache-alignment.util.js +14 -7
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
- package/dist/utility/chart/cme-session-bucket.util.js +25 -332
- package/dist/utility/chart/continuous-contracts.util.js +6 -5
- package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
- package/dist/utility/chart/display-offset.leaf.js +41 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
- package/dist/utility/chart/effective-chart-session.util.js +13 -5
- package/dist/utility/chart/feed-interval.util.d.ts +6 -20
- package/dist/utility/chart/feed-interval.util.js +13 -22
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
- package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
- package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
- package/dist/utility/chart/host-bar-placement.util.js +8 -2
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
- package/dist/utility/chart/indicator-run-interval.util.js +21 -12
- package/dist/utility/chart/interval-registry.util.d.ts +1 -1
- package/dist/utility/chart/interval-registry.util.js +1 -1
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
- package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
- package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
- package/dist/utility/chart/live-bucket.util.d.ts +39 -17
- package/dist/utility/chart/live-bucket.util.js +103 -57
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
- package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
- package/dist/utility/chart/market-session-schedule.util.js +39 -1
- package/dist/utility/chart/market-session.util.d.ts +136 -0
- package/dist/utility/chart/market-session.util.js +341 -0
- package/dist/utility/chart/om-panel.util.d.ts +5 -3
- package/dist/utility/chart/om-panel.util.js +42 -7
- package/dist/utility/chart/om-target.util.d.ts +14 -1
- package/dist/utility/chart/om-target.util.js +22 -5
- package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
- package/dist/utility/chart/opra-read-access.leaf.js +22 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
- package/dist/utility/chart/profile-row-height.util.js +74 -37
- package/dist/utility/chart/rth-session.util.d.ts +55 -20
- package/dist/utility/chart/rth-session.util.js +94 -46
- package/dist/utility/chart/session-lattice.util.d.ts +150 -0
- package/dist/utility/chart/session-lattice.util.js +488 -0
- package/dist/utility/chart/trading-day.util.d.ts +40 -2
- package/dist/utility/chart/trading-day.util.js +84 -7
- package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
- package/dist/utility/chart/us-equities-session.util.js +44 -15
- package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
- package/dist/utility/chart/window-geometry.leaf.js +57 -8
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
- package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
- package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
- package/dist/utility/chart/wrun-run-result.util.js +89 -25
- package/dist/utility/common/time.util.js +5 -4
- package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
- package/dist/utility/market-events/earnings-scope.util.js +17 -9
- package/dist/utility/market-events/market-events.util.d.ts +14 -7
- package/dist/utility/market-events/market-events.util.js +30 -17
- package/dist/utility/number-format.util.d.ts +14 -21
- package/dist/utility/number-format.util.js +38 -24
- package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
- package/dist/utility/options/option-venue-disclosure.util.js +71 -11
- package/dist/utility/options/option-venue.util.d.ts +1 -1
- package/dist/utility/options/option-venue.util.js +1 -1
- package/dist/utility/pool-symbol.leaf.d.ts +7 -0
- package/dist/utility/pool-symbol.leaf.js +50 -5
- package/dist/utility/stocks/stock-display.util.d.ts +15 -0
- package/dist/utility/stocks/stock-display.util.js +37 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
- package/dist/utility/v2/gate-plane.util.d.ts +6 -0
- package/dist/utility/v2/gate-plane.util.js +11 -1
- package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
- package/dist/utility/v2/gate-session-latch.util.js +3 -3
- package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
- package/dist/utility/v2/governed-tier.leaf.js +17 -16
- package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
- package/dist/utility/v2/stocks-governed.util.js +14 -0
- package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
- package/dist/utility/v2/v2-enums.leaf.js +458 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
- package/dist/utility/wrun/derived-roots.leaf.js +27 -1
- package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
- package/dist/utility/wrun/derived-roots.util.js +97 -56
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
- package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
- package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
- package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
- package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
- package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
- package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
- package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
- package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
- package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
- package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
- package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
- package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
- package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
- package/dist/utility/wrun/wrun-host.service.js +137 -27
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
- package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
- package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
- package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
- package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
- package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
- package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-option-views.util.js +5 -2
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
- package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
- package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
- package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
- package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
- package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
- package/dist/utility/wrun/wrun-refusal.util.js +103 -16
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
- package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
- package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
- package/dist/utility/wrun/wrun-run-health.util.js +204 -1
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
- package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
- package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
- package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
- package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
- package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
- package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
- package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
- package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
- package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
- package/dist/utility/wrun/wrun-visibility-table.js +9 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
- package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
- package/dist/utils/replay/replay-buffer-math.js +60 -30
- package/dist/workers/constants/socket-slots.d.ts +11 -7
- package/dist/workers/constants/socket-slots.js +6 -5
- package/package.json +5 -5
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The delay of the CME markets a run read off its chart's own exchange (a pinned leg, a trades leg): the CME plane's
|
|
3
|
+
* delayed-data disclosure for a market the chart's own badge does not name. A CME chart's badge describes the tier its
|
|
4
|
+
* own exchange is served at (the CME realtime store's served access per exchange), so a pin on a crypto chart, or on
|
|
5
|
+
* another CME Group exchange of a CME chart, carried no word that its rows ride the delayed route. Mirrors the OPRA
|
|
6
|
+
* chain note (wrun-draft-legend-note.util): read when the run plans its legs (the tier the viewer was served when the
|
|
7
|
+
* run read them, never re-read by a tick, so a tick never flips the note), named only for a delayed read, in the
|
|
8
|
+
* badge's own sentence ("Exchange rules delay {symbol} by {mins} minutes."), which the legend note resolves at call time
|
|
9
|
+
* in the active locale. The run keeps the facts (`computed.cmeDelayed`, the live context's `cmeDelayed`); the legend
|
|
10
|
+
* util words and strips them.
|
|
11
|
+
*/
|
|
12
|
+
import { wrunChartHostEnv } from '../../host-env.js';
|
|
13
|
+
import { payloadTouchesCmeVenue } from '../chart/kscript-venue-policy.util.js';
|
|
14
|
+
import { delayedDefaultMinutesFor } from '../v2/gate-plane.util.js';
|
|
15
|
+
/**
|
|
16
|
+
* The delayed CME markets among `markets` (the run's admitted legs, in order, each once), off the chart's own exchange:
|
|
17
|
+
* a market whose exchange is the chart's rides the badge already. Undefined when none is delayed (a real-time or
|
|
18
|
+
* unknown served access names no delay: the account's tier is never guessed). The minutes are the served access's own
|
|
19
|
+
* figure, else the exchange's nominal delay.
|
|
20
|
+
*/
|
|
21
|
+
export function wrunCmeDelayedMarkets(markets, chartExchange) {
|
|
22
|
+
const out = [];
|
|
23
|
+
const seen = new Set();
|
|
24
|
+
for (const market of markets) {
|
|
25
|
+
const exchange = typeof market?.exchange === 'string' ? market.exchange : '';
|
|
26
|
+
const symbol = typeof market?.symbol === 'string' ? market.symbol : '';
|
|
27
|
+
if (symbol === '' || exchange === chartExchange || !payloadTouchesCmeVenue(exchange))
|
|
28
|
+
continue;
|
|
29
|
+
const key = `${exchange}|${symbol}`;
|
|
30
|
+
if (seen.has(key))
|
|
31
|
+
continue;
|
|
32
|
+
seen.add(key);
|
|
33
|
+
let access;
|
|
34
|
+
try {
|
|
35
|
+
access = wrunChartHostEnv().market.cmeServedAccess(exchange);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
access = undefined;
|
|
39
|
+
}
|
|
40
|
+
if (access?.status !== 'known' || access.timing !== 'delayed')
|
|
41
|
+
continue;
|
|
42
|
+
const seconds = access.delaySeconds;
|
|
43
|
+
const mins = typeof seconds === 'number' && seconds > 0
|
|
44
|
+
? Math.max(1, Math.round(seconds / 60))
|
|
45
|
+
: delayedDefaultMinutesFor(exchange);
|
|
46
|
+
out.push({ symbol, mins });
|
|
47
|
+
}
|
|
48
|
+
return out.length > 0 ? out : undefined;
|
|
49
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CME roots the chart serves and what one contract of each is worth (CME_ROOT_SPECS), with the one rule that turns a
|
|
3
|
+
* root's point value into US dollars (`wrunCmeRootDollarPointValue`) and its market form (`wrunCmeDollarPointValue`),
|
|
4
|
+
* which the session's dollar lane and the live intake's dollar folds both read. Beside the table it imports only the
|
|
5
|
+
* governed venue and root parsers, so the session's composition (wrun-session-composition.util, in the chart's fetch
|
|
6
|
+
* chunk) and the live intake read it without the market facts module; wrun-chart-market-facts.util re-exports the table
|
|
7
|
+
* for every reader that names it there.
|
|
8
|
+
*/
|
|
9
|
+
import type { WrunMarketKind, WrunMarketQuoteIsUsd } from '@orangecharts/indicator-kit';
|
|
10
|
+
import type { CmeExchangeDto } from '../../interfaces/cme-realtime.interface.js';
|
|
11
|
+
export interface CmeRootSpec {
|
|
12
|
+
/** What the contract trades (a futures contract reports its underlying's kind). */
|
|
13
|
+
kind: WrunMarketKind;
|
|
14
|
+
pointValue: number;
|
|
15
|
+
/** The quotation currency of the price the chart draws. */
|
|
16
|
+
quote: WrunMarketQuoteIsUsd;
|
|
17
|
+
/** The CME Group exchange the root lists on (its contracts and its options). */
|
|
18
|
+
exchange: CmeExchangeDto;
|
|
19
|
+
}
|
|
20
|
+
/** Read-only outside this module: the market facts, the paper venue and the session's dollar lane read it. */
|
|
21
|
+
export declare const CME_ROOT_SPECS: Readonly<Record<string, Readonly<CmeRootSpec>>>;
|
|
22
|
+
/**
|
|
23
|
+
* The US dollars one contract of `root` is worth for one whole point of its quoted price: the root's point value
|
|
24
|
+
* (CME_ROOT_SPECS) when the root is quoted in US dollars, so a print of `size` contracts at `price` is worth
|
|
25
|
+
* size x price x this. Undefined for a root off the table and for one quoted in another unit (the CBOT grains quote US
|
|
26
|
+
* cents): no dollar value is ever guessed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function wrunCmeRootDollarPointValue(root: string | null | undefined): number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The dollar point value of a market's contract (`wrunCmeRootDollarPointValue` of its root: NQ1! and NQZ6 read NQ, 20)
|
|
31
|
+
* on a CME Group venue, where prints count contracts; null on a CME Group market none prices (an option contract, a
|
|
32
|
+
* root off the table, a cents-quoted grain), so its contracts are never valued in dollars; undefined off the CME family,
|
|
33
|
+
* whose prints this rule says nothing about.
|
|
34
|
+
*/
|
|
35
|
+
export declare function wrunCmeDollarPointValue(market: {
|
|
36
|
+
exchange?: unknown;
|
|
37
|
+
symbol?: unknown;
|
|
38
|
+
} | null | undefined): number | null | undefined;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { isCmeGoverned } from '../chart/cme-realtime.util.js';
|
|
2
|
+
import { governedContractCoin } from '../chart/governed-contract-coin.util.js';
|
|
3
|
+
/** Read-only outside this module: the market facts, the paper venue and the session's dollar lane read it. */
|
|
4
|
+
export const CME_ROOT_SPECS = {
|
|
5
|
+
// Equity index futures, quoted in index points: the dollar multiplier.
|
|
6
|
+
ES: { kind: 'index', pointValue: 50, quote: 'usd', exchange: 'CME' }, // $50 x S&P 500: equities/sp/e-mini-sandp500
|
|
7
|
+
MES: { kind: 'index', pointValue: 5, quote: 'usd', exchange: 'CME' }, // $5 x S&P 500: equities/sp/micro-e-mini-sandp-500
|
|
8
|
+
NQ: { kind: 'index', pointValue: 20, quote: 'usd', exchange: 'CME' }, // $20 x Nasdaq-100: equities/nasdaq/e-mini-nasdaq-100
|
|
9
|
+
MNQ: { kind: 'index', pointValue: 2, quote: 'usd', exchange: 'CME' }, // $2 x Nasdaq-100: equities/nasdaq/micro-e-mini-nasdaq-100
|
|
10
|
+
RTY: { kind: 'index', pointValue: 50, quote: 'usd', exchange: 'CME' }, // $50 x Russell 2000: equities/russell/e-mini-russell-2000
|
|
11
|
+
M2K: { kind: 'index', pointValue: 5, quote: 'usd', exchange: 'CME' }, // $5 x Russell 2000: equities/russell/micro-e-mini-russell-2000
|
|
12
|
+
YM: { kind: 'index', pointValue: 5, quote: 'usd', exchange: 'CBOT' }, // $5 x DJIA: equities/dow-jones/e-mini-dow
|
|
13
|
+
MYM: { kind: 'index', pointValue: 0.5, quote: 'usd', exchange: 'CBOT' }, // $0.50 x DJIA: equities/dow-jones/micro-e-mini-dow
|
|
14
|
+
// FX futures, quoted in US dollars per unit of the foreign currency (6J per yen, 0.00xxxx).
|
|
15
|
+
'6E': { kind: 'forex', pointValue: 125_000, quote: 'usd', exchange: 'CME' }, // 125,000 euro: fx/g10/euro-fx
|
|
16
|
+
'6B': { kind: 'forex', pointValue: 62_500, quote: 'usd', exchange: 'CME' }, // 62,500 pounds: fx/g10/british-pound
|
|
17
|
+
'6J': { kind: 'forex', pointValue: 12_500_000, quote: 'usd', exchange: 'CME' }, // 12,500,000 yen: fx/g10/japanese-yen
|
|
18
|
+
'6C': { kind: 'forex', pointValue: 100_000, quote: 'usd', exchange: 'CME' }, // 100,000 CAD: fx/g10/canadian-dollar
|
|
19
|
+
// US Treasury futures, quoted in points of par (100): the face value / 100 per point.
|
|
20
|
+
ZT: { kind: 'unknown', pointValue: 2_000, quote: 'usd', exchange: 'CBOT' }, // $200,000 face: interest-rates/us-treasury/2-year-us-treasury-note
|
|
21
|
+
ZF: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'CBOT' }, // $100,000 face: interest-rates/us-treasury/5-year-us-treasury-note
|
|
22
|
+
ZN: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'CBOT' }, // $100,000 face: interest-rates/us-treasury/10-year-us-treasury-note
|
|
23
|
+
TN: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'CBOT' }, // $100,000 face: interest-rates/us-treasury/ultra-10-year-us-treasury-note
|
|
24
|
+
ZB: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'CBOT' }, // $100,000 face: interest-rates/us-treasury/30-year-us-treasury-bond
|
|
25
|
+
UB: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'CBOT' }, // $100,000 face: interest-rates/us-treasury/ultra-t-bond
|
|
26
|
+
// Energy (NYMEX), quoted in US dollars per unit of the commodity.
|
|
27
|
+
CL: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'NYMEX' }, // 1,000 barrels: energy/crude-oil/light-sweet-crude
|
|
28
|
+
MCL: { kind: 'unknown', pointValue: 100, quote: 'usd', exchange: 'NYMEX' }, // 100 barrels: energy/crude-oil/micro-wti-crude-oil
|
|
29
|
+
NG: { kind: 'unknown', pointValue: 10_000, quote: 'usd', exchange: 'NYMEX' }, // 10,000 MMBtu: energy/natural-gas/natural-gas
|
|
30
|
+
RB: { kind: 'unknown', pointValue: 42_000, quote: 'usd', exchange: 'NYMEX' }, // 42,000 gallons: energy/refined-products/rbob-gasoline
|
|
31
|
+
HO: { kind: 'unknown', pointValue: 42_000, quote: 'usd', exchange: 'NYMEX' }, // 42,000 gallons: energy/refined-products/heating-oil
|
|
32
|
+
BZ: { kind: 'unknown', pointValue: 1_000, quote: 'usd', exchange: 'NYMEX' }, // 1,000 barrels: energy/crude-oil/brent-crude-oil-last-day
|
|
33
|
+
// Metals (COMEX), quoted in US dollars per troy ounce (copper per pound).
|
|
34
|
+
GC: { kind: 'metal', pointValue: 100, quote: 'usd', exchange: 'COMEX' }, // 100 troy ounces: metals/precious/gold
|
|
35
|
+
MGC: { kind: 'metal', pointValue: 10, quote: 'usd', exchange: 'COMEX' }, // 10 troy ounces: metals/precious/e-micro-gold
|
|
36
|
+
SI: { kind: 'metal', pointValue: 5_000, quote: 'usd', exchange: 'COMEX' }, // 5,000 troy ounces: metals/precious/silver
|
|
37
|
+
SIL: { kind: 'metal', pointValue: 1_000, quote: 'usd', exchange: 'COMEX' }, // 1,000 troy ounces: metals/precious/1000-oz-silver
|
|
38
|
+
HG: { kind: 'metal', pointValue: 25_000, quote: 'usd', exchange: 'COMEX' }, // 25,000 pounds: metals/base/copper
|
|
39
|
+
MHG: { kind: 'metal', pointValue: 2_500, quote: 'usd', exchange: 'COMEX' }, // 2,500 pounds: metals/base/micro-copper
|
|
40
|
+
// Grains (CBOT), quoted in US cents per bushel (soybean oil per pound), the unit the chart
|
|
41
|
+
// draws (corn near 460): a whole point is one cent, worth the contract size in cents, and
|
|
42
|
+
// the quote is US cents, not dollars (Pine reads `syminfo.currency` "USX" there).
|
|
43
|
+
ZC: { kind: 'unknown', pointValue: 5_000, quote: 'other', exchange: 'CBOT' }, // 5,000 bushels: agriculture/grains/corn
|
|
44
|
+
ZW: { kind: 'unknown', pointValue: 5_000, quote: 'other', exchange: 'CBOT' }, // 5,000 bushels: agriculture/grains/wheat
|
|
45
|
+
KE: { kind: 'unknown', pointValue: 5_000, quote: 'other', exchange: 'CBOT' }, // 5,000 bushels: agriculture/grains/kc-wheat
|
|
46
|
+
ZS: { kind: 'unknown', pointValue: 5_000, quote: 'other', exchange: 'CBOT' }, // 5,000 bushels: agriculture/oilseeds/soybean
|
|
47
|
+
ZL: { kind: 'unknown', pointValue: 60_000, quote: 'other', exchange: 'CBOT' }, // 60,000 pounds: agriculture/oilseeds/soybean-oil
|
|
48
|
+
// Cryptocurrency futures (CME), quoted in US dollars per coin.
|
|
49
|
+
BTC: { kind: 'crypto', pointValue: 5, quote: 'usd', exchange: 'CME' }, // 5 bitcoin: cryptocurrencies/bitcoin/bitcoin
|
|
50
|
+
MBT: { kind: 'crypto', pointValue: 0.1, quote: 'usd', exchange: 'CME' }, // 0.1 bitcoin: cryptocurrencies/bitcoin/micro-bitcoin
|
|
51
|
+
ETH: { kind: 'crypto', pointValue: 50, quote: 'usd', exchange: 'CME' }, // 50 ether: cryptocurrencies/ether/ether
|
|
52
|
+
MET: { kind: 'crypto', pointValue: 0.1, quote: 'usd', exchange: 'CME' }, // 0.1 ether: cryptocurrencies/ether/micro-ether
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The US dollars one contract of `root` is worth for one whole point of its quoted price: the root's point value
|
|
56
|
+
* (CME_ROOT_SPECS) when the root is quoted in US dollars, so a print of `size` contracts at `price` is worth
|
|
57
|
+
* size x price x this. Undefined for a root off the table and for one quoted in another unit (the CBOT grains quote US
|
|
58
|
+
* cents): no dollar value is ever guessed.
|
|
59
|
+
*/
|
|
60
|
+
export function wrunCmeRootDollarPointValue(root) {
|
|
61
|
+
if (typeof root !== 'string')
|
|
62
|
+
return undefined;
|
|
63
|
+
const key = root.trim().toUpperCase();
|
|
64
|
+
if (!Object.prototype.hasOwnProperty.call(CME_ROOT_SPECS, key))
|
|
65
|
+
return undefined;
|
|
66
|
+
const spec = CME_ROOT_SPECS[key];
|
|
67
|
+
return spec.quote === 'usd' && Number.isFinite(spec.pointValue) && spec.pointValue > 0 ? spec.pointValue : undefined;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The dollar point value of a market's contract (`wrunCmeRootDollarPointValue` of its root: NQ1! and NQZ6 read NQ, 20)
|
|
71
|
+
* on a CME Group venue, where prints count contracts; null on a CME Group market none prices (an option contract, a
|
|
72
|
+
* root off the table, a cents-quoted grain), so its contracts are never valued in dollars; undefined off the CME family,
|
|
73
|
+
* whose prints this rule says nothing about.
|
|
74
|
+
*/
|
|
75
|
+
export function wrunCmeDollarPointValue(market) {
|
|
76
|
+
const exchange = typeof market?.exchange === 'string' ? market.exchange : undefined;
|
|
77
|
+
if (!isCmeGoverned(exchange))
|
|
78
|
+
return undefined;
|
|
79
|
+
const symbol = typeof market?.symbol === 'string' ? market.symbol : undefined;
|
|
80
|
+
return wrunCmeRootDollarPointValue(governedContractCoin(symbol)) ?? null;
|
|
81
|
+
}
|
|
@@ -49,6 +49,9 @@ function coinChannelExchange(lane, acquisition, chartExchange) {
|
|
|
49
49
|
const governed = wrunRowLaneChainGovernedExchange(lane, acquisition) !== null;
|
|
50
50
|
return governed && wrunOpraLaneServedTier(acquisition) !== 'realtime' ? undefined : exchange;
|
|
51
51
|
}
|
|
52
|
+
// The stocks tape has no coin channel (the registry refuses `liveByCoin` on a `stocks` lane): the reconcile polls it.
|
|
53
|
+
if (lane.governed === 'stocks')
|
|
54
|
+
return undefined;
|
|
52
55
|
if (lane.governed !== undefined) {
|
|
53
56
|
if (!isWrunOpraLaneAcquisition(acquisition) || wrunOpraLaneServedTier(acquisition) !== 'realtime')
|
|
54
57
|
return undefined;
|
|
@@ -110,6 +110,10 @@ export interface WrunParamChoice {
|
|
|
110
110
|
* min..max, each labelled by `option_labels` at the same position (else by
|
|
111
111
|
* its value). Undefined when the param declares no usable choice set. */
|
|
112
112
|
export declare function wrunParamChoices(param: WrunMetadataParam): WrunParamChoice[] | undefined;
|
|
113
|
+
/** The word a select's run value picks: its `style_values` entry when the select declares them, else its label;
|
|
114
|
+
* undefined when it picks no choice. The ONE read of a select bound to a word knob (contract F's `underlying`): the
|
|
115
|
+
* planners' (derived-roots.util `resolveWrunUnderlyingSettingKnob`) and the painted sheet's (`laneWordWrites`). */
|
|
116
|
+
export declare function wrunSelectPickWord(param: WrunMetadataParam, value: number | undefined): string | undefined;
|
|
113
117
|
/**
|
|
114
118
|
* A select setting resolved against the row's option strings and their
|
|
115
119
|
* labels: the ONE select read. The dialog's row codec, the run values, the
|
|
@@ -353,7 +357,8 @@ export declare function wrunHostParamAtDefault(param: WrunMetadataParam, setting
|
|
|
353
357
|
* / select param's value (a select's `style_values` entry when it declares
|
|
354
358
|
* them) to its targets, every om style knob's value to its targets (else its
|
|
355
359
|
* bound output's property), every host-applied param's pick to the pins of
|
|
356
|
-
* the inputs bound to it,
|
|
360
|
+
* the inputs bound to it, the lane words a setting rides (laneWordWrites:
|
|
361
|
+
* `currency`, `undemanded`, `underlying`), every Style page row to its target's property (an
|
|
357
362
|
* output's, or a text renderer's, heatmap's, profile's or level's: C1,
|
|
358
363
|
* wrunStyleTargetWrites; after the params, so an explicit Style edit wins
|
|
359
364
|
* over a code binding).
|
|
@@ -88,9 +88,11 @@
|
|
|
88
88
|
* colour param bound through `style_targets` and a `colors` row paint either.
|
|
89
89
|
*/
|
|
90
90
|
import isEqual from 'lodash-es/isEqual.js';
|
|
91
|
+
import { isWrunBatchedMarksKind, WRUN_BATCHED_MARKS_KINDS } from './wrun-batched-kinds.leaf.js';
|
|
91
92
|
import { HEATMAP_SENSITIVITY_MAX, HEATMAP_SENSITIVITY_MIN } from '../indicators/heatmap-sensitivity.util.js';
|
|
92
93
|
import { WRUN_SOURCE_FIELD_WORDS, wrunInputGateOn } from './wrun-market-facts.util.js';
|
|
93
94
|
import { wrunParamValuesFromSettings } from './wrun-param-values.util.js';
|
|
95
|
+
import { wrunUnderlyingKnobOf, wrunUnderlyingSettingName } from './derived-roots.leaf.js';
|
|
94
96
|
import { bindWrunColorSettings } from './wrun-color-settings.lazy.js';
|
|
95
97
|
import { WRUN_LEVELS_COLOR_PICKED_KEY } from './wrun-style-flags.util.js';
|
|
96
98
|
import { WRUN_OPTION_LANE_WORDS, WRUN_OPTION_VIEWS, wrunOptionViewParamKnobs } from './wrun-option-views.util.js';
|
|
@@ -158,6 +160,15 @@ export function wrunParamChoices(param) {
|
|
|
158
160
|
const labels = Array.isArray(param.option_labels) ? param.option_labels : [];
|
|
159
161
|
return values.map((value, at) => ({ value, label: nonEmptyString(labels[at]) ?? String(value) }));
|
|
160
162
|
}
|
|
163
|
+
/** The word a select's run value picks: its `style_values` entry when the select declares them, else its label;
|
|
164
|
+
* undefined when it picks no choice. The ONE read of a select bound to a word knob (contract F's `underlying`): the
|
|
165
|
+
* planners' (derived-roots.util `resolveWrunUnderlyingSettingKnob`) and the painted sheet's (`laneWordWrites`). */
|
|
166
|
+
export function wrunSelectPickWord(param, value) {
|
|
167
|
+
const choices = wrunParamChoices(param);
|
|
168
|
+
const at = choices?.findIndex((choice) => choice.value === value) ?? -1;
|
|
169
|
+
const word = at < 0 ? undefined : Array.isArray(param.style_values) ? param.style_values[at] : choices?.[at]?.label;
|
|
170
|
+
return typeof word === 'string' ? word : undefined;
|
|
171
|
+
}
|
|
161
172
|
/**
|
|
162
173
|
* A select setting resolved against the row's option strings and their
|
|
163
174
|
* labels: the ONE select read. The dialog's row codec, the run values, the
|
|
@@ -606,7 +617,7 @@ function writeChild(container, key, value) {
|
|
|
606
617
|
}
|
|
607
618
|
/** The sheet sections whose `colors` lists may hold packed colours (WRUN-BATCHED-MARKS: the build packs a
|
|
608
619
|
* section's colours, the value a bound colour param writes there as it is). */
|
|
609
|
-
const PACKED_COLOR_SECTIONS = new Set(
|
|
620
|
+
const PACKED_COLOR_SECTIONS = new Set(WRUN_BATCHED_MARKS_KINDS);
|
|
610
621
|
/** True for one slot of a batched section's `colors` list (`[section, entry, 'colors', slot]`): the only sheet
|
|
611
622
|
* location where a number IS a colour, so a colour write lands there packed. */
|
|
612
623
|
function isPackedColorSlot(path) {
|
|
@@ -1188,7 +1199,12 @@ function optionViewParamWrites(metadata, settings) {
|
|
|
1188
1199
|
}
|
|
1189
1200
|
/** The lane words a setting rides (kit 0.77.0), off the param's run value (the init() number):
|
|
1190
1201
|
* `currency_param` writes the picked label ("USD" or "Coin") into `currency`; a `when` gate that
|
|
1191
|
-
* is off marks the input `undemanded`. The browser's one authority: its plan reads neither.
|
|
1202
|
+
* is off marks the input `undemanded`. The browser's one authority: its plan reads neither. An
|
|
1203
|
+
* `underlying` bound to a compute select (contract F, "@chain") takes the word its pick names
|
|
1204
|
+
* (`wrunSelectPickWord`, the planners' read), so every reader of the painted sheet (the planners,
|
|
1205
|
+
* the run's refusal context) sees the root the run reads; availability still judges every options
|
|
1206
|
+
* input on the chart's own chain (wrun-input-requirements.leaf never reads `underlying`); a pick
|
|
1207
|
+
* naming no knob word writes nothing (the planners refuse it). */
|
|
1192
1208
|
function laneWordWrites(metadata, settings) {
|
|
1193
1209
|
const sources = isRecord(metadata.inputSources) ? metadata.inputSources : {};
|
|
1194
1210
|
const params = Array.isArray(metadata.params) ? metadata.params : [];
|
|
@@ -1213,6 +1229,13 @@ function laneWordWrites(metadata, settings) {
|
|
|
1213
1229
|
if (gate !== undefined && source.undemanded !== true && !wrunInputGateOn(source, gate.value)) {
|
|
1214
1230
|
writes.push({ path: ['inputSources', name, 'undemanded'], kind: 'flag', on: true, create: true });
|
|
1215
1231
|
}
|
|
1232
|
+
const pick = runValue(wrunUnderlyingSettingName(source.underlying));
|
|
1233
|
+
const word = pick?.param.type === 'select' && pick.param.style === undefined
|
|
1234
|
+
? wrunSelectPickWord(pick.param, pick.value)
|
|
1235
|
+
: undefined;
|
|
1236
|
+
if (word !== undefined && wrunUnderlyingKnobOf(word) !== undefined) {
|
|
1237
|
+
writes.push({ path: ['inputSources', name, 'underlying'], kind: 'value', value: word, create: true });
|
|
1238
|
+
}
|
|
1216
1239
|
}
|
|
1217
1240
|
return writes;
|
|
1218
1241
|
}
|
|
@@ -1278,13 +1301,15 @@ const WRUN_RAYS_WIDTH_MAX = 8;
|
|
|
1278
1301
|
* by swatch onto the declared list (recoloured in place, never grown or created; each in the kind its
|
|
1279
1302
|
* location holds, a colour word or a packed number, applyWrite); `opacity` onto a mark's `opacity_pct`
|
|
1280
1303
|
* (percent, rounded, 10..80) or a span's or ray's `opacity` (0..1); a ray's `width` (0.5..8 css px) and
|
|
1281
|
-
* `lineStyle` (its `line_style`).
|
|
1282
|
-
* them through `style_targets`.
|
|
1304
|
+
* `lineStyle` (its `line_style`). A flags section takes its colours alone (it declares no opacity). Look, size,
|
|
1305
|
+
* caption and position keys take no Style row: a param binds them through `style_targets`.
|
|
1283
1306
|
*/
|
|
1284
1307
|
function batchedStyleTargetWrites(kind, base, property, raw) {
|
|
1285
1308
|
if (property === 'colors') {
|
|
1286
1309
|
return colorsRowValue(raw).flatMap((color, at) => color === undefined ? [] : [{ path: [...base, 'colors', at], kind: 'color', color, create: false }]);
|
|
1287
1310
|
}
|
|
1311
|
+
if (kind === 'flags')
|
|
1312
|
+
return [];
|
|
1288
1313
|
if (property === 'opacity') {
|
|
1289
1314
|
const write = styleRowValue('opacity', raw);
|
|
1290
1315
|
if (write === undefined)
|
|
@@ -1366,9 +1391,8 @@ function wrunStyleTargetWrites(metadata, target, property, raw) {
|
|
|
1366
1391
|
if (section === undefined)
|
|
1367
1392
|
return [];
|
|
1368
1393
|
const base = [section, name];
|
|
1369
|
-
if (kind
|
|
1394
|
+
if (isWrunBatchedMarksKind(kind))
|
|
1370
1395
|
return batchedStyleTargetWrites(kind, base, property, raw);
|
|
1371
|
-
}
|
|
1372
1396
|
if (property === 'color' && (kind === 'text' || kind === 'levels')) {
|
|
1373
1397
|
const color = wrunColorSettingString(raw);
|
|
1374
1398
|
return color === undefined ? [] : [{ path: [...base, 'color'], kind: 'value', value: color, create: true }];
|
|
@@ -1405,7 +1429,8 @@ function styleRowWrites(metadata, settings) {
|
|
|
1405
1429
|
* / select param's value (a select's `style_values` entry when it declares
|
|
1406
1430
|
* them) to its targets, every om style knob's value to its targets (else its
|
|
1407
1431
|
* bound output's property), every host-applied param's pick to the pins of
|
|
1408
|
-
* the inputs bound to it,
|
|
1432
|
+
* the inputs bound to it, the lane words a setting rides (laneWordWrites:
|
|
1433
|
+
* `currency`, `undemanded`, `underlying`), every Style page row to its target's property (an
|
|
1409
1434
|
* output's, or a text renderer's, heatmap's, profile's or level's: C1,
|
|
1410
1435
|
* wrunStyleTargetWrites; after the params, so an explicit Style edit wins
|
|
1411
1436
|
* over a code binding).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type WrunPollLaneFetchAsk } from './sources/wrun-poll-lane.types.js';
|
|
2
|
+
import type { WrunRowLaneContext } from './sources/wrun-row-lane.types.js';
|
|
3
|
+
import type { WrunRefusalSeed } from './wrun-refusal.util.js';
|
|
4
|
+
/** Refused before any fetch: the chart reads no US stock tape (the market resolver answered none). */
|
|
5
|
+
export declare const WRUN_DARK_POOL_NOT_US_STOCK_CODE = "wrun_dark_pool_not_us_stock";
|
|
6
|
+
/** Refused before any fetch: the US stock chart is on Price only, which has no trades. */
|
|
7
|
+
export declare const WRUN_DARK_POOL_PRICE_ONLY_CODE = "wrun_dark_pool_price_only";
|
|
8
|
+
/** The Price only refusal's seed: the Live price wall's own words (wrun-refusal.util `feed-missing` `price-only`). */
|
|
9
|
+
export declare const WRUN_DARK_POOL_PRICE_ONLY_SEED: WrunRefusalSeed;
|
|
10
|
+
/** The tape market a US stock chart's Dark pool reads (the chart port's answer on Trades): the identity's fields. */
|
|
11
|
+
export interface WrunDarkPoolMarket {
|
|
12
|
+
exchange: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
coin: string;
|
|
15
|
+
}
|
|
16
|
+
/** A window read as the chart port answers it (stock-tape-dark-pool-read.util `DarkPoolWindowRead`). */
|
|
17
|
+
export interface WrunDarkPoolRead {
|
|
18
|
+
prints: ReadonlyArray<{
|
|
19
|
+
timestampMs: number;
|
|
20
|
+
price: number;
|
|
21
|
+
size: number;
|
|
22
|
+
usd: number;
|
|
23
|
+
side: number;
|
|
24
|
+
}>;
|
|
25
|
+
servedToMs: number;
|
|
26
|
+
capped: ReadonlyArray<{
|
|
27
|
+
fromMs: number;
|
|
28
|
+
toMs: number;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The lane's identity: the chart's tape market (`exchange`, `symbol`, `coin`), asked of the chart port with the run's
|
|
33
|
+
* chart metadata whole (its feed fields) and its provenance, or a refusal by name before any fetch: off a US stock
|
|
34
|
+
* tape market with the unserved-scope seed (a declared `missing: "empty"` reads an empty block with the market's
|
|
35
|
+
* note), on a tape the venue policy keeps the run off with that policy's refusal (`WrunLaneVenueBlockedError`, the
|
|
36
|
+
* tape's own wall words), on Price only with the Live price wall's words, both whatever the fill.
|
|
37
|
+
*/
|
|
38
|
+
export declare function wrunDarkPoolIdentity(ctx: WrunRowLaneContext): Promise<Record<string, unknown>>;
|
|
39
|
+
/**
|
|
40
|
+
* A window read as the lane's rows: one row per print time `[ts, ...tuples]` (offset 0 on its own stamp; the landing
|
|
41
|
+
* re-bases it on the host bar), plus a marker in every host bar a capped day read left in part: with the ask's host
|
|
42
|
+
* bars (their spans on the chart's session grid), one inside each bar the span reaches, at the later of its open and
|
|
43
|
+
* the span's start, so a session's shortened last bar is marked too; else one every `intervalMs` across the span and
|
|
44
|
+
* one at its end (the oldest answered print's own bar). Inside the ask's `[fromTs, toTs)` only, ascending.
|
|
45
|
+
*/
|
|
46
|
+
export declare function wrunDarkPoolRows(read: WrunDarkPoolRead, ask: Pick<WrunPollLaneFetchAsk, 'fromTs' | 'toTs' | 'intervalMs' | 'hostBars'>): unknown[][];
|
|
47
|
+
/** The lane's own fetch: the chart port's window read over the ask from the lane's horizon on (its tape market, the
|
|
48
|
+
* identity's fields, the horizon as its floor), let go of with the overlay (`ask.signal`), as the lane's rows. The read
|
|
49
|
+
* answers its whole window (the edge and a capped day are in its rows), never a part with more to follow. */
|
|
50
|
+
export declare function fetchWrunDarkPoolRows(ask: WrunPollLaneFetchAsk): Promise<unknown[][]>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `dark_pool` row lane's identity and fetch (sources/row-lanes/dark_pool.ts loads this module inside them, so the
|
|
3
|
+
* lane file on the boot path stays light). Both read the chart port (web: titan-charts):
|
|
4
|
+
* - `wrunDarkPoolMarket(chart, { official })`: the Tape's market resolver under `us-equities-full` and the venue policy:
|
|
5
|
+
* the tape market on a US stock Trades chart, the venue policy's stop (a user run on a tape closed to scripting, on
|
|
6
|
+
* either feed), the Price only stop, or null for a chart that reads no US stock tape;
|
|
7
|
+
* - `wrunDarkPoolPrints(market, window, { signal })`: the window read (stock-tape-dark-pool-read.util
|
|
8
|
+
* `readDarkPoolWindow`): the Tape's rule over each trade date, cut at the served edge, a capped day's span named.
|
|
9
|
+
* docs/features/data/us-stocks-tape.md, "Dark pool prints on the chart".
|
|
10
|
+
*/
|
|
11
|
+
import { wrunChartHostEnv } from '../../host-env.js';
|
|
12
|
+
import { serverNowMs } from '../auth/server-clock.util.js';
|
|
13
|
+
import { createKScriptVenueBlockedError } from '../chart/kscript-venue-policy.util.js';
|
|
14
|
+
import { refuseWrunPollInput } from './sources/wrun-poll-lane.types.js';
|
|
15
|
+
import { WRUN_DARK_POOL_HORIZON_MS } from './sources/row-lanes/dark_pool.js';
|
|
16
|
+
import { wrunLaneUnservedScopeSeed } from './sources/wrun-poll-lanes.util.js';
|
|
17
|
+
import { WrunLaneVenueBlockedError } from './wrun-registry-errors.util.js';
|
|
18
|
+
import { wrunPartialMarkerTuple } from './wrun-present-bits.util.js';
|
|
19
|
+
/** The lane's key, its feed in a refusal record. */
|
|
20
|
+
const LANE_KEY = 'dark_pool';
|
|
21
|
+
/** f64s per print (sources/row-lanes/dark_pool.ts `WRUN_DARK_POOL_WIDTH`). */
|
|
22
|
+
const WIDTH = 6;
|
|
23
|
+
/** Refused before any fetch: the chart reads no US stock tape (the market resolver answered none). */
|
|
24
|
+
export const WRUN_DARK_POOL_NOT_US_STOCK_CODE = 'wrun_dark_pool_not_us_stock';
|
|
25
|
+
/** Refused before any fetch: the US stock chart is on Price only, which has no trades. */
|
|
26
|
+
export const WRUN_DARK_POOL_PRICE_ONLY_CODE = 'wrun_dark_pool_price_only';
|
|
27
|
+
/** The Price only refusal's seed: the Live price wall's own words (wrun-refusal.util `feed-missing` `price-only`). */
|
|
28
|
+
export const WRUN_DARK_POOL_PRICE_ONLY_SEED = Object.freeze({
|
|
29
|
+
cls: 'feed-missing',
|
|
30
|
+
variant: 'price-only',
|
|
31
|
+
severity: 'paused',
|
|
32
|
+
});
|
|
33
|
+
async function darkPoolPort() {
|
|
34
|
+
return (await wrunChartHostEnv().chart.loadTitanCharts());
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The lane's identity: the chart's tape market (`exchange`, `symbol`, `coin`), asked of the chart port with the run's
|
|
38
|
+
* chart metadata whole (its feed fields) and its provenance, or a refusal by name before any fetch: off a US stock
|
|
39
|
+
* tape market with the unserved-scope seed (a declared `missing: "empty"` reads an empty block with the market's
|
|
40
|
+
* note), on a tape the venue policy keeps the run off with that policy's refusal (`WrunLaneVenueBlockedError`, the
|
|
41
|
+
* tape's own wall words), on Price only with the Live price wall's words, both whatever the fill.
|
|
42
|
+
*/
|
|
43
|
+
export async function wrunDarkPoolIdentity(ctx) {
|
|
44
|
+
const port = await darkPoolPort();
|
|
45
|
+
const chart = ctx.chartMetadata ?? { exchange: ctx.exchange, symbol: ctx.symbol, coin: ctx.coin };
|
|
46
|
+
const answer = (await port.wrunDarkPoolMarket?.(chart, { official: ctx.official === true })) ?? null;
|
|
47
|
+
if (answer === null) {
|
|
48
|
+
return refuseWrunPollInput(ctx, `reads the US stocks tape (${WRUN_DARK_POOL_NOT_US_STOCK_CODE}): this chart reads no US stock's tape, so it has ` +
|
|
49
|
+
'no dark pool prints', wrunLaneUnservedScopeSeed(LANE_KEY));
|
|
50
|
+
}
|
|
51
|
+
if (answer.feed === 'closed-tape') {
|
|
52
|
+
// The venue policy's refusal on either feed, worded by the tape's plane: no switch lets this run read that tape.
|
|
53
|
+
throw new WrunLaneVenueBlockedError(createKScriptVenueBlockedError(answer.exchange).message, answer.exchange);
|
|
54
|
+
}
|
|
55
|
+
if (answer.feed === 'price-only') {
|
|
56
|
+
return refuseWrunPollInput(ctx, `reads the US stocks tape (${WRUN_DARK_POOL_PRICE_ONLY_CODE}): the chart is on Price only, which has no ` +
|
|
57
|
+
'trades; dark pool prints are a Real-time trades feature, so switch the chart to Trades', WRUN_DARK_POOL_PRICE_ONLY_SEED);
|
|
58
|
+
}
|
|
59
|
+
return { exchange: answer.exchange, symbol: answer.symbol, coin: answer.coin };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A window read as the lane's rows: one row per print time `[ts, ...tuples]` (offset 0 on its own stamp; the landing
|
|
63
|
+
* re-bases it on the host bar), plus a marker in every host bar a capped day read left in part: with the ask's host
|
|
64
|
+
* bars (their spans on the chart's session grid), one inside each bar the span reaches, at the later of its open and
|
|
65
|
+
* the span's start, so a session's shortened last bar is marked too; else one every `intervalMs` across the span and
|
|
66
|
+
* one at its end (the oldest answered print's own bar). Inside the ask's `[fromTs, toTs)` only, ascending.
|
|
67
|
+
*/
|
|
68
|
+
export function wrunDarkPoolRows(read, ask) {
|
|
69
|
+
const byTs = new Map();
|
|
70
|
+
const add = (ts, tuple) => {
|
|
71
|
+
if (!(ts >= ask.fromTs && ts < ask.toTs))
|
|
72
|
+
return;
|
|
73
|
+
const list = byTs.get(ts);
|
|
74
|
+
if (list === undefined)
|
|
75
|
+
byTs.set(ts, [tuple]);
|
|
76
|
+
else
|
|
77
|
+
list.push(tuple);
|
|
78
|
+
};
|
|
79
|
+
for (const print of read.prints) {
|
|
80
|
+
const tuple = [0, print.price, print.size, print.usd, Math.sign(print.side), 0];
|
|
81
|
+
if (tuple.every((value) => Number.isFinite(value)))
|
|
82
|
+
add(print.timestampMs, tuple);
|
|
83
|
+
}
|
|
84
|
+
const step = ask.intervalMs > 0 ? ask.intervalMs : Number.POSITIVE_INFINITY;
|
|
85
|
+
for (const span of read.capped) {
|
|
86
|
+
const toMs = Math.min(span.toMs, ask.toTs - 1);
|
|
87
|
+
if (ask.hostBars !== undefined) {
|
|
88
|
+
for (const bar of ask.hostBars) {
|
|
89
|
+
if (bar.fromMs <= toMs && bar.toMs > span.fromMs)
|
|
90
|
+
add(Math.max(bar.fromMs, span.fromMs), wrunPartialMarkerTuple(WIDTH));
|
|
91
|
+
}
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
for (let ts = Math.max(span.fromMs, ask.fromTs); ts < toMs; ts += step)
|
|
95
|
+
add(ts, wrunPartialMarkerTuple(WIDTH));
|
|
96
|
+
add(toMs, wrunPartialMarkerTuple(WIDTH));
|
|
97
|
+
}
|
|
98
|
+
return [...byTs.entries()].sort((a, b) => a[0] - b[0]).map(([ts, tuples]) => [ts, ...tuples]);
|
|
99
|
+
}
|
|
100
|
+
/** The lane's own fetch: the chart port's window read over the ask from the lane's horizon on (its tape market, the
|
|
101
|
+
* identity's fields, the horizon as its floor), let go of with the overlay (`ask.signal`), as the lane's rows. The read
|
|
102
|
+
* answers its whole window (the edge and a capped day are in its rows), never a part with more to follow. */
|
|
103
|
+
export async function fetchWrunDarkPoolRows(ask) {
|
|
104
|
+
const { exchange, symbol, coin } = ask.extras;
|
|
105
|
+
if (typeof exchange !== 'string' || typeof symbol !== 'string' || exchange === '' || symbol === '') {
|
|
106
|
+
throw new Error(`wrun row lane '${LANE_KEY}' was asked with no tape market`);
|
|
107
|
+
}
|
|
108
|
+
// The plan starts a bar's ask at its open, and a yearly bar opens long before the horizon: the source keeps nothing
|
|
109
|
+
// older, so the read starts at the horizon (at most three trade dates); the plan keeps that bar partial.
|
|
110
|
+
const horizonMs = (ask.nowMs ?? serverNowMs()) - WRUN_DARK_POOL_HORIZON_MS;
|
|
111
|
+
const fromMs = Math.max(ask.fromTs, horizonMs);
|
|
112
|
+
if (fromMs >= ask.toTs) {
|
|
113
|
+
ask.onComplete?.(true);
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
// A fetch that starts after its overlay left, or after its dataset ended, dispatches nothing (its signal says so).
|
|
117
|
+
ask.signal?.throwIfAborted();
|
|
118
|
+
const port = await darkPoolPort();
|
|
119
|
+
ask.signal?.throwIfAborted();
|
|
120
|
+
if (port.wrunDarkPoolPrints === undefined)
|
|
121
|
+
throw new Error(`wrun row lane '${LANE_KEY}': no dark pool read here`);
|
|
122
|
+
// The horizon rides as the read's floor: a finished trade date is read whole from it once, and a later ask of it
|
|
123
|
+
// (a pan over older bars, a bar the moving horizon left partial) is served from that read.
|
|
124
|
+
const read = await port.wrunDarkPoolPrints({ exchange, symbol, coin: typeof coin === 'string' ? coin : '' }, { fromMs, toMs: ask.toTs }, { ...(ask.signal !== undefined ? { signal: ask.signal } : {}), floorMs: horizonMs });
|
|
125
|
+
ask.onComplete?.(true);
|
|
126
|
+
return wrunDarkPoolRows(read, ask);
|
|
127
|
+
}
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
* many evaluated rows into the run's window, the decider reads it beside the plotted outputs' own
|
|
14
14
|
* warm-up end (`withDeclaredWarmupEnd`), and a page of older candles is asked while that end still
|
|
15
15
|
* lands inside the viewport, so the bars on screen get the declared window of history before them.
|
|
16
|
-
* The declared lookback the decider sizes with stays a proven twin's alone
|
|
17
|
-
*
|
|
16
|
+
* The declared lookback the decider sizes with stays a proven twin's alone. A declaration is trusted
|
|
17
|
+
* for an empty run: rows that hold it plus a bucket of slack and print nothing buy no page
|
|
18
|
+
* (`wrunDeclaredWarmupCovered`); an undeclared empty run keeps its probe pages. No new fetch initiator,
|
|
18
19
|
* range decider or dedupe rule: the page rides `kscript-warmup-backfill` through the lazy chain, and
|
|
19
20
|
* the prepend's wave reruns the overlay.
|
|
20
21
|
*
|
|
@@ -31,8 +32,16 @@
|
|
|
31
32
|
* and the credit a hidden head the session's guest evaluated earns against the declared warm-up ask
|
|
32
33
|
* (`wrunDeclaredWarmupEndTs`'s `creditedBars`): the bars the head already ran are never bought again as
|
|
33
34
|
* visible pages.
|
|
35
|
+
*
|
|
36
|
+
* The converging stamp (`history_warmup` of kind `converges`, STAMPS round A) reads through here as well, in its
|
|
37
|
+
* frozen round A shape only (the exact stamp's windows and `plus`, the tolerance literal 1e-6, the gate with the one
|
|
38
|
+
* known corpus and its counts): `wrunHistoryWarmupOf` reads both kinds, `wrunHistoryWarmupExactOf` the exact kind
|
|
39
|
+
* alone (the browser compile pipeline's stamp writer, which never writes a converging value), W is the same
|
|
40
|
+
* arithmetic for both (`wrunHistoryWarmupBars`), and `wrunHistoryStampExactColumns` names the selector columns the
|
|
41
|
+
* overlap proof compares exactly whatever the tolerance. Whether a chart honors a converging stamp is the overlay
|
|
42
|
+
* run's question (`wrun-converging-prefix`, default off), never this reader's.
|
|
34
43
|
*/
|
|
35
|
-
import type { WrunHistoryWarmup, WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
44
|
+
import type { WrunHistoryWarmup, WrunHistoryWarmupExact, WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
36
45
|
/**
|
|
37
46
|
* The deepest declared warm-up the chart reads, in bars: Pine's `max_bars_back` ceiling, the
|
|
38
47
|
* deepest history a Pine script can reference, so no converted script declares more for a reason.
|
|
@@ -64,25 +73,70 @@ export declare function wrunDeclaredWarmupBars(sheet: Pick<WrunIndicatorMetadata
|
|
|
64
73
|
export declare function wrunDeclaredWarmupEndTs(rows: ReadonlyArray<{
|
|
65
74
|
ts: number;
|
|
66
75
|
}>, bars: number, intervalMs: number, creditedBars?: number): number | null;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the run's evaluated rows (with a credited head) hold a declared warm-up of `bars` plus `slackBars` and the
|
|
78
|
+
* bar after them: the first bar the runner evaluates past the slack is a row of the window. Counted in rows like
|
|
79
|
+
* `wrunDeclaredWarmupEndTs`, so a gapped tape is measured in bars, never clock time.
|
|
80
|
+
*/
|
|
81
|
+
export declare function wrunDeclaredWarmupCovered(rows: ReadonlyArray<{
|
|
82
|
+
ts: number;
|
|
83
|
+
}>, bars: number, slackBars: number, creditedBars?: number): boolean;
|
|
67
84
|
/** The deepest exact warm-up a chart session takes (`warmup-cap` past it): a head is fetched in at most
|
|
68
85
|
* six pages and 1,000 bars (wrun-overlay-run.util), so a running start deeper than that is never owed. */
|
|
69
86
|
export declare const WRUN_HISTORY_WARMUP_MAX_BARS = 1000;
|
|
70
87
|
/**
|
|
71
88
|
* The exact warm-up stamp in its frozen shape (`history_warmup`, the kit contract D3), copied, or undefined
|
|
72
|
-
* for anything else: `kind` "exact" (
|
|
73
|
-
* of the declaration's window shape (`{ terms: [{ param, multiplier }], plus?, min? }`) and a
|
|
74
|
-
* when present. Strict: one malformed window makes the whole value no stamp, so a torn or foreign
|
|
75
|
-
* reads as a smaller W. The shape only: a number the kit never writes (a multiplier at or below 0, a
|
|
76
|
-
* `plus` or `min`, NaN or an infinity) reads here and is refused by `wrunHistoryWarmupNumbersRefusal`, so
|
|
77
|
-
* chart names it (`warmup-cap`) and the compile pipeline stamps no such facet.
|
|
89
|
+
* for anything else: `kind` "exact" (any other kind, a converging stamp included, reads as no stamp here), a
|
|
90
|
+
* `windows` list of the declaration's window shape (`{ terms: [{ param, multiplier }], plus?, min? }`) and a
|
|
91
|
+
* number `plus` when present. Strict: one malformed window makes the whole value no stamp, so a torn or foreign
|
|
92
|
+
* value never reads as a smaller W. The shape only: a number the kit never writes (a multiplier at or below 0, a
|
|
93
|
+
* negative `plus` or `min`, NaN or an infinity) reads here and is refused by `wrunHistoryWarmupNumbersRefusal`, so
|
|
94
|
+
* the chart names it (`warmup-cap`) and the compile pipeline stamps no such facet. The browser compile pipeline's
|
|
95
|
+
* stamp writer reads through here alone: a browser compile has no gate, so it never writes a converging value
|
|
96
|
+
* whatever the shared reader accepts. Pure.
|
|
97
|
+
*/
|
|
98
|
+
export declare function wrunHistoryWarmupExactOf(value: unknown): WrunHistoryWarmupExact | undefined;
|
|
99
|
+
/** The one tolerance a converging stamp may carry in round A: a literal of the frozen contract, compared with `===`. */
|
|
100
|
+
export declare const WRUN_HISTORY_WARMUP_TOLERANCE = 0.000001;
|
|
101
|
+
/** The gate corpus round A knows; a converging stamp naming any other reads as no stamp. */
|
|
102
|
+
export declare const WRUN_HISTORY_WARMUP_GATE_CORPUS = "om-history-matrix-v1";
|
|
103
|
+
/** The fewest valid split points a gate certifies (its own minimum): a record claiming fewer is one the gate could not
|
|
104
|
+
* have written, so it reads as no stamp. */
|
|
105
|
+
export declare const WRUN_HISTORY_WARMUP_GATE_MIN_SPLITS = 24;
|
|
106
|
+
/**
|
|
107
|
+
* The warm-up stamp of either kind in its frozen shape (`history_warmup`), copied, or undefined for anything else:
|
|
108
|
+
* the exact stamp (`wrunHistoryWarmupExactOf`), or the converging one in its round A shape alone (the exact shape's
|
|
109
|
+
* windows and `plus`, `tolerance === 1e-6`, a `gate` record naming the corpus `om-history-matrix-v1` with an integer
|
|
110
|
+
* `bars` at or above 1, an integer `splits` at or above 24 and `settings: "defaults"`): another tolerance, another
|
|
111
|
+
* corpus, a count below its floor or no gate reads as no stamp, and so does any other kind (a later round's). The
|
|
112
|
+
* overlay run decides whether a chart honors a converging stamp at all (its flag, before any other reading); this
|
|
113
|
+
* reader only reads. Pure.
|
|
78
114
|
*/
|
|
79
115
|
export declare function wrunHistoryWarmupOf(value: unknown): WrunHistoryWarmup | undefined;
|
|
80
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* The selector columns of a sheet's row outputs (STAMPS round A, R2-2): every output index a selector-style field
|
|
118
|
+
* anywhere in the sheet names (by the output's name), and every barcolor output's own index. A selector field is any
|
|
119
|
+
* `*_by` or `*_where` key holding an output name, in every section that carries one: an output's `color_by`,
|
|
120
|
+
* `color_packed_by`, `width_by`, `stroke_width_by`, `shape_where`, `show_price_display_by`, `fill_color_by` and
|
|
121
|
+
* `fill_color_packed_by`; a fill's `color_by`, `color_packed_by` and `opacity_by`; a range's `color_by`,
|
|
122
|
+
* `color_packed_by`, `edge_width_by` and `show_price_display_by`; a renderer's, a table cell's, a box's, a card's, a
|
|
123
|
+
* hover block's, a legend entry's and the HUD's ladders (a section the interface leaves untyped, boxes and segments,
|
|
124
|
+
* included); plus a renderer's `where` gate, an output's `badges`, and the `output` a block of an output's `hover` list
|
|
125
|
+
* names (a `chips` block picks a ladder label with it). A barcolor output (`barcolor: true`) is a selector of itself:
|
|
126
|
+
* its value indexes its colours. Such a column picks a colour, a width, a shape, a chip or a gate, never a level, so a
|
|
127
|
+
* converging session's overlap proof compares it exactly whatever the tolerance (`wrunConvergedEqual` with no
|
|
128
|
+
* tolerance): a value a hair across an index boundary, a gate a hair off zero or a packed colour a few units off is
|
|
129
|
+
* another picture. Read by key, never by a list of sections, so a ladder a later sheet adds is a selector the day it
|
|
130
|
+
* ships. The chart's copy of the sdk rule the gate applies (one rule, two copies). Empty for a sheet that declares no
|
|
131
|
+
* selector. Pure.
|
|
132
|
+
*/
|
|
133
|
+
export declare function wrunHistoryStampExactColumns(sheet: Partial<WrunIndicatorMetadata>): ReadonlySet<number>;
|
|
134
|
+
/** Why a warm-up stamp (either kind) has no W on a chart: a number the kit never writes (`warmup-cap`, the stamp's
|
|
81
135
|
* corroboration: a multiplier at or below 0, a negative `plus` or `min`, NaN or an infinity anywhere), or a term
|
|
82
136
|
* the overlay's settings cannot resolve (`warmup-unresolved`: it names no declared numeric param, a host-filled
|
|
83
137
|
* one, a param holding no finite value, or one holding a negative value). */
|
|
84
138
|
export type WrunHistoryWarmupRefusal = 'warmup-cap' | 'warmup-unresolved';
|
|
85
|
-
/** The W of
|
|
139
|
+
/** The W of a warm-up stamp (either kind), or the reason it has none. */
|
|
86
140
|
export type WrunHistoryWarmupBars = {
|
|
87
141
|
bars: number;
|
|
88
142
|
} | {
|
|
@@ -95,7 +149,8 @@ export type WrunHistoryWarmupBars = {
|
|
|
95
149
|
* stamp whose every number is one the kit writes. */
|
|
96
150
|
export declare function wrunHistoryWarmupNumbersRefusal(warmup: WrunHistoryWarmup): 'warmup-cap' | undefined;
|
|
97
151
|
/**
|
|
98
|
-
* The W of
|
|
152
|
+
* The W of a warm-up stamp with the overlay's param values (by name), or the reason it has none, one arithmetic for
|
|
153
|
+
* both kinds (a converging stamp's W counts accepted inputs, read off the same windows): the
|
|
99
154
|
* stamp's numbers first (`wrunHistoryWarmupNumbersRefusal`, `warmup-cap`), then each window evaluated with the
|
|
100
155
|
* declaration's own arithmetic (`wrunDeclaredWarmupBars` over the window alone: max(ceil(min),
|
|
101
156
|
* ceil(sum(value x multiplier)) + plus), whole bars, a window answering nothing counting 0), summed, plus the
|