@orangecharts/wrun-chart-host 0.2.0 → 0.3.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 +14 -6
- package/dist/constants/common.constants.d.ts +15 -0
- package/dist/constants/common.constants.js +23 -0
- package/dist/constants/data-source.constants.d.ts +1 -0
- package/dist/constants/data-source.constants.js +1 -0
- package/dist/constants/economic.constants.d.ts +39 -0
- package/dist/constants/economic.constants.js +77 -0
- package/dist/constants/etf-covered-coins.constants.d.ts +1 -0
- package/dist/constants/etf-covered-coins.constants.js +9 -0
- package/dist/constants/feature-flags.constants.d.ts +60 -0
- package/dist/constants/feature-flags.constants.js +308 -0
- package/dist/constants/feature-limits.constants.d.ts +134 -0
- package/dist/constants/feature-limits.constants.js +155 -0
- package/dist/constants/marketCapabilities.constants.d.ts +87 -0
- package/dist/constants/marketCapabilities.constants.js +213 -0
- package/dist/constants/option-venues.constants.d.ts +100 -0
- package/dist/constants/option-venues.constants.js +167 -0
- package/dist/constants/overlay-data.constants.d.ts +53 -0
- package/dist/constants/overlay-data.constants.js +80 -0
- package/dist/constants/pane-grid.constants.d.ts +15 -0
- package/dist/constants/pane-grid.constants.js +17 -0
- package/dist/constants/venue-presets.constants.d.ts +10 -0
- package/dist/constants/venue-presets.constants.js +22 -0
- package/dist/enums/chart.enum.d.ts +68 -0
- package/dist/enums/chart.enum.js +70 -0
- package/dist/helpers/data.helpers.d.ts +2 -0
- package/dist/helpers/data.helpers.js +14 -0
- package/dist/host-env.d.ts +161 -5
- package/dist/host-ports.types.d.ts +446 -0
- package/dist/host-ports.types.js +1 -0
- package/dist/index.d.ts +128 -0
- package/dist/index.js +128 -0
- package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
- package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
- package/dist/interfaces/asset-venue.interface.d.ts +91 -0
- package/dist/interfaces/asset-venue.interface.js +1 -0
- package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
- package/dist/interfaces/cancel-reason.interface.js +2 -0
- package/dist/interfaces/catalog-display.interface.d.ts +3 -0
- package/dist/interfaces/catalog-display.interface.js +1 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
- package/dist/interfaces/cme-realtime.interface.js +46 -0
- package/dist/interfaces/feed.interface.d.ts +80 -0
- package/dist/interfaces/feed.interface.js +7 -0
- package/dist/interfaces/market-kind.interface.d.ts +8 -0
- package/dist/interfaces/market-kind.interface.js +1 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
- package/dist/interfaces/opra-realtime.interface.js +105 -0
- package/dist/interfaces/option-instrument.interface.d.ts +32 -0
- package/dist/interfaces/option-instrument.interface.js +1 -0
- package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
- package/dist/interfaces/options-chain-scope.interface.js +7 -0
- package/dist/interfaces/prediction-market.interface.d.ts +88 -0
- package/dist/interfaces/prediction-market.interface.js +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
- package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
- package/dist/settings-templates/frvp-fields.d.ts +27 -0
- package/dist/settings-templates/frvp-fields.js +108 -0
- package/dist/settings-templates/index.d.ts +119 -0
- package/dist/settings-templates/index.js +442 -0
- package/dist/settings-templates/indicator-fields.d.ts +56 -0
- package/dist/settings-templates/indicator-fields.js +793 -0
- package/dist/settings-templates/tool-rules.d.ts +59 -0
- package/dist/settings-templates/tool-rules.js +49 -0
- package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
- package/dist/settings-templates/tool-tables.generated.js +1668 -0
- package/dist/utility/blk-market.util.d.ts +5 -0
- package/dist/utility/blk-market.util.js +12 -0
- package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
- package/dist/utility/chart/chart-load-phase.util.js +78 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
- package/dist/utility/chart/cme-cache-context.util.js +166 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
- package/dist/utility/chart/cme-session-bucket.util.js +343 -0
- package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
- package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
- package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
- package/dist/utility/chart/continuous-contracts.util.js +374 -0
- package/dist/utility/chart/feed-interval.util.d.ts +119 -0
- package/dist/utility/chart/feed-interval.util.js +321 -0
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
- package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
- package/dist/utility/chart/footprint-band.util.d.ts +76 -0
- package/dist/utility/chart/footprint-band.util.js +205 -0
- package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
- package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
- package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
- package/dist/utility/chart/formula-calendar.util.js +59 -0
- package/dist/utility/chart/history-wall.util.d.ts +67 -0
- package/dist/utility/chart/history-wall.util.js +87 -0
- package/dist/utility/chart/index-mode.util.d.ts +66 -0
- package/dist/utility/chart/index-mode.util.js +360 -0
- package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
- package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
- package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
- package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
- package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
- package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
- package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
- package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
- package/dist/utility/chart/interval-registry.util.d.ts +23 -0
- package/dist/utility/chart/interval-registry.util.js +83 -0
- package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
- package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
- package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
- package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
- package/dist/utility/chart/live-bucket.util.d.ts +66 -0
- package/dist/utility/chart/live-bucket.util.js +165 -0
- package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
- package/dist/utility/chart/market-session-schedule.util.js +337 -0
- package/dist/utility/chart/marketKind.util.d.ts +181 -0
- package/dist/utility/chart/marketKind.util.js +371 -0
- package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
- package/dist/utility/chart/opra-read-access.leaf.js +25 -0
- package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
- package/dist/utility/chart/prediction-identity.util.js +236 -0
- package/dist/utility/chart/rth-session.util.d.ts +352 -0
- package/dist/utility/chart/rth-session.util.js +926 -0
- package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
- package/dist/utility/chart/titan-constants.pin.js +50 -0
- package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
- package/dist/utility/chart/us-equities-session.util.js +251 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
- package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
- package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
- package/dist/utility/common/safe-math-eval.d.ts +18 -0
- package/dist/utility/common/safe-math-eval.js +160 -0
- package/dist/utility/common/time.util.d.ts +134 -0
- package/dist/utility/common/time.util.js +428 -0
- package/dist/utility/common/transformations.util.d.ts +126 -0
- package/dist/utility/common/transformations.util.js +711 -0
- package/dist/utility/common/visible-timeout.util.d.ts +17 -0
- package/dist/utility/common/visible-timeout.util.js +75 -0
- package/dist/utility/exchange-normalization.util.d.ts +8 -0
- package/dist/utility/exchange-normalization.util.js +32 -0
- package/dist/utility/intl-locale.util.d.ts +2 -0
- package/dist/utility/intl-locale.util.js +28 -0
- package/dist/utility/number-format.util.d.ts +14 -1
- package/dist/utility/number-format.util.js +50 -19
- package/dist/utility/options/option-symbol.util.d.ts +28 -0
- package/dist/utility/options/option-symbol.util.js +176 -0
- package/dist/utility/options/option-trade-units.util.d.ts +190 -0
- package/dist/utility/options/option-trade-units.util.js +283 -0
- package/dist/utility/options/option-venue.util.d.ts +75 -0
- package/dist/utility/options/option-venue.util.js +85 -0
- package/dist/utility/pool-symbol.leaf.d.ts +34 -0
- package/dist/utility/pool-symbol.leaf.js +95 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
- package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
- package/dist/utility/v2/gate-plane.util.d.ts +58 -0
- package/dist/utility/v2/gate-plane.util.js +99 -0
- package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
- package/dist/utility/v2/gate-session-latch.util.js +34 -0
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
- package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
- package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
- package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
- package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
- package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
- package/dist/utility/wrun/sources/lanes/economic.js +79 -0
- package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
- package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
- package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
- package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
- package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
- package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
- package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
- package/dist/utility/wrun/sources/lanes/index.js +32 -0
- package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
- package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +30 -0
- package/dist/utility/wrun/sources/lanes/option_daily.js +53 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +23 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +20 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
- package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
- package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
- package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
- package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
- package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
- package/dist/utility/wrun/sources/lanes/series.js +321 -0
- package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
- package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
- package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
- package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
- package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
- package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +196 -0
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +446 -0
- package/dist/utility/wrun/sources/registry.d.ts +21 -0
- package/dist/utility/wrun/sources/registry.js +207 -0
- package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
- package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
- package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +6 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +70 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +13 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +137 -0
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +38 -0
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +150 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +275 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +224 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +394 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +283 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +205 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +469 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
- package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
- package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
- package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
- package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
- package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-deadline.util.js +82 -0
- package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
- package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
- package/dist/utility/wrun/wrun-frames.d.ts +20 -1
- package/dist/utility/wrun/wrun-frames.js +103 -49
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +27 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
- package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
- package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
- package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
- package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
- package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
- package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
- package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
- package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
- package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +30 -0
- package/dist/utility/wrun/wrun-opra-stats.leaf.js +96 -0
- package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
- package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
- package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
- package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
- package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
- package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
- package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
- package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
- package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
- package/dist/utility/wrun/wrun-param-map.util.js +581 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
- package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
- package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
- package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
- package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
- package/dist/utility/wrun/wrun-refusal.util.d.ts +41 -1
- package/dist/utility/wrun/wrun-refusal.util.js +69 -2
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
- package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
- package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
- package/dist/utility/wrun/wrun-row-source.js +75 -0
- package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
- package/dist/utility/wrun/wrun-run-health.util.js +273 -0
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
- package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
- package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
- package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
- package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
- package/dist/utility/wrun-display-name.util.d.ts +33 -0
- package/dist/utility/wrun-display-name.util.js +64 -0
- package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
- package/dist/workers/constants/kscript-transport-codes.js +15 -0
- package/dist/workers/constants/socket-slots.d.ts +574 -0
- package/dist/workers/constants/socket-slots.js +539 -0
- package/dist/workers/utils/number.worker.util.d.ts +5 -0
- package/dist/workers/utils/number.worker.util.js +10 -0
- package/dist/workers/utils/time.worker.util.d.ts +12 -0
- package/dist/workers/utils/time.worker.util.js +24 -0
- package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
- package/dist/workers/utils/volume-profile.worker.util.js +631 -0
- package/package.json +10 -4
|
@@ -87,13 +87,25 @@ export interface WrunLevelsFrame {
|
|
|
87
87
|
scale_max?: number;
|
|
88
88
|
}
|
|
89
89
|
/** One time span of a span "time" frame (DL-time-anchored): its bounds in
|
|
90
|
-
* epoch seconds and its own rows; colours are colour words.
|
|
90
|
+
* epoch seconds and its own rows; colours are colour words. The per-span
|
|
91
|
+
* fields (kit 0.86.0, WRUN-OI-PROFILE D6) are the pane frame's, read per
|
|
92
|
+
* span: a text per row, the stacked series cells, the span's own value
|
|
93
|
+
* area and its own POC price and tag. */
|
|
91
94
|
export interface WrunLevelsSpan {
|
|
92
95
|
start: number;
|
|
93
96
|
end: number;
|
|
94
97
|
prices: number[];
|
|
95
98
|
values: (number | null)[];
|
|
96
99
|
colors?: string[];
|
|
100
|
+
/** DL-row-text: a string is the row's text, "" no label, null the formatted value. */
|
|
101
|
+
labels_text?: (string | null)[];
|
|
102
|
+
/** DL-stacked: one array per declared series, each the length of the span's prices; never beside `colors`. */
|
|
103
|
+
series?: (number | null)[][];
|
|
104
|
+
/** DL-value-area: the span's own [low, high]. */
|
|
105
|
+
value_area?: [number, number];
|
|
106
|
+
/** DL-poc: the span's own marked price and tag text. */
|
|
107
|
+
poc_price?: number;
|
|
108
|
+
poc_label_text?: string;
|
|
97
109
|
}
|
|
98
110
|
/** The span "time" frame: 1..64 spans holding at most 4096 rows in all. */
|
|
99
111
|
export interface WrunLevelsSpansFrame {
|
|
@@ -177,6 +189,13 @@ export interface WrunMatrixFrame {
|
|
|
177
189
|
};
|
|
178
190
|
}
|
|
179
191
|
export declare function invalidWrunFrame(slot: string, reason: string): never;
|
|
192
|
+
/** The pane frame's keys (the kit's `WrunLevelsPaneFrameSchema`, pinned by the kit mirror spec). */
|
|
193
|
+
export declare const WRUN_LEVELS_PANE_KEYS: readonly ["prices", "values", "colors", "labels_text", "series", "lows", "highs", "tooltips", "value_area", "poc_price", "poc_label_text", "scale_max"];
|
|
194
|
+
/** A span's keys: its bounds and rows, then the pane frame's per-row and
|
|
195
|
+
* per-profile fields a span carries for itself (kit 0.86.0). The pane-only
|
|
196
|
+
* fields stay off a span: `lows` / `highs` (cells 4 and 5 hold the span's
|
|
197
|
+
* bounds), `tooltips` and `scale_max`. Exported for the kit mirror spec. */
|
|
198
|
+
export declare const WRUN_LEVELS_SPAN_KEYS: readonly ["start", "end", "prices", "values", "colors", "labels_text", "series", "value_area", "poc_price", "poc_label_text"];
|
|
180
199
|
/** Parses a levels frame: the pane shape (`prices`, `values`, ...) or the
|
|
181
200
|
* spans shape (`spans`), told apart by the `spans` key; shape rules only
|
|
182
201
|
* (the kit's `WrunLevelsFrameSchema`). With a declaration, the shape must
|
|
@@ -147,7 +147,8 @@ function frameObject(raw, slot, keys) {
|
|
|
147
147
|
// ---------------------------------------------------------------------------
|
|
148
148
|
// Levels frames (g2, g6 DL-time-anchored)
|
|
149
149
|
// ---------------------------------------------------------------------------
|
|
150
|
-
|
|
150
|
+
/** The pane frame's keys (the kit's `WrunLevelsPaneFrameSchema`, pinned by the kit mirror spec). */
|
|
151
|
+
export const WRUN_LEVELS_PANE_KEYS = [
|
|
151
152
|
'prices',
|
|
152
153
|
'values',
|
|
153
154
|
'colors',
|
|
@@ -162,7 +163,22 @@ const LEVELS_PANE_KEYS = [
|
|
|
162
163
|
'scale_max',
|
|
163
164
|
];
|
|
164
165
|
const LEVELS_SPANS_KEYS = ['spans'];
|
|
165
|
-
|
|
166
|
+
/** A span's keys: its bounds and rows, then the pane frame's per-row and
|
|
167
|
+
* per-profile fields a span carries for itself (kit 0.86.0). The pane-only
|
|
168
|
+
* fields stay off a span: `lows` / `highs` (cells 4 and 5 hold the span's
|
|
169
|
+
* bounds), `tooltips` and `scale_max`. Exported for the kit mirror spec. */
|
|
170
|
+
export const WRUN_LEVELS_SPAN_KEYS = [
|
|
171
|
+
'start',
|
|
172
|
+
'end',
|
|
173
|
+
'prices',
|
|
174
|
+
'values',
|
|
175
|
+
'colors',
|
|
176
|
+
'labels_text',
|
|
177
|
+
'series',
|
|
178
|
+
'value_area',
|
|
179
|
+
'poc_price',
|
|
180
|
+
'poc_label_text',
|
|
181
|
+
];
|
|
166
182
|
/** `prices`: 1..512 finite numbers. */
|
|
167
183
|
function levelPrices(value, at, path) {
|
|
168
184
|
const message = `prices must list 1 to ${WRUN_MAX_LEVEL_ROWS} prices`;
|
|
@@ -183,18 +199,64 @@ function levelBand(value, key, at) {
|
|
|
183
199
|
return at([key], `${key} must list a price or null per price`);
|
|
184
200
|
return value.map((entry, i) => finiteOrNull(entry) ? entry : at([key, i], `${key} must list finite numbers or null`));
|
|
185
201
|
}
|
|
202
|
+
// The fields a pane frame and a span share parse through one reader each,
|
|
203
|
+
// at the pane frame's root (`base` empty) or at the span's path, so a span
|
|
204
|
+
// refuses exactly as the pane frame does (`spans.1.labels_text.0: ...`).
|
|
186
205
|
/** A per-row list of bounded texts or nulls (`labels_text`, `tooltips`). */
|
|
187
|
-
function levelTexts(value, key, max, at) {
|
|
206
|
+
function levelTexts(value, key, max, at, base = []) {
|
|
188
207
|
if (!Array.isArray(value))
|
|
189
|
-
return at([key], `${key} must list a text or null per price`);
|
|
190
|
-
return value.map((entry, i) => entry === null || text(entry, max, 0)
|
|
208
|
+
return at([...base, key], `${key} must list a text or null per price`);
|
|
209
|
+
return value.map((entry, i) => entry === null || text(entry, max, 0)
|
|
210
|
+
? entry
|
|
211
|
+
: at([...base, key, i], `a ${key} entry takes at most ${max} characters`));
|
|
212
|
+
}
|
|
213
|
+
/** `series` (DL-stacked): 1..8 arrays of finite numbers or nulls. */
|
|
214
|
+
function levelSeries(value, at, base = []) {
|
|
215
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > WRUN_MAX_LEVEL_SERIES) {
|
|
216
|
+
at([...base, 'series'], `series must list 1 to ${WRUN_MAX_LEVEL_SERIES} arrays`);
|
|
217
|
+
}
|
|
218
|
+
return value.map((entry, k) => {
|
|
219
|
+
if (!Array.isArray(entry))
|
|
220
|
+
return at([...base, 'series', k], 'series must list arrays of finite numbers or null');
|
|
221
|
+
return entry.map((cell, i) => finiteOrNull(cell) ? cell : at([...base, 'series', k, i], 'series must list finite numbers or null'));
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/** `value_area` (DL-value-area): `[low, high]`, two finite prices. */
|
|
225
|
+
function levelValueArea(value, at, base = []) {
|
|
226
|
+
if (!Array.isArray(value) || value.length !== 2 || !value.every(finite)) {
|
|
227
|
+
at([...base, 'value_area'], 'value_area must be [low, high], two prices');
|
|
228
|
+
}
|
|
229
|
+
return [value[0], value[1]];
|
|
230
|
+
}
|
|
231
|
+
/** `poc_price` (DL-poc): a finite number. */
|
|
232
|
+
function levelPocPrice(value, at, base = []) {
|
|
233
|
+
return finite(value) ? value : at([...base, 'poc_price'], 'poc_price must be a finite number');
|
|
234
|
+
}
|
|
235
|
+
/** `poc_label_text` (DL-poc): 1..24 characters. */
|
|
236
|
+
function levelPocLabelText(value, at, base = []) {
|
|
237
|
+
return text(value, WRUN_MAX_LEVEL_LABEL_CHARS)
|
|
238
|
+
? value
|
|
239
|
+
: at([...base, 'poc_label_text'], `poc_label_text takes 1 to ${WRUN_MAX_LEVEL_LABEL_CHARS} characters`);
|
|
191
240
|
}
|
|
192
|
-
function lengthMatchesPrices(key, list, rows, at) {
|
|
241
|
+
function lengthMatchesPrices(key, list, rows, at, base = []) {
|
|
193
242
|
if (list !== undefined && list.length !== rows)
|
|
194
|
-
at([key], `${key} length must match prices`);
|
|
243
|
+
at([...base, key], `${key} length must match prices`);
|
|
244
|
+
}
|
|
245
|
+
/** `series[k]` lengths against the rows, in the kit's order. */
|
|
246
|
+
function seriesLengthsMatchPrices(series, rows, at, base = []) {
|
|
247
|
+
series?.forEach((entry, k) => {
|
|
248
|
+
if (entry.length !== rows)
|
|
249
|
+
at([...base, 'series', k], `series[${k}] length must match prices`);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/** A value area's order: low below high. */
|
|
253
|
+
function valueAreaOrdered(area, at, base = []) {
|
|
254
|
+
if (area !== undefined && area[0] >= area[1]) {
|
|
255
|
+
at([...base, 'value_area'], 'value_area must be [low, high] with low below high');
|
|
256
|
+
}
|
|
195
257
|
}
|
|
196
258
|
function parseLevelsPaneFrame(frame, at) {
|
|
197
|
-
const unknown = unknownKey(frame,
|
|
259
|
+
const unknown = unknownKey(frame, WRUN_LEVELS_PANE_KEYS);
|
|
198
260
|
if (unknown !== undefined)
|
|
199
261
|
at([], `unknown frame key '${unknown}'`);
|
|
200
262
|
const prices = levelPrices(frame.prices, at, ['prices']);
|
|
@@ -210,17 +272,8 @@ function parseLevelsPaneFrame(frame, at) {
|
|
|
210
272
|
if (frame.labels_text !== undefined) {
|
|
211
273
|
parsed.labels_text = levelTexts(frame.labels_text, 'labels_text', WRUN_MAX_LEVEL_LABEL_CHARS, at);
|
|
212
274
|
}
|
|
213
|
-
if (frame.series !== undefined)
|
|
214
|
-
|
|
215
|
-
if (!Array.isArray(series) || series.length < 1 || series.length > WRUN_MAX_LEVEL_SERIES) {
|
|
216
|
-
at(['series'], `series must list 1 to ${WRUN_MAX_LEVEL_SERIES} arrays`);
|
|
217
|
-
}
|
|
218
|
-
parsed.series = series.map((entry, k) => {
|
|
219
|
-
if (!Array.isArray(entry))
|
|
220
|
-
return at(['series', k], 'series must list arrays of finite numbers or null');
|
|
221
|
-
return entry.map((cell, i) => finiteOrNull(cell) ? cell : at(['series', k, i], 'series must list finite numbers or null'));
|
|
222
|
-
});
|
|
223
|
-
}
|
|
275
|
+
if (frame.series !== undefined)
|
|
276
|
+
parsed.series = levelSeries(frame.series, at);
|
|
224
277
|
if (frame.lows !== undefined)
|
|
225
278
|
parsed.lows = levelBand(frame.lows, 'lows', at);
|
|
226
279
|
if (frame.highs !== undefined)
|
|
@@ -228,24 +281,12 @@ function parseLevelsPaneFrame(frame, at) {
|
|
|
228
281
|
if (frame.tooltips !== undefined) {
|
|
229
282
|
parsed.tooltips = levelTexts(frame.tooltips, 'tooltips', WRUN_MAX_LEVEL_TOOLTIP_CHARS, at);
|
|
230
283
|
}
|
|
231
|
-
if (frame.value_area !== undefined)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
parsed.
|
|
237
|
-
}
|
|
238
|
-
if (frame.poc_price !== undefined) {
|
|
239
|
-
if (!finite(frame.poc_price))
|
|
240
|
-
at(['poc_price'], 'poc_price must be a finite number');
|
|
241
|
-
parsed.poc_price = frame.poc_price;
|
|
242
|
-
}
|
|
243
|
-
if (frame.poc_label_text !== undefined) {
|
|
244
|
-
if (!text(frame.poc_label_text, WRUN_MAX_LEVEL_LABEL_CHARS)) {
|
|
245
|
-
at(['poc_label_text'], `poc_label_text takes 1 to ${WRUN_MAX_LEVEL_LABEL_CHARS} characters`);
|
|
246
|
-
}
|
|
247
|
-
parsed.poc_label_text = frame.poc_label_text;
|
|
248
|
-
}
|
|
284
|
+
if (frame.value_area !== undefined)
|
|
285
|
+
parsed.value_area = levelValueArea(frame.value_area, at);
|
|
286
|
+
if (frame.poc_price !== undefined)
|
|
287
|
+
parsed.poc_price = levelPocPrice(frame.poc_price, at);
|
|
288
|
+
if (frame.poc_label_text !== undefined)
|
|
289
|
+
parsed.poc_label_text = levelPocLabelText(frame.poc_label_text, at);
|
|
249
290
|
if (frame.scale_max !== undefined) {
|
|
250
291
|
if (!finite(frame.scale_max) || frame.scale_max <= 0) {
|
|
251
292
|
at(['scale_max'], 'scale_max must be a number greater than 0');
|
|
@@ -260,10 +301,7 @@ function parseLevelsPaneFrame(frame, at) {
|
|
|
260
301
|
lengthMatchesPrices('tooltips', parsed.tooltips, rows, at);
|
|
261
302
|
lengthMatchesPrices('lows', parsed.lows, rows, at);
|
|
262
303
|
lengthMatchesPrices('highs', parsed.highs, rows, at);
|
|
263
|
-
parsed.series
|
|
264
|
-
if (entry.length !== rows)
|
|
265
|
-
at(['series', k], `series[${k}] length must match prices`);
|
|
266
|
-
});
|
|
304
|
+
seriesLengthsMatchPrices(parsed.series, rows, at);
|
|
267
305
|
const broken = monotonicBreak(prices);
|
|
268
306
|
if (broken >= 0)
|
|
269
307
|
at(['prices', broken], 'prices must be strictly monotonic');
|
|
@@ -283,9 +321,7 @@ function parseLevelsPaneFrame(frame, at) {
|
|
|
283
321
|
}
|
|
284
322
|
}
|
|
285
323
|
}
|
|
286
|
-
|
|
287
|
-
at(['value_area'], 'value_area must be [low, high] with low below high');
|
|
288
|
-
}
|
|
324
|
+
valueAreaOrdered(parsed.value_area, at);
|
|
289
325
|
return parsed;
|
|
290
326
|
}
|
|
291
327
|
function parseLevelsSpansFrame(frame, at) {
|
|
@@ -300,7 +336,7 @@ function parseLevelsSpansFrame(frame, at) {
|
|
|
300
336
|
const path = ['spans', k];
|
|
301
337
|
if (!record(span))
|
|
302
338
|
return at(path, 'a span is an object of start, end, prices and values');
|
|
303
|
-
const foreign = unknownKey(span,
|
|
339
|
+
const foreign = unknownKey(span, WRUN_LEVELS_SPAN_KEYS);
|
|
304
340
|
if (foreign !== undefined)
|
|
305
341
|
at(path, `unknown span key '${foreign}'`);
|
|
306
342
|
const { start, end } = span;
|
|
@@ -318,16 +354,34 @@ function parseLevelsSpansFrame(frame, at) {
|
|
|
318
354
|
}
|
|
319
355
|
entry.colors = colors.map((color, i) => isWrunColorWord(color) ? color : at([...path, 'colors', i], WRUN_COLOR_WORD_MESSAGE));
|
|
320
356
|
}
|
|
357
|
+
// The per-span fields, read by the pane frame's own readers at the span's path.
|
|
358
|
+
if (span.labels_text !== undefined) {
|
|
359
|
+
entry.labels_text = levelTexts(span.labels_text, 'labels_text', WRUN_MAX_LEVEL_LABEL_CHARS, at, path);
|
|
360
|
+
}
|
|
361
|
+
if (span.series !== undefined)
|
|
362
|
+
entry.series = levelSeries(span.series, at, path);
|
|
363
|
+
if (span.value_area !== undefined)
|
|
364
|
+
entry.value_area = levelValueArea(span.value_area, at, path);
|
|
365
|
+
if (span.poc_price !== undefined)
|
|
366
|
+
entry.poc_price = levelPocPrice(span.poc_price, at, path);
|
|
367
|
+
if (span.poc_label_text !== undefined)
|
|
368
|
+
entry.poc_label_text = levelPocLabelText(span.poc_label_text, at, path);
|
|
369
|
+
// The cross-field rules, in the kit's order.
|
|
370
|
+
const rows = prices.length;
|
|
321
371
|
if (end <= start)
|
|
322
372
|
at([...path, 'end'], 'end must be after start');
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
373
|
+
lengthMatchesPrices('values', values, rows, at, path);
|
|
374
|
+
lengthMatchesPrices('colors', entry.colors, rows, at, path);
|
|
375
|
+
lengthMatchesPrices('labels_text', entry.labels_text, rows, at, path);
|
|
376
|
+
seriesLengthsMatchPrices(entry.series, rows, at, path);
|
|
377
|
+
// A segmented span takes its series colours (the pane frame's DL-stacked rule, a grammar rule on a span).
|
|
378
|
+
if (entry.colors !== undefined && entry.series !== undefined) {
|
|
379
|
+
at([...path, 'colors'], 'colors and series do not mix: a segmented row takes its series colours');
|
|
327
380
|
}
|
|
328
381
|
const broken = monotonicBreak(prices);
|
|
329
382
|
if (broken >= 0)
|
|
330
383
|
at([...path, 'prices', broken], 'prices must be strictly monotonic');
|
|
384
|
+
valueAreaOrdered(entry.value_area, at, path);
|
|
331
385
|
return entry;
|
|
332
386
|
});
|
|
333
387
|
const rows = parsed.reduce((sum, span) => sum + span.prices.length, 0);
|
|
@@ -340,8 +340,8 @@ export declare function wrunFrameRefusalMemory(text: string): 'window' | 'identi
|
|
|
340
340
|
* by name.
|
|
341
341
|
*/
|
|
342
342
|
export declare const WRUN_KIT_REFUSAL_STAGES: {
|
|
343
|
-
readonly validate: readonly ["wrun_abi_unsupported", "wrun_pin_venue_unknown", "wrun_sheet_over_cap", "wrun_abi_channel_missing", "wrun_intrabar_interval_required", "wrun_intrabar_primary", "wrun_candles_interval_required", "wrun_candles_primary", "wrun_options_chain_venue", "wrun_options_chain_expiries", "wrun_options_chain_market_pinned", "wrun_offset_needs_view", "wrun_offset_count_required", "wrun_bars_needs_leg", "wrun_chart_interval_below_needs_candles", "wrun_chart_interval_below_primary", "wrun_chart_interval_below_forming", "wrun_pin_venue_refused", "wrun_pin_symbol_literal", "wrun_tape_history_unavailable", "wrun_strategy_feed_not_ohlcv", "wrun_strategy_slippage_model_unsupported", "wrun_strategy_reserved_output", "wrun_tape_min_size_invalid"];
|
|
344
|
-
readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_interval_unsupported", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable"];
|
|
343
|
+
readonly validate: readonly ["wrun_abi_unsupported", "wrun_pin_venue_unknown", "wrun_sheet_over_cap", "wrun_abi_channel_missing", "wrun_intrabar_interval_required", "wrun_intrabar_primary", "wrun_candles_interval_required", "wrun_candles_primary", "wrun_options_chain_venue", "wrun_options_chain_expiries", "wrun_options_chain_market_pinned", "wrun_offset_needs_view", "wrun_offset_count_required", "wrun_bars_needs_leg", "wrun_chart_interval_below_needs_candles", "wrun_chart_interval_below_primary", "wrun_chart_interval_below_forming", "wrun_pin_venue_refused", "wrun_pin_symbol_literal", "wrun_tape_history_unavailable", "wrun_strategy_feed_not_ohlcv", "wrun_strategy_slippage_model_unsupported", "wrun_strategy_reserved_output", "wrun_tape_min_size_invalid", "wrun_option_knob_invalid", "wrun_option_market_pinned", "wrun_option_prints_min_premium_required", "wrun_options_flow_venue_field", "wrun_options_flow_venue_required", "wrun_options_flow_venue_scope", "wrun_oi_candles_interval_required", "wrun_oi_candles_primary", "wrun_volume_profile_candles_interval_required", "wrun_volume_profile_candles_primary"];
|
|
344
|
+
readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_not_in_10m_universe", "wrun_opra_lane_refused", "wrun_opra_official_only", "wrun_option_contract_flow_unsupported", "wrun_option_contract_state_unsupported", "wrun_option_daily_unsupported", "wrun_option_prints_one_acquisition", "wrun_option_prints_unsupported", "wrun_option_stats_10m_unsupported", "wrun_option_surface_unsupported", "wrun_options_flow_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_oi_candles_unsupported", "wrun_volume_profile_candles_unsupported", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_interval_unsupported", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable"];
|
|
345
345
|
readonly shape: readonly ["wrun_draw_kind_limit", "wrun_draw_total_limit", "wrun_draw_polyline_too_large", "wrun_draw_calls_per_row", "wrun_render_result_too_large", "wrun_draw_kind_mismatch", "wrun_draw_handle_missing", "wrun_draw_label_slot_absent", "wrun_draw_non_finite", "wrun_draw_phase", "wrun_draw_id_negative", "wrun_draw_kind_undeclared", "wrun_draw_prop_unknown", "wrun_draw_prop_unsupported", "wrun_draw_style_out_of_range", "wrun_draw_polyline_empty", "wrun_draw_polyline_out_of_bounds", "wrun_draw_label_slot_undeclared", "wrun_draw_polyline_budget", "wrun_strategy_id_limit", "wrun_strategy_id_too_long", "wrun_strategy_id_invalid_utf8", "wrun_strategy_calls_per_row", "wrun_strategy_trade_limit", "wrun_strategy_non_finite", "wrun_strategy_bad_direction", "wrun_strategy_not_declared", "wrun_strategy_phase", "wrun_strategy_id_out_of_bounds", "wrun_text_param_phase", "wrun_text_param_memory", "wrun_bar_count_phase", "wrun_frame_invalid", "wrun_frame_phase", "wrun_frame_undeclared", "wrun_frame_length", "wrun_frame_too_large", "wrun_frame_run_too_large", "wrun_frame_memory", "wrun_frame_utf8"];
|
|
346
346
|
readonly pack: readonly ["wrun_cell_block_invalid", "wrun_run_cells_too_large", "wrun_cell_block_too_large"];
|
|
347
347
|
readonly align: readonly ["wrun_densify_empty_fetch", "wrun_densify_mixed_phase", "wrun_liquidation_side_unmatched", "wrun_bound_series_empty", "wrun_cell_data_malformed"];
|
|
@@ -508,10 +508,34 @@ export const WRUN_KIT_REFUSAL_STAGES = {
|
|
|
508
508
|
'wrun_strategy_slippage_model_unsupported',
|
|
509
509
|
'wrun_strategy_reserved_output',
|
|
510
510
|
'wrun_tape_min_size_invalid',
|
|
511
|
+
// kit 0.81 to 0.85 (UW-PARITY): the US listed options classes' knobs, pins and venues.
|
|
512
|
+
'wrun_option_knob_invalid',
|
|
513
|
+
'wrun_option_market_pinned',
|
|
514
|
+
'wrun_option_prints_min_premium_required',
|
|
515
|
+
'wrun_options_flow_venue_field',
|
|
516
|
+
'wrun_options_flow_venue_required',
|
|
517
|
+
'wrun_options_flow_venue_scope',
|
|
518
|
+
// kit 0.86.0 (WRUN-OI-PROFILE): a leg stream needs its interval and is never the primary.
|
|
519
|
+
'wrun_oi_candles_interval_required',
|
|
520
|
+
'wrun_oi_candles_primary',
|
|
521
|
+
'wrun_volume_profile_candles_interval_required',
|
|
522
|
+
'wrun_volume_profile_candles_primary',
|
|
511
523
|
],
|
|
512
524
|
plan: [
|
|
513
525
|
'wrun_options_coin_unknown',
|
|
514
526
|
'wrun_source_unsupported',
|
|
527
|
+
// kit 0.81 to 0.85 (UW-PARITY): the OPRA lanes, the official-only gate and each options class a host refuses.
|
|
528
|
+
'wrun_not_in_10m_universe',
|
|
529
|
+
'wrun_opra_lane_refused',
|
|
530
|
+
'wrun_opra_official_only',
|
|
531
|
+
'wrun_option_contract_flow_unsupported',
|
|
532
|
+
'wrun_option_contract_state_unsupported',
|
|
533
|
+
'wrun_option_daily_unsupported',
|
|
534
|
+
'wrun_option_prints_one_acquisition',
|
|
535
|
+
'wrun_option_prints_unsupported',
|
|
536
|
+
'wrun_option_stats_10m_unsupported',
|
|
537
|
+
'wrun_option_surface_unsupported',
|
|
538
|
+
'wrun_options_flow_unsupported',
|
|
515
539
|
'wrun_field_unsupported',
|
|
516
540
|
'wrun_tenor_unsupported',
|
|
517
541
|
'wrun_view_unsupported',
|
|
@@ -532,6 +556,9 @@ export const WRUN_KIT_REFUSAL_STAGES = {
|
|
|
532
556
|
'wrun_intrabar_unsupported',
|
|
533
557
|
'wrun_candles_bars_over_cap',
|
|
534
558
|
'wrun_candles_ratio_over_cap',
|
|
559
|
+
// kit 0.86.0 (WRUN-OI-PROFILE): a host that does not serve a leg stream class.
|
|
560
|
+
'wrun_oi_candles_unsupported',
|
|
561
|
+
'wrun_volume_profile_candles_unsupported',
|
|
535
562
|
'wrun_trade_volume_by_size_unsupported',
|
|
536
563
|
'wrun_view_leg_off_grid',
|
|
537
564
|
'wrun_view_leg_equal',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A source lane's answer the data plane REFUSED BY NAME: a backend switch that keeps a read off (the OPTION_PRINT_AGG
|
|
3
|
+
* flow scope reads while `read.option_print_scopes` is off), or a series the data plane holds for a configured list
|
|
4
|
+
* only (OPTION_UNDERLYING_STATS's ten-minute rows). The same ask is refused again until the plane changes, so it is
|
|
5
|
+
* no transport failure to retry:
|
|
6
|
+
*
|
|
7
|
+
* - the worker twin that met the refusal ends its stream with an error whose text carries the mark and a stable code
|
|
8
|
+
* (`wrunLaneRefusedText`), and the main thread reads the code back off whatever error wraps that text on its way
|
|
9
|
+
* (`wrunLaneRefusedCodeOf`: the transport keeps the worker's words);
|
|
10
|
+
* - the run degrades the lane under its name, terminally (the chip says the source is missing and no ladder re-asks
|
|
11
|
+
* it), in the record its lane declares for the code (`WrunPollLane.refusedAnswers`) when it declares one;
|
|
12
|
+
* - a live reconcile reads it as an answer with no new rows: its window covered, the held rows kept, no warning, so
|
|
13
|
+
* the session never widens its window or warns on every poll.
|
|
14
|
+
*
|
|
15
|
+
* Import-free: the worker twins and the main thread read the same mark.
|
|
16
|
+
*/
|
|
17
|
+
/** The mark a named refusal's text carries before its code. */
|
|
18
|
+
export declare const WRUN_LANE_REFUSED_MARK = "wrun-lane-refused:";
|
|
19
|
+
/** The text a worker twin ends a refused read with: the mark, the code (lower case, digits and dashes), the detail. */
|
|
20
|
+
export declare function wrunLaneRefusedText(code: string, detail: string): string;
|
|
21
|
+
/** The code of a named refusal an error (or its text) carries, or undefined for any other failure. */
|
|
22
|
+
export declare function wrunLaneRefusedCodeOf(error: unknown): string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A source lane's answer the data plane REFUSED BY NAME: a backend switch that keeps a read off (the OPTION_PRINT_AGG
|
|
3
|
+
* flow scope reads while `read.option_print_scopes` is off), or a series the data plane holds for a configured list
|
|
4
|
+
* only (OPTION_UNDERLYING_STATS's ten-minute rows). The same ask is refused again until the plane changes, so it is
|
|
5
|
+
* no transport failure to retry:
|
|
6
|
+
*
|
|
7
|
+
* - the worker twin that met the refusal ends its stream with an error whose text carries the mark and a stable code
|
|
8
|
+
* (`wrunLaneRefusedText`), and the main thread reads the code back off whatever error wraps that text on its way
|
|
9
|
+
* (`wrunLaneRefusedCodeOf`: the transport keeps the worker's words);
|
|
10
|
+
* - the run degrades the lane under its name, terminally (the chip says the source is missing and no ladder re-asks
|
|
11
|
+
* it), in the record its lane declares for the code (`WrunPollLane.refusedAnswers`) when it declares one;
|
|
12
|
+
* - a live reconcile reads it as an answer with no new rows: its window covered, the held rows kept, no warning, so
|
|
13
|
+
* the session never widens its window or warns on every poll.
|
|
14
|
+
*
|
|
15
|
+
* Import-free: the worker twins and the main thread read the same mark.
|
|
16
|
+
*/
|
|
17
|
+
/** The mark a named refusal's text carries before its code. */
|
|
18
|
+
export const WRUN_LANE_REFUSED_MARK = 'wrun-lane-refused:';
|
|
19
|
+
const WRUN_LANE_REFUSED_RE = /wrun-lane-refused:([a-z0-9][a-z0-9-]*)/;
|
|
20
|
+
/** The text a worker twin ends a refused read with: the mark, the code (lower case, digits and dashes), the detail. */
|
|
21
|
+
export function wrunLaneRefusedText(code, detail) {
|
|
22
|
+
return `${WRUN_LANE_REFUSED_MARK}${code}${detail === '' ? '' : ` ${detail}`}`;
|
|
23
|
+
}
|
|
24
|
+
/** The code of a named refusal an error (or its text) carries, or undefined for any other failure. */
|
|
25
|
+
export function wrunLaneRefusedCodeOf(error) {
|
|
26
|
+
let text = error;
|
|
27
|
+
if (error !== null && typeof error === 'object')
|
|
28
|
+
text = error.message;
|
|
29
|
+
if (typeof text !== 'string')
|
|
30
|
+
return undefined;
|
|
31
|
+
return WRUN_LANE_REFUSED_RE.exec(text)?.[1];
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
2
|
+
/** The largest param value the planner reads as a lookback (the kit's LOOKBACK_PARAM_CAP): a bigger number is a
|
|
3
|
+
* threshold or a size, never a window. */
|
|
4
|
+
export declare const WRUN_LANE_WARMUP_LOOKBACK_CAP = 500;
|
|
5
|
+
/**
|
|
6
|
+
* The cloud's warm-up for a sheet under the run's param values, in chart bars: the kit planner's rule (see the file
|
|
7
|
+
* comment), clamped to `cap`, the `chart-cloud` profile's `caps.warmupBars` (Infinity is no cap). Never below 0.
|
|
8
|
+
*/
|
|
9
|
+
export declare function wrunLaneWarmupBars(sheet: Pick<WrunIndicatorMetadata, 'params' | 'warmup_bars' | 'warmup'> & {
|
|
10
|
+
boxes?: unknown;
|
|
11
|
+
segments?: unknown;
|
|
12
|
+
}, paramValues: Readonly<Record<string, number>>, cap: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* The open of the first bar a run evaluates with `bars` of warm-up before the window opening at `fromMs`: `bars` chart
|
|
15
|
+
* intervals back, or `bars` calendar bars on a 1M, 3M, 6M or 1Y chart (the kit's `evaluateFromMs`). Clock time, as the
|
|
16
|
+
* cloud counts it: a venue's closed hours inside the span hold no candle, so a session market evaluates fewer rows.
|
|
17
|
+
*/
|
|
18
|
+
export declare function wrunLaneWarmupFromMs(fromMs: number, bars: number, intervalMs: number): number;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The warm-up depth a wrun run evaluates before its first landed bar, one number for both lanes (WRUN parity rows 53
|
|
3
|
+
* and 4; Kyle 2026-10-13: the LONGER depth, the cloud's, on both).
|
|
4
|
+
*
|
|
5
|
+
* The cloud plans every chart create through the kit's planner under the `chart-cloud` profile (kscript-backend
|
|
6
|
+
* `wrunSharedWarmupBars`: `planWrunRun(...).warmup.bars`; its docs/wrun-lane.md, "Warm-up"): the sheet's
|
|
7
|
+
* `warmup_bars` (2 when absent), every window-like param's current value (finite, at most 500) and the largest box or
|
|
8
|
+
* segment offset, plus one; never below the sheet's scaled `warmup` window; clamped to the profile's
|
|
9
|
+
* `caps.warmupBars`. Every ask of that run (the chart's candles, each leg, each lane) starts that many chart bars
|
|
10
|
+
* before the window (`warmup.evaluateFromMs`), and the rows before the window warm the module without shipping. The
|
|
11
|
+
* browser lane evaluated from the chart's first loaded bar instead, so its left edge was cold where the cloud's was
|
|
12
|
+
* warm: RSI's first 14 rows, a 1h-pinned RSI on a 5m chart ready six hours later (its `overbought` 70 is window-like
|
|
13
|
+
* to the planner, so W is 71 five-minute bars), and a strategy whose first bar was 22 bars later.
|
|
14
|
+
*
|
|
15
|
+
* This file is the one derivation the browser reads. The run pass (wrun-overlay-run.util) asks every lane and leg from
|
|
16
|
+
* `wrunLaneWarmupFromMs` and evaluates the chart's candles in that span first as a hidden head that never lands; the
|
|
17
|
+
* strategy's broker feed reads the same head, so the Strategy Tester's first bar is the cloud's. The kit keeps its
|
|
18
|
+
* `planWarmup` inside `planWrunRun`, which validates the whole sheet against a full context and throws for anything
|
|
19
|
+
* the profile refuses, so the rule is mirrored here over the run's own param values (`wrunParamValuesFromSettings`
|
|
20
|
+
* in wrun-param-values.util: the numbers the cloud's createScript packs) and pinned against the kit's planner by
|
|
21
|
+
* tests/utility/wrun/wrun-lane-warmup.util.spec.ts: a kit that changes its rule turns that spec red.
|
|
22
|
+
*/
|
|
23
|
+
import { calendarMonthsOfMs } from '../chart/calendar-interval.util.js';
|
|
24
|
+
/** The planner's warm-up when the sheet declares no `warmup_bars` (the kit's default). */
|
|
25
|
+
const WRUN_LANE_WARMUP_DEFAULT_BARS = 2;
|
|
26
|
+
/** The largest param value the planner reads as a lookback (the kit's LOOKBACK_PARAM_CAP): a bigger number is a
|
|
27
|
+
* threshold or a size, never a window. */
|
|
28
|
+
export const WRUN_LANE_WARMUP_LOOKBACK_CAP = 500;
|
|
29
|
+
/** Param types the planner never reads as a lookback (the kit's NON_WINDOW_PARAM_TYPES). */
|
|
30
|
+
const NON_WINDOW_PARAM_TYPES = new Set([
|
|
31
|
+
'select',
|
|
32
|
+
'boolean',
|
|
33
|
+
'color',
|
|
34
|
+
'multi',
|
|
35
|
+
'time',
|
|
36
|
+
'price',
|
|
37
|
+
'text',
|
|
38
|
+
]);
|
|
39
|
+
function isRecord(value) {
|
|
40
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
41
|
+
}
|
|
42
|
+
const finiteOf = (value) => typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
43
|
+
/** A param the planner reads as a lookback: no style knob, host fill or session, and a numeric type (none declared
|
|
44
|
+
* reads as a number). */
|
|
45
|
+
function isWindowLikeParam(param) {
|
|
46
|
+
if (param.style !== undefined || param.host_fill !== undefined || param.session !== undefined)
|
|
47
|
+
return false;
|
|
48
|
+
return typeof param.type !== 'string' || !NON_WINDOW_PARAM_TYPES.has(param.type);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The cloud's warm-up for a sheet under the run's param values, in chart bars: the kit planner's rule (see the file
|
|
52
|
+
* comment), clamped to `cap`, the `chart-cloud` profile's `caps.warmupBars` (Infinity is no cap). Never below 0.
|
|
53
|
+
*/
|
|
54
|
+
export function wrunLaneWarmupBars(sheet, paramValues, cap) {
|
|
55
|
+
let bars = finiteOf(sheet.warmup_bars) ?? WRUN_LANE_WARMUP_DEFAULT_BARS;
|
|
56
|
+
const params = (Array.isArray(sheet.params) ? sheet.params : []).filter(isRecord);
|
|
57
|
+
for (const param of params) {
|
|
58
|
+
if (!isWindowLikeParam(param))
|
|
59
|
+
continue;
|
|
60
|
+
const value = typeof param.name === 'string' ? paramValues[param.name] : undefined;
|
|
61
|
+
if (value === undefined || !Number.isFinite(value) || value > WRUN_LANE_WARMUP_LOOKBACK_CAP)
|
|
62
|
+
continue;
|
|
63
|
+
bars = Math.max(bars, Math.ceil(value));
|
|
64
|
+
}
|
|
65
|
+
for (const key of ['boxes', 'segments']) {
|
|
66
|
+
const declared = sheet[key];
|
|
67
|
+
for (const decl of Array.isArray(declared) ? declared : []) {
|
|
68
|
+
if (!isRecord(decl))
|
|
69
|
+
continue;
|
|
70
|
+
for (const offset of [decl.x_from, decl.x_to]) {
|
|
71
|
+
const at = finiteOf(offset);
|
|
72
|
+
if (at !== undefined)
|
|
73
|
+
bars = Math.max(bars, Math.abs(at));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
bars = Math.ceil(bars) + 1;
|
|
78
|
+
const warmup = sheet.warmup;
|
|
79
|
+
if (isRecord(warmup)) {
|
|
80
|
+
let sum = 0;
|
|
81
|
+
for (const term of Array.isArray(warmup.terms) ? warmup.terms : []) {
|
|
82
|
+
if (!isRecord(term) || typeof term.param !== 'string')
|
|
83
|
+
continue;
|
|
84
|
+
const multiplier = finiteOf(term.multiplier);
|
|
85
|
+
if (multiplier === undefined)
|
|
86
|
+
continue;
|
|
87
|
+
if (params.find((param) => param.name === term.param)?.type === 'text')
|
|
88
|
+
continue;
|
|
89
|
+
const value = paramValues[term.param];
|
|
90
|
+
if (value === undefined || !Number.isFinite(value))
|
|
91
|
+
continue;
|
|
92
|
+
sum += value * multiplier;
|
|
93
|
+
}
|
|
94
|
+
bars = Math.max(bars, finiteOf(warmup.min) ?? 0, Math.ceil(sum) + (finiteOf(warmup.plus) ?? 0));
|
|
95
|
+
}
|
|
96
|
+
return Math.max(0, Math.min(bars, cap));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The open of the first bar a run evaluates with `bars` of warm-up before the window opening at `fromMs`: `bars` chart
|
|
100
|
+
* intervals back, or `bars` calendar bars on a 1M, 3M, 6M or 1Y chart (the kit's `evaluateFromMs`). Clock time, as the
|
|
101
|
+
* cloud counts it: a venue's closed hours inside the span hold no candle, so a session market evaluates fewer rows.
|
|
102
|
+
*/
|
|
103
|
+
export function wrunLaneWarmupFromMs(fromMs, bars, intervalMs) {
|
|
104
|
+
if (!(bars > 0) || !(intervalMs > 0))
|
|
105
|
+
return fromMs;
|
|
106
|
+
const months = calendarMonthsOfMs(intervalMs);
|
|
107
|
+
if (months === null)
|
|
108
|
+
return fromMs - bars * intervalMs;
|
|
109
|
+
const at = new Date(fromMs);
|
|
110
|
+
const month = at.getUTCMonth();
|
|
111
|
+
return Date.UTC(at.getUTCFullYear(), month - (month % months) - bars * months, 1);
|
|
112
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { WrunLegCandleClose, WrunLegCandleOpen, WrunLegRowBounds } from '@orangecharts/indicator-kit/host';
|
|
2
|
+
import { type WrunChartSession } from './wrun-source-rows.util.js';
|
|
3
|
+
/** How long after a US listing's candle closes the gateway's rows hold all of it: its candles are
|
|
4
|
+
* built from Polygon's minute bars, which land after their minute ends, and the closing auction
|
|
5
|
+
* joins the session's last minute only once the 16:00 bar has landed, after 16:01 New York
|
|
6
|
+
* (docs/features/data/rth-eth-sessions.md, "Closing auction"). The live tick re-asks a stock leg
|
|
7
|
+
* this long after a close, so the confirmed read takes the whole candle. */
|
|
8
|
+
export declare const WRUN_US_EQUITIES_CLOSE_SETTLE_MS = 180000;
|
|
9
|
+
/** What a leg's close reads: its span and, for another market, that market. */
|
|
10
|
+
export interface WrunLegCloseLeg {
|
|
11
|
+
legMs: number;
|
|
12
|
+
market?: {
|
|
13
|
+
exchange?: string;
|
|
14
|
+
} | undefined;
|
|
15
|
+
}
|
|
16
|
+
/** The session the chart fetches a US listing's candles on, as the shared host's session calendar
|
|
17
|
+
* reads it: 'extended' only while the chart runs its extended session (`isEquityExtendedSession`,
|
|
18
|
+
* the fetch's own decider), else 'regular', an unset session included (the browser never leaves it
|
|
19
|
+
* unstated; the package reads an unstated session as open plus the span). */
|
|
20
|
+
export declare function wrunChartSessionType(sessionType: unknown): 'regular' | 'extended';
|
|
21
|
+
/** The chart's session as the row builder reads it (`WrunChartSourceRows.session`): the chart's
|
|
22
|
+
* exchange and the session word of its `sessionType`. */
|
|
23
|
+
export declare function wrunChartSession(exchange: string | undefined, sessionType: unknown): WrunChartSession;
|
|
24
|
+
/** Whether the gateway builds this leg's bars on the CME session lattice. */
|
|
25
|
+
export declare function wrunLegRidesCmeSession(leg: WrunLegCloseLeg, chartExchange: string | undefined): boolean;
|
|
26
|
+
/** How long after a close the leg's venue holds the whole candle (the module doc): a US listing's
|
|
27
|
+
* `WRUN_US_EQUITIES_CLOSE_SETTLE_MS` where its candles close with the session, 0 for every other
|
|
28
|
+
* leg (its live feed seals a candle at its close). */
|
|
29
|
+
export declare function wrunLegCloseSettleMs(leg: WrunLegCloseLeg, chartExchange: string | undefined, sessionType?: unknown): number;
|
|
30
|
+
/** The leg's candle closes for the leg core (`closeMs`): the CME session lattice's, else a US
|
|
31
|
+
* listing's session closes on a regular-session chart (the chart's `sessionType`); undefined where
|
|
32
|
+
* they are open plus the span. */
|
|
33
|
+
export declare function wrunLegCandleClose(leg: WrunLegCloseLeg, chartExchange: string | undefined, sessionType?: unknown): WrunLegCandleClose | undefined;
|
|
34
|
+
/** The leg's candle opens for the leg core (`candleOpenMs`), undefined where a candle trades from
|
|
35
|
+
* its stamp: a CME daily, 3d or weekly candle stamped at its trade date trades from the session
|
|
36
|
+
* open before it. */
|
|
37
|
+
export declare function wrunLegCandleOpen(leg: WrunLegCloseLeg, chartExchange: string | undefined): WrunLegCandleOpen | undefined;
|
|
38
|
+
/** The chart's primary row bounds for the leg core (`rowBounds`), undefined where a row spans
|
|
39
|
+
* [label, label + P): a calendar row (1M 3M 6M 1Y, any market) runs from its label to its calendar
|
|
40
|
+
* end (`wrunCalendarRowBounds`); a row of a market the gateway builds on the CME session lattice,
|
|
41
|
+
* at a lattice interval, runs from its session open to its bar end (a daily row labelled Sep 30
|
|
42
|
+
* runs from Sep 29 22:00Z to Sep 30 22:00Z under daylight time; the Tuesday after Labor Day from
|
|
43
|
+
* the Sunday open). A label the lattice does not book keeps [label, label + P). The row builder
|
|
44
|
+
* reads the same answer through `wrunSessionClock`. */
|
|
45
|
+
export declare function wrunPrimaryRowBounds(chartExchange: string | undefined, intervalMs: number): WrunLegRowBounds | undefined;
|
|
46
|
+
/** The label of the primary row holding `instantMs` where a calendar labels the rows: its calendar
|
|
47
|
+
* bar on a calendar chart (March 10 is the March 1 row), the row whose session holds it on the CME
|
|
48
|
+
* session lattice; undefined elsewhere, where the caller keeps its own grid. */
|
|
49
|
+
export declare function wrunPrimaryRowHoldingMs(chartExchange: string | undefined, intervalMs: number, instantMs: number): number | undefined;
|
|
50
|
+
/** The close of the leg's bar holding `nowMs` where its venue closes bars off the plain grid,
|
|
51
|
+
* undefined elsewhere or once that bar has closed (the caller keeps its own grid, a wake no later
|
|
52
|
+
* than the next close): on the CME session lattice the lattice bar's end; on a US listing on a
|
|
53
|
+
* regular-session chart (the chart's `sessionType`) the stock's close (`wrunLegCandleClose`) of
|
|
54
|
+
* the candle the chart's live boundary rule keys now to (`liveBucketStartMs`: the trade date for a
|
|
55
|
+
* day, the Monday for a week, the 09:30 New York lattice from 45m to 12h), and off the session on
|
|
56
|
+
* that lattice the first candle of the next session. */
|
|
57
|
+
export declare function wrunLegBarCloseAt(leg: WrunLegCloseLeg, chartExchange: string | undefined, nowMs: number, sessionType?: unknown): number | undefined;
|