@orangecharts/wrun-chart-host 0.11.1 → 0.15.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 +4 -4
- package/dist/constants/feature-flags.constants.js +38 -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 +69 -3
- package/dist/host-env.js +21 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -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 +141 -20
- 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 +5 -5
- package/dist/market-data/venues/opra.js +3 -3
- package/dist/market-data/venues/stocks.contract.copy.json +6 -5
- package/dist/market-data/venues/stocks.d.ts +5 -5
- package/dist/market-data/venues/stocks.js +21 -18
- 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 +43 -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 +38 -7
- package/dist/utility/chart/cache-alignment.util.js +50 -13
- 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/footprint-band.util.d.ts +21 -5
- package/dist/utility/chart/footprint-band.util.js +53 -14
- 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 +38 -13
- package/dist/utility/chart/wrun-run-result.util.js +97 -27
- 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 +46 -23
- package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
- 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.d.ts +24 -7
- package/dist/utility/wrun/wrun-canvases.util.js +99 -30
- 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-hover.util.d.ts +8 -2
- package/dist/utility/wrun/wrun-hover.util.js +24 -13
- 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 +655 -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-output-words.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-output-words.util.js +51 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -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-result.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
- package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
- package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
- 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 +95 -5
- package/dist/utility/wrun/wrun-run-health.util.js +209 -3
- 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 +38 -11
- package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
- 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-style-names.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-style-names.util.js +74 -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
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
|
|
2
|
+
import { isWrunLegStreamClass } from './wrun-leg-stream-classes.js';
|
|
3
|
+
import { wrunOutputWords } from './wrun-output-words.util.js';
|
|
4
|
+
import { WRUN_VISIBILITY_RULES, wrunOutputDraw } from './wrun-visibility-table.js';
|
|
2
5
|
import { attachWrunRefusal, wrunOptionsStopSeed, wrunRefusalFor, } from './wrun-refusal.util.js';
|
|
3
6
|
export const WRUN_NO_READY_ROWS_CODE = 'WRUN_NO_READY_ROWS';
|
|
4
7
|
export const WRUN_OUTPUT_ALL_NAN_CODE = 'WRUN_OUTPUT_ALL_NAN';
|
|
@@ -180,9 +183,14 @@ export function wrunUnservedLegDiagnostics(legs, ctx) {
|
|
|
180
183
|
/** Plots that draw a value on every ready bar; a sheet output with no `plot` draws a line. */
|
|
181
184
|
const CONTINUOUS_PLOTS = new Set(['line', 'area', 'histogram', 'bar']);
|
|
182
185
|
const DEFAULT_PLOT = 'line';
|
|
183
|
-
|
|
186
|
+
/** The run's health over `rows`; `builtIn` is the built-in the overlay ports (builtinPortOf over
|
|
187
|
+
* its settings), whose words name a silent line it names (absent: the sheet's words). */
|
|
188
|
+
export function wrunRunHealth(metadata, rows, builtIn) {
|
|
184
189
|
const outputs = Array.isArray(metadata?.outputs) ? metadata.outputs : [];
|
|
185
|
-
const watched = outputs.filter((output) => CONTINUOUS_PLOTS.has(output.plot ?? DEFAULT_PLOT) &&
|
|
190
|
+
const watched = outputs.filter((output) => CONTINUOUS_PLOTS.has(output.plot ?? DEFAULT_PLOT) &&
|
|
191
|
+
output.legend !== false &&
|
|
192
|
+
output.visible !== false &&
|
|
193
|
+
output.omit_if_empty !== true);
|
|
186
194
|
const finite = new Set();
|
|
187
195
|
let ready = 0;
|
|
188
196
|
for (const row of rows) {
|
|
@@ -205,7 +213,7 @@ export function wrunRunHealth(metadata, rows) {
|
|
|
205
213
|
warmup: rows.length - ready,
|
|
206
214
|
silentOutputs: silent.map((output) => output.name),
|
|
207
215
|
...(silent.length > 0
|
|
208
|
-
? { labels: Object.fromEntries(silent.map((output) => [output.name,
|
|
216
|
+
? { labels: Object.fromEntries(silent.map((output) => [output.name, wrunOutputWords(output, builtIn)])) }
|
|
209
217
|
: {}),
|
|
210
218
|
};
|
|
211
219
|
}
|
|
@@ -271,3 +279,201 @@ export function wrunNothingReadyRefusal(health, ctx) {
|
|
|
271
279
|
return null;
|
|
272
280
|
return wrunRowRefusal({ cls: 'nothing-ready' }, noReadyRowsMessage(health), ctx);
|
|
273
281
|
}
|
|
282
|
+
// ---------------------------------------------------------------------------
|
|
283
|
+
// The viewer's nothing-drawn note (FB27)
|
|
284
|
+
// ---------------------------------------------------------------------------
|
|
285
|
+
/**
|
|
286
|
+
* A published Indicator that drew nothing over the whole loaded window (ready bars came, no plotted value was finite
|
|
287
|
+
* on any of them, the run made no drawing) used to tell its viewer nothing: the all-NaN rows above are a draft's, and
|
|
288
|
+
* a viewer saw a legend row over an empty chart (ZigZag on 1m forex, a band that reads volume on quote candles, a
|
|
289
|
+
* 50-week average on a 1h chart). The note says it once, quietly (the `nothing-ready` record's `drawn` variant, a
|
|
290
|
+
* note: no toast), and says the cause instead when the run knows it (`reach`: a scalar input pinned to a coarser
|
|
291
|
+
* interval, whatever its `bars`, or a candles stream with no `bars`, sees only the few candles the loaded history
|
|
292
|
+
* spans). Its own owned set beside the health rows:
|
|
293
|
+
* the live tick re-reads those (a viewer keeps only the nothing-ready row there), so this note is raised by a full
|
|
294
|
+
* run, a reseed, an adoption and a landed page, and lowered by any integrate that draws, a tick's included
|
|
295
|
+
* (wrun-overlay-run.util `presentWrunIntegration`).
|
|
296
|
+
*/
|
|
297
|
+
export const WRUN_NOTHING_DRAWN_CODE = 'WRUN_NOTHING_DRAWN';
|
|
298
|
+
export const WRUN_NOTHING_DRAWN_ROW_CODES = new Set([WRUN_NOTHING_DRAWN_CODE]);
|
|
299
|
+
/**
|
|
300
|
+
* The sections of the visibility table (wrun-visibility-table `WRUN_VISIBILITY_RULES`) whose picture the rows hold:
|
|
301
|
+
* an output's values, a fill's or a range's edges (outputs too) and the handle kinds (the live set riding the rows),
|
|
302
|
+
* plus the two that draw nothing of their own (the look, the pane layout). Every other section (a renderer, a box, a
|
|
303
|
+
* segment, a drawing, a canvas, a level, a panel, a batched mark, the stats strip, the strategy's markers) draws
|
|
304
|
+
* through a builder of its own, so a sheet declaring one is never judged empty: the note claims nothing it cannot see.
|
|
305
|
+
*/
|
|
306
|
+
const ROW_JUDGED_SECTIONS = new Set([
|
|
307
|
+
'outputs',
|
|
308
|
+
'ranges',
|
|
309
|
+
'fills',
|
|
310
|
+
'handles',
|
|
311
|
+
'presentation',
|
|
312
|
+
'panes',
|
|
313
|
+
]);
|
|
314
|
+
/** Sheet keys outside the visibility table that feed a builder of their own (wrun-4 frames). */
|
|
315
|
+
const BUILDER_SHEET_KEYS = ['frames'];
|
|
316
|
+
function declaresAny(value) {
|
|
317
|
+
if (Array.isArray(value))
|
|
318
|
+
return value.length > 0;
|
|
319
|
+
if (typeof value === 'object' && value !== null)
|
|
320
|
+
return Object.keys(value).length > 0;
|
|
321
|
+
return value !== undefined && value !== null && value !== false;
|
|
322
|
+
}
|
|
323
|
+
function recordsOf(value) {
|
|
324
|
+
return Array.isArray(value)
|
|
325
|
+
? value.filter((entry) => typeof entry === 'object' && entry !== null)
|
|
326
|
+
: [];
|
|
327
|
+
}
|
|
328
|
+
/** What of a sheet's picture its rows hold: the output columns whose values draw (`wrunOutputDraw`: a plot or the
|
|
329
|
+
* candle tint, never a data-only output or a transparent edge helper; and every edge of a fill or a range) and
|
|
330
|
+
* whether it draws handles. Null for a sheet with a section the rows cannot show (ROW_JUDGED_SECTIONS), a
|
|
331
|
+
* builder-fed key, or an inset output (a child the run result builds, with a picture of its own). */
|
|
332
|
+
function wrunRowJudgedPicture(metadata) {
|
|
333
|
+
const sheet = metadata;
|
|
334
|
+
for (const section of Object.keys(WRUN_VISIBILITY_RULES)) {
|
|
335
|
+
if (!ROW_JUDGED_SECTIONS.has(section) && declaresAny(sheet[section]))
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
for (const key of BUILDER_SHEET_KEYS)
|
|
339
|
+
if (declaresAny(sheet[key]))
|
|
340
|
+
return null;
|
|
341
|
+
const outputs = Array.isArray(metadata?.outputs) ? metadata.outputs : [];
|
|
342
|
+
const indexOf = new Map(outputs.map((output) => [output.name, output.index]));
|
|
343
|
+
const plotted = new Set();
|
|
344
|
+
for (const output of outputs) {
|
|
345
|
+
const draw = wrunOutputDraw(output);
|
|
346
|
+
if (draw === undefined)
|
|
347
|
+
continue;
|
|
348
|
+
if (draw.group !== 'nested')
|
|
349
|
+
return null;
|
|
350
|
+
plotted.add(output.index);
|
|
351
|
+
}
|
|
352
|
+
const edges = [
|
|
353
|
+
...recordsOf(sheet.fills).flatMap((fill) => (Array.isArray(fill.between) ? fill.between : [])),
|
|
354
|
+
...recordsOf(sheet.ranges).flatMap((range) => [range.upper, range.lower]),
|
|
355
|
+
];
|
|
356
|
+
for (const edge of edges) {
|
|
357
|
+
const index = typeof edge === 'string' ? indexOf.get(edge) : undefined;
|
|
358
|
+
if (index !== undefined)
|
|
359
|
+
plotted.add(index);
|
|
360
|
+
}
|
|
361
|
+
return { plotted, handles: declaresAny(sheet.handles) };
|
|
362
|
+
}
|
|
363
|
+
/** A ready row of `rows` holds a finite value in one of `plotted`'s columns. */
|
|
364
|
+
function rowsPlotAny(rows, plotted) {
|
|
365
|
+
for (const row of rows) {
|
|
366
|
+
if (row.outputs === null)
|
|
367
|
+
continue;
|
|
368
|
+
for (const index of plotted)
|
|
369
|
+
if (Number.isFinite(row.outputs[index]))
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Whether a run drew nothing a viewer could see over `rows`: at least one ready row, no plotted column
|
|
376
|
+
* (`wrunRowJudgedPicture`) finite on any of them, and no drawing record (`drawings`: the live handle set's size the
|
|
377
|
+
* rows carry, undefined when they carry none). Never true for a sheet the rows cannot show, for one declaring handles
|
|
378
|
+
* whose set the rows do not carry, for one that draws nothing at all (only data-only outputs), or for a run with no
|
|
379
|
+
* ready row (the nothing-ready row is that one's). A sparse output (one finite value, one label) drew.
|
|
380
|
+
*/
|
|
381
|
+
export function wrunRunDrewNothing(metadata, rows, drawings) {
|
|
382
|
+
const picture = wrunRowJudgedPicture(metadata);
|
|
383
|
+
if (picture === null)
|
|
384
|
+
return false;
|
|
385
|
+
if (picture.handles ? drawings !== 0 : (drawings ?? 0) > 0)
|
|
386
|
+
return false;
|
|
387
|
+
if (picture.plotted.size === 0 && !picture.handles)
|
|
388
|
+
return false;
|
|
389
|
+
if (!rows.some((row) => row.outputs !== null))
|
|
390
|
+
return false;
|
|
391
|
+
return !rowsPlotAny(rows, picture.plotted);
|
|
392
|
+
}
|
|
393
|
+
/** Whether `rows` show something drawn: a drawing record, or a finite value in a plotted column on a ready row. The
|
|
394
|
+
* half of the verdict that lowers a standing note (a live tick that starts drawing): rows of a sheet the verdict
|
|
395
|
+
* cannot read never lower it, since no note is raised for one. */
|
|
396
|
+
export function wrunRunDrewSomething(metadata, rows, drawings) {
|
|
397
|
+
if (drawings !== undefined && drawings > 0)
|
|
398
|
+
return true;
|
|
399
|
+
const picture = wrunRowJudgedPicture(metadata);
|
|
400
|
+
return picture !== null && rowsPlotAny(rows, picture.plotted);
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* The short reach behind an empty run, when the run has one: an input pinned to an interval coarser than the run's
|
|
404
|
+
* that reads a leg's history (not its forming candle), whose candles over the rows number fewer than the rule's floor.
|
|
405
|
+
* A scalar pin is short whatever its `bars`: each row reads one leg candle, the newest closed by it, so `bars` only
|
|
406
|
+
* deepens the fetch and a window fed from the pin holds the candles the rows span plus the two the host reads before
|
|
407
|
+
* the first (the kit's WRUN_DECL_INTERVAL_WINDOW_SHORT warns on the same shape). A leg stream is short only without
|
|
408
|
+
* `bars` (such a stream starts two leg spans before the chart's first row; declared, its first row carries the backlog
|
|
409
|
+
* that far back). The coarsest such input names the cause; undefined for none.
|
|
410
|
+
*/
|
|
411
|
+
export function wrunShortLegReach(metadata, rows, runIntervalMs, rule) {
|
|
412
|
+
if (!(typeof runIntervalMs === 'number' && runIntervalMs > 0) || rows.length === 0)
|
|
413
|
+
return undefined;
|
|
414
|
+
const spanMs = Math.max(0, rows[rows.length - 1].ts - rows[0].ts);
|
|
415
|
+
let short;
|
|
416
|
+
for (const source of Object.values(metadata?.inputSources ?? {})) {
|
|
417
|
+
if (typeof source !== 'object' || source === null)
|
|
418
|
+
continue;
|
|
419
|
+
const stream = isWrunLegStreamClass(source.source);
|
|
420
|
+
if (stream && typeof source.bars === 'number' && source.bars > 0)
|
|
421
|
+
continue;
|
|
422
|
+
if (source.view === 'forming' || source.view === 'forming_open')
|
|
423
|
+
continue;
|
|
424
|
+
const leg = rule.intervalOf(source.interval);
|
|
425
|
+
if (leg === undefined || leg.ms <= runIntervalMs)
|
|
426
|
+
continue;
|
|
427
|
+
const bars = Math.floor(spanMs / leg.ms) + 2;
|
|
428
|
+
if (bars >= rule.floor)
|
|
429
|
+
continue;
|
|
430
|
+
if (short === undefined || leg.ms > short.ms) {
|
|
431
|
+
short = { reach: { interval: leg.key, bars, ...(stream ? { stream: true } : {}) }, ms: leg.ms };
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return short?.reach;
|
|
435
|
+
}
|
|
436
|
+
/** The note a settled viewer run owes: null when it owes none (a draft, a run that drew, a run with no ready bar), else
|
|
437
|
+
* the cause when the run knows it. Undefined for a run that is not settled: the note stands as it is. */
|
|
438
|
+
export function wrunViewerNothingDrawn(run) {
|
|
439
|
+
if (run.draft)
|
|
440
|
+
return null;
|
|
441
|
+
if (!run.settled)
|
|
442
|
+
return undefined;
|
|
443
|
+
if (!wrunRunDrewNothing(run.metadata, run.rows, run.drawings))
|
|
444
|
+
return null;
|
|
445
|
+
const reach = run.legs ? wrunShortLegReach(run.metadata, run.rows, run.runIntervalMs, run.legs) : undefined;
|
|
446
|
+
return reach !== undefined ? { reach } : {};
|
|
447
|
+
}
|
|
448
|
+
/** The note row of a verdict (none for null): the `nothing-ready` record's `drawn` variant, or `reach` naming the
|
|
449
|
+
* leg's interval and the candles it reaches; the row's message keeps the technical words (Copy details). */
|
|
450
|
+
export function wrunNothingDrawnDiagnostics(verdict, ctx) {
|
|
451
|
+
if (verdict === null)
|
|
452
|
+
return [];
|
|
453
|
+
const { reach } = verdict;
|
|
454
|
+
// The technical words name the cause each kind has: a stream's missing `bars`, or a scalar pin's one candle a bar.
|
|
455
|
+
const cause = reach === undefined
|
|
456
|
+
? ''
|
|
457
|
+
: reach.stream
|
|
458
|
+
? ` Its ${reach.interval} input declares no bars, so it reaches ${reach.bars} ${reach.interval} candles here.`
|
|
459
|
+
: ` Its ${reach.interval} input is a scalar pin, which reads one ${reach.interval} candle a bar whatever its` +
|
|
460
|
+
` bars, so it reaches ${reach.bars} ${reach.interval} candles here.`;
|
|
461
|
+
const message = 'Nothing was drawn: no plotted value is finite on any ready bar of the loaded window and the run made no drawing.' +
|
|
462
|
+
cause;
|
|
463
|
+
const seed = reach !== undefined
|
|
464
|
+
? { cls: 'nothing-ready', variant: 'reach', params: { interval: reach.interval, bars: reach.bars } }
|
|
465
|
+
: { cls: 'nothing-ready', variant: 'drawn' };
|
|
466
|
+
return [
|
|
467
|
+
{
|
|
468
|
+
stage: 'compute',
|
|
469
|
+
severity: 'warning',
|
|
470
|
+
code: WRUN_NOTHING_DRAWN_CODE,
|
|
471
|
+
type: 'execution',
|
|
472
|
+
message,
|
|
473
|
+
details: {
|
|
474
|
+
refusal: wrunRowRefusal(seed, message, ctx),
|
|
475
|
+
...(reach !== undefined ? { interval: reach.interval, bars: reach.bars } : {}),
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
];
|
|
479
|
+
}
|
|
@@ -68,7 +68,7 @@ export declare function wrunRunIntervalSessionOf(context: object | undefined): W
|
|
|
68
68
|
export declare function wrunLiveRunIntervalMs(indicatorId: string): number | undefined;
|
|
69
69
|
/** Whether the chart's candle lane fetches `intervalMs` bars on a session filter, its `tradingHour`
|
|
70
70
|
* following the chart's session (candle-trading-hour.util): regular hours on a US listing unless it
|
|
71
|
-
*
|
|
71
|
+
* rides extended hours there (opted in, below a day), RTH on a CME chart in RTH at an intraday interval. */
|
|
72
72
|
export declare function wrunBarsSessionFiltered(market: {
|
|
73
73
|
exchange?: unknown;
|
|
74
74
|
symbol?: unknown;
|
|
@@ -99,7 +99,7 @@ export declare function wrunRunIntervalRowsThrough(run: RunBarCalendar, rows: Re
|
|
|
99
99
|
* like its lines on the forming bucket's chart bars; the forming bar stays in the buffer until it
|
|
100
100
|
* closes. Off: the forming bar too (the chart bars of its bucket show it).
|
|
101
101
|
*/
|
|
102
|
-
export declare function wrunRunIntervalComputeRows(run: Pick<OverlayRunInterval, 'intervalMs' | 'waitForClose' | 'sessionLattice'>, rows: ReadonlyArray<ArrayLike<number>>, lastChartTs: number): ArrayLike<number>[];
|
|
102
|
+
export declare function wrunRunIntervalComputeRows(run: Pick<OverlayRunInterval, 'intervalMs' | 'waitForClose' | 'sessionLattice' | 'sessionLatticeId'>, rows: ReadonlyArray<ArrayLike<number>>, lastChartTs: number): ArrayLike<number>[];
|
|
103
103
|
/** The input row a session last evaluated as its newest, copied (wrunRunIntervalSession.lastSentRow). */
|
|
104
104
|
export declare function wrunRunIntervalSentRow(row: {
|
|
105
105
|
ts: number;
|
|
@@ -47,9 +47,9 @@ export function wrunLiveRunIntervalMs(indicatorId) {
|
|
|
47
47
|
}
|
|
48
48
|
/** Whether the chart's candle lane fetches `intervalMs` bars on a session filter, its `tradingHour`
|
|
49
49
|
* following the chart's session (candle-trading-hour.util): regular hours on a US listing unless it
|
|
50
|
-
*
|
|
50
|
+
* rides extended hours there (opted in, below a day), RTH on a CME chart in RTH at an intraday interval. */
|
|
51
51
|
export function wrunBarsSessionFiltered(market, intervalMs) {
|
|
52
|
-
return (isEquityRegularSessionGated(market?.exchange, market?.sessionType) ||
|
|
52
|
+
return (isEquityRegularSessionGated(market?.exchange, market?.sessionType, intervalMs) ||
|
|
53
53
|
isChartRthActive(market?.exchange, market?.symbol, market?.sessionType, intervalMs));
|
|
54
54
|
}
|
|
55
55
|
/** The identity of the run bars a session holds: the run interval, the chart market they were
|
|
@@ -95,20 +95,21 @@ export declare function resolveWrunRunInterval(input: WrunRunIntervalInput): Wru
|
|
|
95
95
|
export declare function isWrunRunIntervalUnsupportedMarket(exchange: string | undefined, transformations: string | null | undefined): boolean;
|
|
96
96
|
/**
|
|
97
97
|
* Whether a chart's market rides a session calendar its twins' own resampler cannot fold from the
|
|
98
|
-
* chart's bars (see WrunRunIntervalInput.sessionMarket): a venue on
|
|
99
|
-
* (
|
|
100
|
-
* ride a session filter (wrunBarsSessionFiltered at the chart's interval:
|
|
101
|
-
* a run bar above 30m is anchored on the session open and a 1D run bar
|
|
98
|
+
* chart's bars (see WrunRunIntervalInput.sessionMarket): a venue on a session lattice
|
|
99
|
+
* (sessionLatticeOf: CME's 4h bars on the 17:00 Chicago lattice, forex's on the 17:00 New York one),
|
|
100
|
+
* or a chart whose own bars ride a session filter (wrunBarsSessionFiltered at the chart's interval:
|
|
101
|
+
* RTH on a CME chart, where a run bar above 30m is anchored on the session open and a 1D run bar
|
|
102
|
+
* holds the whole session).
|
|
102
103
|
*/
|
|
103
104
|
export declare function isWrunRunIntervalSessionMarket(exchange: string | undefined, chart: WrunChartSessionFields | null | undefined, chartInterval: unknown): boolean;
|
|
104
105
|
/**
|
|
105
106
|
* The run interval of one mounted wrun overlay: its settings against the chart's interval, venue,
|
|
106
107
|
* series (`chartTransformations`, a formula chart's legs), session (`chartMarket`: the symbol and the
|
|
107
108
|
* session type a replaying chart's session market reads) and replay state. `chartExchange` is the
|
|
108
|
-
* chart's venue; omitted, the overlay's own `settings.exchange` stands in. A venue that rides
|
|
109
|
-
* session lattice (CME
|
|
110
|
-
*
|
|
111
|
-
* with replay off is liveOverlayWrunRunInterval.
|
|
109
|
+
* chart's venue; omitted, the overlay's own `settings.exchange` stands in. A venue that rides a
|
|
110
|
+
* session lattice (sessionLatticeOf: the CME family, forex; the rule the chart's own live bars and
|
|
111
|
+
* the run bars' live fold key on) stamps the run `sessionLattice` and the lattice's id. The same
|
|
112
|
+
* question with replay off is liveOverlayWrunRunInterval.
|
|
112
113
|
*/
|
|
113
114
|
export declare function overlayWrunRunInterval(chartIndex: number, overlay: {
|
|
114
115
|
settings?: unknown;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
*/
|
|
38
38
|
import { wrunChartHostEnv } from '../../host-env.js';
|
|
39
39
|
import { runIntervalOfTimeframeLabel, timeframeIsChartOrFiner, } from '../chart/indicator-run-interval.util.js';
|
|
40
|
-
import {
|
|
40
|
+
import { sessionLatticeOf } from '../chart/session-lattice.util.js';
|
|
41
41
|
import { checkIsIndexMode } from '../chart/index-mode.util.js';
|
|
42
42
|
import { chartIntervalToMs } from '../chart/rth-session.util.js';
|
|
43
43
|
import { isRunIntervalUnservableMarket } from '../chart/run-interval-unservable.leaf.js';
|
|
@@ -192,23 +192,24 @@ export function isWrunRunIntervalUnsupportedMarket(exchange, transformations) {
|
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Whether a chart's market rides a session calendar its twins' own resampler cannot fold from the
|
|
195
|
-
* chart's bars (see WrunRunIntervalInput.sessionMarket): a venue on
|
|
196
|
-
* (
|
|
197
|
-
* ride a session filter (wrunBarsSessionFiltered at the chart's interval:
|
|
198
|
-
* a run bar above 30m is anchored on the session open and a 1D run bar
|
|
195
|
+
* chart's bars (see WrunRunIntervalInput.sessionMarket): a venue on a session lattice
|
|
196
|
+
* (sessionLatticeOf: CME's 4h bars on the 17:00 Chicago lattice, forex's on the 17:00 New York one),
|
|
197
|
+
* or a chart whose own bars ride a session filter (wrunBarsSessionFiltered at the chart's interval:
|
|
198
|
+
* RTH on a CME chart, where a run bar above 30m is anchored on the session open and a 1D run bar
|
|
199
|
+
* holds the whole session).
|
|
199
200
|
*/
|
|
200
201
|
export function isWrunRunIntervalSessionMarket(exchange, chart, chartInterval) {
|
|
201
|
-
return (
|
|
202
|
+
return (sessionLatticeOf(exchange) !== null ||
|
|
202
203
|
wrunBarsSessionFiltered({ ...chart, exchange }, chartIntervalToMs(chartInterval)));
|
|
203
204
|
}
|
|
204
205
|
/**
|
|
205
206
|
* The run interval of one mounted wrun overlay: its settings against the chart's interval, venue,
|
|
206
207
|
* series (`chartTransformations`, a formula chart's legs), session (`chartMarket`: the symbol and the
|
|
207
208
|
* session type a replaying chart's session market reads) and replay state. `chartExchange` is the
|
|
208
|
-
* chart's venue; omitted, the overlay's own `settings.exchange` stands in. A venue that rides
|
|
209
|
-
* session lattice (CME
|
|
210
|
-
*
|
|
211
|
-
* with replay off is liveOverlayWrunRunInterval.
|
|
209
|
+
* chart's venue; omitted, the overlay's own `settings.exchange` stands in. A venue that rides a
|
|
210
|
+
* session lattice (sessionLatticeOf: the CME family, forex; the rule the chart's own live bars and
|
|
211
|
+
* the run bars' live fold key on) stamps the run `sessionLattice` and the lattice's id. The same
|
|
212
|
+
* question with replay off is liveOverlayWrunRunInterval.
|
|
212
213
|
*/
|
|
213
214
|
export function overlayWrunRunInterval(chartIndex, overlay, chartInterval, chartExchange, chartTransformations, chartMarket) {
|
|
214
215
|
// The replay flags are web's (replay/replayFlags.ts `isChartReplaying`, the same Set read at call time).
|
|
@@ -238,7 +239,8 @@ function overlayRunIntervalUnder(replay, overlay, chartInterval, chartExchange,
|
|
|
238
239
|
unsupportedMarket: isWrunRunIntervalUnsupportedMarket(venue, chartTransformations),
|
|
239
240
|
sessionMarket: isWrunRunIntervalSessionMarket(venue, chartMarket, chartInterval),
|
|
240
241
|
});
|
|
241
|
-
|
|
242
|
+
const lattice = run ? sessionLatticeOf(venue) : null;
|
|
243
|
+
return run && lattice !== null ? { ...run, sessionLattice: true, sessionLatticeId: lattice.id } : run;
|
|
242
244
|
}
|
|
243
245
|
/**
|
|
244
246
|
* The settings a run at another interval sends the package: the twin's `timeframe` forced to its
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
import { ensureWrunChartHostSharedHost, wrunChartHostEnv } from '../../host-env.js';
|
|
35
35
|
import { KSCRIPT_STALLED_CODE } from '../../constants/scriptEditor/execution.constants.js';
|
|
36
|
+
import { isWrunBandedBookSource } from './wrun-book-bands.leaf.js';
|
|
36
37
|
import { wrunHandlesOf } from './wrun-handles.util.js';
|
|
37
38
|
import { getWrunBrowserHost } from './wrun-host.service.js';
|
|
38
39
|
import { claimWrunRunLoading, releaseWrunLoading } from './wrun-loading-owner.util.js';
|
|
@@ -122,7 +123,8 @@ export function wrunRowBatchCellRows(batch) {
|
|
|
122
123
|
return wrunBatchCellRows.get(batch);
|
|
123
124
|
}
|
|
124
125
|
/** The wire's `grids` of a sandbox run: one entry per book, volume_profile or intrabar input a canvas names in
|
|
125
|
-
* `cells`, its rows `[ts, ...block]` off the input rows the module read (the kit shaper's own spelling).
|
|
126
|
+
* `cells`, its rows `[ts, ...block]` off the input rows the module read (the kit shaper's own spelling). A banded book
|
|
127
|
+
* input (`isWrunBandedBookSource`) is none: its block is band sums, never the class's tuples. */
|
|
126
128
|
function wrunSandboxCellGrids(sheet, inputs) {
|
|
127
129
|
const names = [];
|
|
128
130
|
for (const canvas of [...(sheet.heatmaps ?? []), ...(sheet.profiles ?? [])]) {
|
|
@@ -133,7 +135,8 @@ function wrunSandboxCellGrids(sheet, inputs) {
|
|
|
133
135
|
const grids = [];
|
|
134
136
|
for (const name of names) {
|
|
135
137
|
const input = sheet.inputs.find((entry) => entry.name === name);
|
|
136
|
-
const
|
|
138
|
+
const declared = Object.hasOwn(sheet.inputSources, name) ? sheet.inputSources[name] : undefined;
|
|
139
|
+
const source = isWrunBandedBookSource(declared) ? undefined : declared?.source;
|
|
137
140
|
if (input === undefined || source === undefined || !WRUN_GRID_CELL_CLASSES.has(source))
|
|
138
141
|
continue;
|
|
139
142
|
const width = widths[source];
|
|
@@ -83,7 +83,16 @@
|
|
|
83
83
|
* and wrun-style-patch.util; a `colors` row and a prefixed target's rows
|
|
84
84
|
* repaint through a rerun). A cloud record mounts the same rows (the registry
|
|
85
85
|
* loader builds both lanes' records here, over the full sheet): the one pass
|
|
86
|
-
* paints either row source's batch through the chart's own builders.
|
|
86
|
+
* paints either row source's batch through the chart's own builders. The
|
|
87
|
+
* page's words for a batched section or a renderer come first from the
|
|
88
|
+
* sheet's `style_names` table (wrun-style-names.util, the one reader): its
|
|
89
|
+
* label titles the line (styleTargetTitle) and its colour names name each
|
|
90
|
+
* swatch of the line's colours row (`swatchNames`). Its entry for an output
|
|
91
|
+
* or a heatmap names colours alone (the title stays their own `label`): a
|
|
92
|
+
* heatmap's palette stops, an output's two-tone pair, and a `color_by` ladder
|
|
93
|
+
* whose every rung it names, which gains a colours row even where an unnamed
|
|
94
|
+
* ladder has none (three or more rungs, a line's, an inset strip's:
|
|
95
|
+
* outputColorList). A sheet without the table reads as before.
|
|
87
96
|
*
|
|
88
97
|
* The layout (buildWrunScriptLayout) groups the flat rows into pages and
|
|
89
98
|
* sections: from the sheet's `layout` when it declares one (params before
|
|
@@ -210,6 +219,11 @@ export interface WrunScriptInputDeclaration {
|
|
|
210
219
|
};
|
|
211
220
|
/** A `colors` style row: what each swatch paints, in value order. */
|
|
212
221
|
swatches?: WrunStyleSwatch[];
|
|
222
|
+
/** A `colors` style row the sheet's `style_names` table names (wrun-style-names.util): one plain name per swatch, in
|
|
223
|
+
* value order, as long as `swatches`. Slots that share a name are one swatch on the page whose pick writes every
|
|
224
|
+
* one of them (wrun-dialog-rows wrunSwatchViews); a named swatch's hover title is its name. Absent while the table
|
|
225
|
+
* names none of the row's slots, so an unnamed row is exactly what it always was. */
|
|
226
|
+
swatchNames?: string[];
|
|
213
227
|
/** A text row (wrun-5): the UTF-8 byte cap the field enforces and whether
|
|
214
228
|
* it takes several lines (a text area; newlines survive). Carried on the
|
|
215
229
|
* row so the dialog and the hosted lanes know them without the sheet. */
|
|
@@ -260,7 +274,7 @@ export interface WrunScriptLayout {
|
|
|
260
274
|
* visibility table lists (the Style rows' targets, wrun-visibility-table.ts
|
|
261
275
|
* WrunVisibilitySheet: no list of its own here), input sources (host
|
|
262
276
|
* bindings), layout and presets when present. */
|
|
263
|
-
export type WrunScriptInputsSheet = Pick<WrunIndicatorMetadata, 'params'> & WrunVisibilitySheet & Partial<Pick<WrunIndicatorMetadata, 'inputSources' | 'layout' | 'presets'>>;
|
|
277
|
+
export type WrunScriptInputsSheet = Pick<WrunIndicatorMetadata, 'params'> & WrunVisibilitySheet & Partial<Pick<WrunIndicatorMetadata, 'inputSources' | 'layout' | 'presets' | 'style_names'>>;
|
|
264
278
|
/**
|
|
265
279
|
* The words a settings row prints: its label verbatim (an author's words are
|
|
266
280
|
* never re-cased: "ATRs" stays "ATRs"), else the name read as words. A label
|
|
@@ -322,21 +336,34 @@ export declare function isWrunLocalizedStyleTarget(target: string): boolean;
|
|
|
322
336
|
export declare function buildWrunScriptInputs(metadata: WrunScriptInputsSheet, options?: WrunRowBuildOptions): WrunScriptInputDeclaration[];
|
|
323
337
|
/** The rows as the dialog shows them on a market of size unit `sizeUnit` (wrunChartSizeUnit): a
|
|
324
338
|
* row whose `visibleBy` leaves the unit out is hidden like a composite member, never placed, its
|
|
325
|
-
* value kept (the run still reads it and the dialog's Reset still resets it).
|
|
326
|
-
*
|
|
327
|
-
|
|
339
|
+
* value kept (the run still reads it and the dialog's Reset still resets it). A setting key beside
|
|
340
|
+
* the unit (contract C-COINS item 1) hides its row while the select it names reads none of its
|
|
341
|
+
* values in `settings`, the dialog's current values (wrunRowSettingReader), so the rows follow the
|
|
342
|
+
* select as the user flips it. The rows themselves when none hides. */
|
|
343
|
+
export declare function wrunRowsOnMarket(rows: ReadonlyArray<WrunScriptInputDeclaration>, sizeUnit: number, settings?: unknown): WrunScriptInputDeclaration[];
|
|
344
|
+
/**
|
|
345
|
+
* The value a setting key reads in the dialog (contract C-COINS item 1), the rows' side of the run's
|
|
346
|
+
* `wrunSheetSettingReader`: the select row it names reads its current value in `settings` (its default without
|
|
347
|
+
* one), or its default where the select's own row is hidden on the market (its size-unit list alone: a keyed
|
|
348
|
+
* select is never keyed by another setting), so a stock chart that saved Coins shows the Dollars rows. Undefined
|
|
349
|
+
* for a name no row holds or a value that is no number (the key then never hides).
|
|
350
|
+
*/
|
|
351
|
+
export declare function wrunRowSettingReader(rows: ReadonlyArray<WrunScriptInputDeclaration>, settings: unknown, sizeUnit: number): (name: string) => number | undefined;
|
|
328
352
|
/**
|
|
329
353
|
* The rows an overlay persisted, drawn with the sheet's words: every row the
|
|
330
354
|
* sheet builds now (a param, a composite, a colour array, a member) takes
|
|
331
355
|
* its label and hint from that build, matched by name (a unit composite and
|
|
332
356
|
* its value member, which share a name, each from its own kind). An older
|
|
333
357
|
* build stamped a param's description as its label and no hint; the saved
|
|
334
|
-
* indicator reads the same as a fresh add without a rerun.
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
358
|
+
* indicator reads the same as a fresh add without a rerun. A style row keeps
|
|
359
|
+
* its label (its property key) and takes the swatch names the sheet's
|
|
360
|
+
* `style_names` table gives its colours now (`swatchNames`, or none), so a
|
|
361
|
+
* row persisted before the table names its swatches as a fresh add does.
|
|
362
|
+
* Values, types and every other key stay as persisted; a row the sheet no
|
|
363
|
+
* longer builds keeps its own; a row whose words already match is returned
|
|
364
|
+
* as is. `options` builds the words as the mount did (a port's hint rule,
|
|
365
|
+
* WrunRowBuildOptions), so a row persisted before the rule reads without its
|
|
366
|
+
* encoding legend.
|
|
340
367
|
*/
|
|
341
368
|
export declare function wrunRowsWithSheetWords(rows: ReadonlyArray<WrunScriptInputDeclaration>, sheet: WrunScriptInputsSheet | undefined, options?: WrunRowBuildOptions): WrunScriptInputDeclaration[];
|
|
342
369
|
/**
|