@orangecharts/wrun-chart-host 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/constants/feature-flags.constants.d.ts +9 -0
- package/dist/constants/feature-flags.constants.js +67 -4
- package/dist/constants/governed-exchanges.constants.d.ts +12 -0
- package/dist/constants/governed-exchanges.constants.js +16 -0
- package/dist/constants/option-venues.constants.d.ts +2 -2
- package/dist/host-env.d.ts +1 -9
- package/dist/host-ports.types.d.ts +36 -7
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
- package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
- package/dist/interfaces/cme-realtime.interface.js +6 -3
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
- package/dist/interfaces/prediction-market.interface.d.ts +7 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
- package/dist/interfaces/stocks-realtime.interface.js +32 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +48 -117
- package/dist/kscript-data/controls/live-trades-merge.util.js +97 -207
- package/dist/market-data/billing.interface.d.ts +86 -12
- package/dist/market-data/billing.interface.js +23 -4
- package/dist/market-data/venue.d.ts +65 -2
- package/dist/market-data/venues/index.d.ts +135 -5
- package/dist/market-data/venues/index.js +2 -1
- package/dist/market-data/venues/opra.contract.copy.json +3 -2
- package/dist/market-data/venues/opra.d.ts +2 -2
- package/dist/market-data/venues/opra.js +5 -2
- package/dist/market-data/venues/stocks.contract.copy.json +64 -0
- package/dist/market-data/venues/stocks.d.ts +130 -0
- package/dist/market-data/venues/stocks.js +117 -0
- package/dist/settings-templates/footprint-rows.js +35 -2
- package/dist/settings-templates/form-rows.d.ts +2 -1
- package/dist/settings-templates/indicator-fields.js +34 -4
- package/dist/settings-templates/tool-rules.d.ts +12 -5
- package/dist/settings-templates/tool-rules.js +11 -5
- package/dist/settings-templates/tool-tables.generated.js +4 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
- package/dist/utility/chart/cme-cache-context.util.js +10 -6
- package/dist/utility/chart/cme-realtime.util.js +10 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
- package/dist/utility/chart/effective-chart-session.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
- package/dist/utility/chart/host-bar-placement.util.js +170 -30
- package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
- package/dist/utility/chart/index-host-tier.util.js +7 -2
- package/dist/utility/chart/index-mode-admission.util.js +25 -11
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +6 -9
- package/dist/utility/chart/kscript-live-coalesce.util.js +8 -9
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
- package/dist/utility/chart/kscript-provenance-keys.util.js +7 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +115 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +194 -40
- package/dist/utility/chart/live-bucket.util.d.ts +24 -8
- package/dist/utility/chart/live-bucket.util.js +85 -27
- package/dist/utility/chart/marketKind.util.js +5 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
- package/dist/utility/chart/mixed-mode.util.js +14 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
- package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
- package/dist/utility/chart/rth-session.util.d.ts +9 -8
- package/dist/utility/chart/rth-session.util.js +23 -20
- package/dist/utility/chart/trading-day.util.d.ts +17 -0
- package/dist/utility/chart/trading-day.util.js +59 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
- package/dist/utility/chart/window-owner.leaf.js +45 -3
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
- package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
- package/dist/utility/intl-locale.util.js +5 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/v2/gate-plane.util.d.ts +12 -3
- package/dist/utility/v2/gate-plane.util.js +30 -4
- package/dist/utility/v2/gate-session-latch.util.js +1 -1
- package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
- package/dist/utility/v2/stocks-governed.util.js +34 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
- package/dist/utility/wrun/derived-roots.leaf.js +27 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +1 -9
- package/dist/utility/wrun/derived-roots.util.js +3 -23
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +2 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +63 -16
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +58 -14
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +34 -11
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +106 -30
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +7 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +12 -8
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
- package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-handles.util.js +9 -8
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
- package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +26 -12
- package/dist/utility/wrun/wrun-live-intake.util.js +219 -155
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +9 -5
- package/dist/utility/wrun/wrun-live-tick.util.js +130 -94
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +20 -10
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +10 -5
- package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
- package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +281 -20
- package/dist/utility/wrun/wrun-option-views.util.js +391 -50
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +60 -11
- package/dist/utility/wrun/wrun-overlay-run.util.js +529 -113
- package/dist/utility/wrun/wrun-panel-mount.util.js +51 -6
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.js +27 -3
- package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal.util.js +22 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +39 -7
- package/dist/utility/wrun/wrun-run-interval.util.js +49 -9
- package/dist/utility/wrun/wrun-socket-row-source.js +7 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -22
- package/dist/utility/wrun/wrun-source-rows.util.js +62 -41
- package/dist/utility/wrun/wrun-tape-per-order.util.js +1 -20
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
- package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
- package/dist/workers/constants/socket-slots.d.ts +91 -6
- package/dist/workers/constants/socket-slots.js +85 -6
- package/package.json +11 -11
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +0 -56
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +0 -107
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* palette (`wrunColorThemeOf`), so a theme switch or a display-timezone
|
|
10
10
|
* change re-resolves every mounted child without a rerun
|
|
11
11
|
* (`retranslateWrunChildOverlays`, X13). Each mounted child keeps its last
|
|
12
|
-
* unresolved input beside its engine config for exactly that.
|
|
12
|
+
* unresolved input beside its engine config for exactly that. A blank (a
|
|
13
|
+
* session flip's, a served-tier discard's) empties the engine's rows only:
|
|
14
|
+
* every seam that reads the records reads it there first and the record keeps
|
|
15
|
+
* no rows until a pass replaces it (settleBlankedChildRecords).
|
|
13
16
|
*
|
|
14
17
|
* Panels (g1): the frame translates through om-panel.util with the context
|
|
15
18
|
* this file builds (theme, the chart's price digits, the display timezone);
|
|
@@ -131,6 +134,38 @@ const ROW_BACKED_KINDS = new Set([
|
|
|
131
134
|
function overlayPresent(tc, id) {
|
|
132
135
|
return tc.metadata.some((meta) => meta.id === id);
|
|
133
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Every blank lands on the engine, never on these records: the domain-switch blank (a session flip, a symbol or an
|
|
139
|
+
* interval switch, a served-tier discard) and the refetch's wipe empty a child's engine rows by its id. A record that
|
|
140
|
+
* still held the run's rows put them back: a retranslate (a theme or a timezone switch) re-added the other session's
|
|
141
|
+
* rows on a paused Indicator, a windowed run merged into them and kept the ones outside its window, and a frame
|
|
142
|
+
* refresh read the next run's equal rows as unchanged and left the child blank. So every seam that re-adds, merges
|
|
143
|
+
* into or compares with a record's rows (a pass, a retranslate, a rescale, a prefix run's window landing) settles the
|
|
144
|
+
* records first: a child whose engine rows are empty while its record holds rows was blanked, and its record holds
|
|
145
|
+
* none (`blankedRecord`) until a pass replaces it. A replay cut only trims a record and keeps its ledger note.
|
|
146
|
+
*/
|
|
147
|
+
function settleBlankedChildRecords(tc, state) {
|
|
148
|
+
for (const [id, record] of state.children) {
|
|
149
|
+
if (record.blanked === true || record.config.tailOnly === true || record.config.data.length === 0)
|
|
150
|
+
continue;
|
|
151
|
+
const meta = tc.metadata.find((candidate) => candidate.id === id);
|
|
152
|
+
const engineRows = meta?.rawData ?? meta?.data;
|
|
153
|
+
if (Array.isArray(engineRows) && engineRows.length === 0)
|
|
154
|
+
state.children.set(id, blankedRecord(record));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/** A blanked record: its unresolved input kept (the colours and words a retranslate re-resolves), its config a fresh
|
|
158
|
+
* one without rows, so the next pass's rows always reach the engine (no rows never read as unchanged rows,
|
|
159
|
+
* sameFrameSignature). */
|
|
160
|
+
function blankedRecord(record) {
|
|
161
|
+
return { input: record.input, config: { ...record.config, data: [] }, blanked: true };
|
|
162
|
+
}
|
|
163
|
+
/** A record rebuilt from its unresolved input (a retranslate, a restore after a failed pass): a blanked one rebuilds
|
|
164
|
+
* without rows and stays blanked. */
|
|
165
|
+
function rebuiltRecord(record, ctx) {
|
|
166
|
+
const rebuilt = { input: record.input, config: childConfig(record.input, ctx) };
|
|
167
|
+
return record.blanked === true ? blankedRecord(rebuilt) : rebuilt;
|
|
168
|
+
}
|
|
134
169
|
/** The price canvases (g6: heatmap, profile and matrix children) and the
|
|
135
170
|
* batched marks drawn over the price pane like them (marks, spans, rays):
|
|
136
171
|
* no price marker, a readout registered when the config is built. */
|
|
@@ -1310,6 +1345,9 @@ function windowLandingTarget(tc, overlayId, childId) {
|
|
|
1310
1345
|
if (tc.metadata.find((meta) => meta.id === overlayId) !== state.parent) {
|
|
1311
1346
|
throw new WrunStaleLandingError(childId, 'parent');
|
|
1312
1347
|
}
|
|
1348
|
+
// A child a blank emptied holds no rows to merge the window into: the landing refuses (`child`), so the page goes
|
|
1349
|
+
// to a full run.
|
|
1350
|
+
settleBlankedChildRecords(tc, state);
|
|
1313
1351
|
const record = state.children.get(childId);
|
|
1314
1352
|
if (!isWindowRecord(record) || record.config.data.length === 0 || !overlayPresent(tc, childId)) {
|
|
1315
1353
|
throw new WrunStaleLandingError(childId, 'child');
|
|
@@ -1905,7 +1943,9 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1905
1943
|
// An unmount or newer run during an import must not resurrect children.
|
|
1906
1944
|
// A series child the run still declares in the same pane is preserved
|
|
1907
1945
|
// in place (its result is re-applied below, never re-added); one the run
|
|
1908
|
-
// dropped goes with the frames.
|
|
1946
|
+
// dropped goes with the frames. A child a blank emptied since the last
|
|
1947
|
+
// pass keeps no rows to merge into or to compare with.
|
|
1948
|
+
settleBlankedChildRecords(tc, current);
|
|
1909
1949
|
const previous = current.children;
|
|
1910
1950
|
const nextById = new Map(applying.map((entry) => [entry.config.id, entry]));
|
|
1911
1951
|
// Every frame config this run built is signed before any of it reaches the
|
|
@@ -2100,11 +2140,12 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
2100
2140
|
current.children = new Map([...current.children].filter(([id]) => preserved.has(id)));
|
|
2101
2141
|
if (active()) {
|
|
2102
2142
|
// The previous children come back through the door (their hover
|
|
2103
|
-
// rows and readouts with them), resolved against the current theme
|
|
2143
|
+
// rows and readouts with them), resolved against the current theme;
|
|
2144
|
+
// a blanked one comes back without rows.
|
|
2104
2145
|
for (const [id, mounted] of previous) {
|
|
2105
2146
|
if (preserved.has(id))
|
|
2106
2147
|
continue;
|
|
2107
|
-
const restored =
|
|
2148
|
+
const restored = rebuiltRecord(mounted, ctx);
|
|
2108
2149
|
current.children.set(id, restored);
|
|
2109
2150
|
installChild(tc, restored, ctx.theme);
|
|
2110
2151
|
}
|
|
@@ -2268,6 +2309,8 @@ export function retranslateWrunChildOverlays(tc) {
|
|
|
2268
2309
|
const parent = tc.metadata.find((meta) => meta.id === overlayId);
|
|
2269
2310
|
if (!parent || state.parent !== parent)
|
|
2270
2311
|
continue;
|
|
2312
|
+
// A child a blank emptied comes back without rows: a paused Indicator's children stay blank until Resume.
|
|
2313
|
+
settleBlankedChildRecords(tc, state);
|
|
2271
2314
|
const owner = {
|
|
2272
2315
|
state,
|
|
2273
2316
|
ctx: mountContext(tc, overlayId, parent, [...state.children.values()].map((mounted) => mounted.input), state.priceDigits, state.chartHeightPx, state.windowCell ?? false, state.planned, () => state.previews, state.formatters, state.headline),
|
|
@@ -2286,7 +2329,7 @@ export function retranslateWrunChildOverlays(tc) {
|
|
|
2286
2329
|
const mounted = owner?.state.children.get(id);
|
|
2287
2330
|
if (owner === undefined || mounted === undefined)
|
|
2288
2331
|
continue;
|
|
2289
|
-
const next =
|
|
2332
|
+
const next = rebuiltRecord(mounted, owner.ctx);
|
|
2290
2333
|
const heightHeld = (owner.state.windowCell ?? false) || owner.state.planned?.has(id) === true;
|
|
2291
2334
|
if (refreshRetranslatedChild(tc, mounted, next, owner.ctx, heightHeld)) {
|
|
2292
2335
|
refreshed.add(owner.state);
|
|
@@ -2349,6 +2392,8 @@ export function rescaleWrunHeatmapChildren(tc, overlayId, preview) {
|
|
|
2349
2392
|
const parent = tc.metadata.find((meta) => meta.id === overlayId);
|
|
2350
2393
|
if (!parent || state.parent !== parent)
|
|
2351
2394
|
return false;
|
|
2395
|
+
// The record this keeps holds no rows a blank emptied since the last pass (settleBlankedChildRecords).
|
|
2396
|
+
settleBlankedChildRecords(tc, state);
|
|
2352
2397
|
let moved = false;
|
|
2353
2398
|
for (const [id, mounted] of state.children) {
|
|
2354
2399
|
const input = mounted.input;
|
|
@@ -2371,7 +2416,7 @@ export function rescaleWrunHeatmapChildren(tc, overlayId, preview) {
|
|
|
2371
2416
|
}
|
|
2372
2417
|
}
|
|
2373
2418
|
state.children.set(id, {
|
|
2374
|
-
|
|
2419
|
+
...mounted,
|
|
2375
2420
|
config: { ...mounted.config, settings: { ...mounted.config.settings, min, max } },
|
|
2376
2421
|
});
|
|
2377
2422
|
}
|
|
@@ -36,6 +36,17 @@ export type WrunPinCatalogLookup = (candidate: WrunPinCandidate) => WrunPinCatal
|
|
|
36
36
|
export interface WrunPinCatalogPage {
|
|
37
37
|
marketSymbols?: ReadonlyArray<unknown>;
|
|
38
38
|
vetoed?: boolean;
|
|
39
|
+
/** Part of the ask went unanswered (a lost batch, a source that failed): an unlisted market there is unknown. */
|
|
40
|
+
incomplete?: boolean;
|
|
41
|
+
/** Catalog sources that failed or never answered: an unlisted market on any of them is unknown. */
|
|
42
|
+
failedSources?: readonly unknown[];
|
|
43
|
+
pendingSources?: readonly unknown[];
|
|
44
|
+
/** Exactly the identities a lost batch asked for (venues as enum ids), when the page names them. */
|
|
45
|
+
unansweredPairs?: ReadonlyArray<{
|
|
46
|
+
exchange: unknown;
|
|
47
|
+
rawSymbol?: string;
|
|
48
|
+
normalizedSymbol?: string;
|
|
49
|
+
}>;
|
|
39
50
|
}
|
|
40
51
|
/** `wrun_pin_venue_unknown`: a venue word no table maps (the venue judge's code and words). */
|
|
41
52
|
export type WrunPinRefusalCode = typeof WRUN_PIN_UNRESOLVABLE_CODE | typeof WRUN_PIN_VENUE_UNKNOWN_CODE;
|
|
@@ -116,8 +127,10 @@ export declare function wrunPinUnknownVenue(input: WrunPinInput, chartExchange?:
|
|
|
116
127
|
/**
|
|
117
128
|
* The sync lookup over one catalog answer: `asked` are the candidates the page was asked for (any other reads
|
|
118
129
|
* `undefined`, pending), `page` what `getMarketsRaw` answered (null when the ask failed: every asked candidate reads
|
|
119
|
-
* `unavailable`, as does a page vetoed at the gateway's deadline).
|
|
120
|
-
*
|
|
130
|
+
* `unavailable`, as does a page vetoed at the gateway's deadline). A candidate a partial page does not list reads
|
|
131
|
+
* `unavailable` when the page cannot vouch for it (`unknownIdsOf`), never `null`: a lost batch is no proof that a
|
|
132
|
+
* market does not exist. Rows are read raw: a hidden or retired venue still answers for a spelling written on it, as
|
|
133
|
+
* the fetch would.
|
|
121
134
|
*/
|
|
122
135
|
export declare function wrunPinCatalogLookupOf(asked: readonly WrunPinCandidate[], page: WrunPinCatalogPage | null | undefined): WrunPinCatalogLookup;
|
|
123
136
|
/**
|
|
@@ -343,15 +343,36 @@ function rowRank(category) {
|
|
|
343
343
|
const word = typeof category === 'number' ? Category[category] : category;
|
|
344
344
|
return word === 'PERPETUAL' || word === 'SPOT' ? 0 : 1;
|
|
345
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* What a partial answer leaves unknown among the candidates it does not list: nothing on a complete page; exactly the
|
|
348
|
+
* pairs a lost batch asked for when the page names them; every unlisted candidate when a source failed or the page is
|
|
349
|
+
* incomplete for a reason it does not name.
|
|
350
|
+
*/
|
|
351
|
+
function unknownIdsOf(page) {
|
|
352
|
+
if (page.failedSources?.length || page.pendingSources?.length)
|
|
353
|
+
return 'all';
|
|
354
|
+
if (page.unansweredPairs?.length) {
|
|
355
|
+
return new Set(page.unansweredPairs.map((pair) => candidateId({
|
|
356
|
+
exchange: rowVenue(pair.exchange),
|
|
357
|
+
...(pair.rawSymbol !== undefined
|
|
358
|
+
? { rawSymbol: pair.rawSymbol }
|
|
359
|
+
: { normalizedSymbol: pair.normalizedSymbol }),
|
|
360
|
+
})));
|
|
361
|
+
}
|
|
362
|
+
return page.incomplete ? 'all' : null;
|
|
363
|
+
}
|
|
346
364
|
/**
|
|
347
365
|
* The sync lookup over one catalog answer: `asked` are the candidates the page was asked for (any other reads
|
|
348
366
|
* `undefined`, pending), `page` what `getMarketsRaw` answered (null when the ask failed: every asked candidate reads
|
|
349
|
-
* `unavailable`, as does a page vetoed at the gateway's deadline).
|
|
350
|
-
*
|
|
367
|
+
* `unavailable`, as does a page vetoed at the gateway's deadline). A candidate a partial page does not list reads
|
|
368
|
+
* `unavailable` when the page cannot vouch for it (`unknownIdsOf`), never `null`: a lost batch is no proof that a
|
|
369
|
+
* market does not exist. Rows are read raw: a hidden or retired venue still answers for a spelling written on it, as
|
|
370
|
+
* the fetch would.
|
|
351
371
|
*/
|
|
352
372
|
export function wrunPinCatalogLookupOf(asked, page) {
|
|
353
373
|
const askedIds = new Set(asked.map(candidateId));
|
|
354
374
|
const failed = page === null || page === undefined || page.vetoed === true;
|
|
375
|
+
const unknown = failed ? null : unknownIdsOf(page);
|
|
355
376
|
const byId = new Map();
|
|
356
377
|
for (const entry of failed ? [] : (page.marketSymbols ?? [])) {
|
|
357
378
|
const row = entry;
|
|
@@ -375,7 +396,10 @@ export function wrunPinCatalogLookupOf(asked, page) {
|
|
|
375
396
|
return undefined;
|
|
376
397
|
if (failed)
|
|
377
398
|
return 'unavailable';
|
|
378
|
-
|
|
399
|
+
const row = byId.get(id)?.row;
|
|
400
|
+
if (row)
|
|
401
|
+
return row;
|
|
402
|
+
return unknown === 'all' || unknown?.has(id) ? 'unavailable' : null;
|
|
379
403
|
};
|
|
380
404
|
}
|
|
381
405
|
/** The pin as its note names it: what the setting or the sheet wrote. */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { GateProvider } from '../../workers/constants/socket-slots.js';
|
|
1
2
|
import { type WrunFailureBaseCause, type WrunFailureCause } from './wrun-failure-cause.js';
|
|
2
3
|
import { WRUN_KIT_REFUSAL_STAGES, wrunKitRefusalStageOf, type WrunFrameRefusal, type WrunKitRefusalStage } from './wrun-hosted-wire-caps.js';
|
|
3
4
|
export type WrunRefusalClass = 'legs-empty' | 'feed-missing' | 'no-options' | 'coin-outside-feed' | 'interval-unserved' | 'service-no-answer' | 'waiting' | 'cme-wall' | 'pin-refused' | 'index-unserved' | 'too-big' | 'live-stopped' | 'not-reached' | 'nothing-ready' | 'slots' | 'not-added' | 'run-failed' | 'options-stopped';
|
|
4
|
-
/** A gate plane a take-back names
|
|
5
|
-
export type WrunRefusalGatePlane =
|
|
5
|
+
/** A gate plane a take-back names: every plane with a one-session latch (CME, OPRA, the US stocks tape). */
|
|
6
|
+
export type WrunRefusalGatePlane = GateProvider;
|
|
6
7
|
/**
|
|
7
8
|
* Why an options lane stopped although its data exists: the reason the point that stopped it already knows,
|
|
8
9
|
* carried as this word to the one place the chip is chosen (the `options-stopped` class, one variant per word).
|
|
@@ -262,6 +262,28 @@ const VARIANTS = {
|
|
|
262
262
|
// The same wall on US options data (OPRA): a package that is not one of OpenMarket's own reads no OPRA chain
|
|
263
263
|
// (product decision 2026-10-14), whatever chart it runs on.
|
|
264
264
|
opra: row('wrun.refusal.sentence.opraWall', 'wrun.refusal.chip.opraWall', [], { severity: 'paused' }),
|
|
265
|
+
// CME user studies (the `cme-user-scripts` gate, kscript-venue-policy.util `isCmeUserScriptRun`): a hosted (Cloud)
|
|
266
|
+
// run on CME, which the gate never opens (CME chart studies run in the browser).
|
|
267
|
+
cloud: row('wrun.refusal.sentence.cmeCloud', 'wrun.refusal.chip.cmeCloud', [], { severity: 'paused' }),
|
|
268
|
+
// A running study the gate stopped in place when the viewer's access moved (the account, the CME data terms, the
|
|
269
|
+
// served access, the session): its source and settings stay.
|
|
270
|
+
stopped: row('wrun.refusal.sentence.cmeStudyStopped', 'wrun.refusal.chip.cmeStudyStopped', [], {
|
|
271
|
+
severity: 'paused',
|
|
272
|
+
}),
|
|
273
|
+
// A running study the gate stopped in place when the `cme-user-scripts` flag went dark: its source and settings
|
|
274
|
+
// stay.
|
|
275
|
+
'studies-off': row('wrun.refusal.sentence.cmeStudiesOff', 'wrun.refusal.chip.cmeStudiesOff', [], {
|
|
276
|
+
severity: 'paused',
|
|
277
|
+
}),
|
|
278
|
+
// A strategy sheet on a CME chart, whoever wrote it (Kyle 2026-10-29): strategy testing is no CME chart study, so
|
|
279
|
+
// the run head refuses it before any fetch (wrun-overlay-run.util, `WrunStrategyVenueBlockedError`).
|
|
280
|
+
strategy: row('wrun.refusal.sentence.cmeStrategy', 'wrun.refusal.chip.cmeStrategy', [], { severity: 'paused' }),
|
|
281
|
+
// A sheet with an input read by the chart's coin on a prediction market (Kyle 2026-10-29): the run head refuses it
|
|
282
|
+
// before any fetch (wrun-overlay-run.util, `WrunPredictionMarketBlockedError`; the rule is
|
|
283
|
+
// wrun-input-requirements.leaf `wrunPredictionMarketWalls`).
|
|
284
|
+
prediction: row('wrun.refusal.sentence.predictionWall', 'wrun.refusal.chip.predictionWall', [], {
|
|
285
|
+
severity: 'paused',
|
|
286
|
+
}),
|
|
265
287
|
},
|
|
266
288
|
'pin-refused': {
|
|
267
289
|
default: row('wrun.refusal.sentence.pinRefused', 'wrun.refusal.chip.pinRefused', ['pin'], { severity: 'paused' }),
|
|
@@ -72,6 +72,32 @@ export declare class WrunVenueBlockedError extends WrunRegistryAddRefusedError {
|
|
|
72
72
|
constructor(message: string);
|
|
73
73
|
}
|
|
74
74
|
export declare function isWrunVenueBlockedError(error: unknown): error is WrunVenueBlockedError;
|
|
75
|
+
/** Thrown at the head of the WRUN run pass for a strategy sheet on a CME
|
|
76
|
+
* chart: strategy testing is no CME chart study, so every strategy is
|
|
77
|
+
* refused there, an OpenMarket package's included (Kyle 2026-10-29),
|
|
78
|
+
* before anything is fetched or computed. A venue refusal like the wall's
|
|
79
|
+
* (the venue policy's own message, so the kScript error envelope reads
|
|
80
|
+
* VENUE_BLOCKED, and the same held settle: the run after the chart leaves
|
|
81
|
+
* CME computes), with one difference: no wall painter stands behind it (the
|
|
82
|
+
* display wall admits the overlay), so the run pass projects its own record
|
|
83
|
+
* (`cme-wall`, variant `strategy`, which the raiser attaches) on the
|
|
84
|
+
* legend, and the editor's Run reads the same record. */
|
|
85
|
+
export declare class WrunStrategyVenueBlockedError extends WrunVenueBlockedError {
|
|
86
|
+
constructor(message: string);
|
|
87
|
+
}
|
|
88
|
+
export declare function isWrunStrategyVenueBlockedError(error: unknown): error is WrunStrategyVenueBlockedError;
|
|
89
|
+
/** Thrown at the head of the WRUN run pass for a sheet with an input read
|
|
90
|
+
* by the chart's coin on a prediction market (Polymarket, HIP4: the rule is
|
|
91
|
+
* wrun-input-requirements.leaf `wrunPredictionMarketWalls`), before anything
|
|
92
|
+
* is fetched or computed: the odds of an outcome follow no coin, so the
|
|
93
|
+
* coin's options or flows would draw another market. A venue refusal like
|
|
94
|
+
* the strategy one (the same held settle: the run after the chart leaves the
|
|
95
|
+
* prediction market computes), and like it no wall painter stands behind it,
|
|
96
|
+
* so the run pass projects its own record (`cme-wall`, variant `prediction`,
|
|
97
|
+
* which the raiser attaches). */
|
|
98
|
+
export declare class WrunPredictionMarketBlockedError extends WrunVenueBlockedError {
|
|
99
|
+
constructor(message: string);
|
|
100
|
+
}
|
|
75
101
|
/** The run head refused because the overlay is paused or its execution guard
|
|
76
102
|
* tripped. Silent like the venue wall: the legend already shows the Paused
|
|
77
103
|
* state, so no caller adds a chip or a toast, the driver stays registered,
|
|
@@ -90,6 +90,40 @@ export class WrunVenueBlockedError extends WrunRegistryAddRefusedError {
|
|
|
90
90
|
export function isWrunVenueBlockedError(error) {
|
|
91
91
|
return error instanceof WrunVenueBlockedError;
|
|
92
92
|
}
|
|
93
|
+
/** Thrown at the head of the WRUN run pass for a strategy sheet on a CME
|
|
94
|
+
* chart: strategy testing is no CME chart study, so every strategy is
|
|
95
|
+
* refused there, an OpenMarket package's included (Kyle 2026-10-29),
|
|
96
|
+
* before anything is fetched or computed. A venue refusal like the wall's
|
|
97
|
+
* (the venue policy's own message, so the kScript error envelope reads
|
|
98
|
+
* VENUE_BLOCKED, and the same held settle: the run after the chart leaves
|
|
99
|
+
* CME computes), with one difference: no wall painter stands behind it (the
|
|
100
|
+
* display wall admits the overlay), so the run pass projects its own record
|
|
101
|
+
* (`cme-wall`, variant `strategy`, which the raiser attaches) on the
|
|
102
|
+
* legend, and the editor's Run reads the same record. */
|
|
103
|
+
export class WrunStrategyVenueBlockedError extends WrunVenueBlockedError {
|
|
104
|
+
constructor(message) {
|
|
105
|
+
super(message);
|
|
106
|
+
this.name = 'WrunStrategyVenueBlockedError';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export function isWrunStrategyVenueBlockedError(error) {
|
|
110
|
+
return error instanceof WrunStrategyVenueBlockedError;
|
|
111
|
+
}
|
|
112
|
+
/** Thrown at the head of the WRUN run pass for a sheet with an input read
|
|
113
|
+
* by the chart's coin on a prediction market (Polymarket, HIP4: the rule is
|
|
114
|
+
* wrun-input-requirements.leaf `wrunPredictionMarketWalls`), before anything
|
|
115
|
+
* is fetched or computed: the odds of an outcome follow no coin, so the
|
|
116
|
+
* coin's options or flows would draw another market. A venue refusal like
|
|
117
|
+
* the strategy one (the same held settle: the run after the chart leaves the
|
|
118
|
+
* prediction market computes), and like it no wall painter stands behind it,
|
|
119
|
+
* so the run pass projects its own record (`cme-wall`, variant `prediction`,
|
|
120
|
+
* which the raiser attaches). */
|
|
121
|
+
export class WrunPredictionMarketBlockedError extends WrunVenueBlockedError {
|
|
122
|
+
constructor(message) {
|
|
123
|
+
super(message);
|
|
124
|
+
this.name = 'WrunPredictionMarketBlockedError';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
93
127
|
/** The run head refused because the overlay is paused or its execution guard
|
|
94
128
|
* tripped. Silent like the venue wall: the legend already shows the Paused
|
|
95
129
|
* state, so no caller adds a chip or a toast, the driver stays registered,
|
|
@@ -393,8 +393,9 @@ async function stepWrunReplayLane(lane) {
|
|
|
393
393
|
let ohlcvRows;
|
|
394
394
|
if (runSession && record.runBars) {
|
|
395
395
|
// The run bars as of the cutoff: the closed ones as fetched, the forming
|
|
396
|
-
// one folded from the completed chart bars in its
|
|
397
|
-
|
|
396
|
+
// one folded again from the completed chart bars in its span (a step
|
|
397
|
+
// forward and a seek back alike), each span on the run's calendar.
|
|
398
|
+
runSession.rows = runUtil.wrunReplayRunBars(record.runBars, replayed, target, runSession.run, record.chartIntervalMs);
|
|
398
399
|
ohlcvRows = runIntervalSession.wrunRunIntervalComputeRows(runSession.run, runSession.rows, target + record.chartIntervalMs);
|
|
399
400
|
}
|
|
400
401
|
else {
|
|
@@ -33,7 +33,7 @@ export declare const WRUN_RUN_INTERVAL_ROWS_KEY = "run-interval|main";
|
|
|
33
33
|
export interface WrunRunIntervalSession {
|
|
34
34
|
/** The run interval the session computes at, as the full run read it. */
|
|
35
35
|
run: WrunRunInterval;
|
|
36
|
-
/** Identity of the run bars (wrunRunIntervalCoverageKey): the run interval
|
|
36
|
+
/** Identity of the run bars (wrunRunIntervalCoverageKey): the run interval, the chart market, the session. */
|
|
37
37
|
key: string;
|
|
38
38
|
/** The chart's own interval in ms (the chart clock beside the run clock). */
|
|
39
39
|
chartIntervalMs: number;
|
|
@@ -66,12 +66,26 @@ export declare function wrunRunIntervalSessionOf(context: object | undefined): W
|
|
|
66
66
|
/** The run interval in ms the overlay's live session computes at, undefined when it computes on
|
|
67
67
|
* the chart's bars (or holds no session): the bucket a rider's rows are floored on. */
|
|
68
68
|
export declare function wrunLiveRunIntervalMs(indicatorId: string): number | undefined;
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
|
|
69
|
+
/** Whether the chart's candle lane fetches `intervalMs` bars on a session filter, its `tradingHour`
|
|
70
|
+
* following the chart's session (candle-trading-hour.util): regular hours on a US listing unless it
|
|
71
|
+
* opted into extended hours, RTH on a CME chart in RTH at an intraday interval. */
|
|
72
|
+
export declare function wrunBarsSessionFiltered(market: {
|
|
73
|
+
exchange?: unknown;
|
|
74
|
+
symbol?: unknown;
|
|
75
|
+
sessionType?: unknown;
|
|
76
|
+
} | null | undefined, intervalMs: unknown): boolean;
|
|
77
|
+
/** The identity of the run bars a session holds: the run interval, the chart market they were
|
|
78
|
+
* fetched for (exchange, symbol, transformations) and the session their ask resolved, never the
|
|
79
|
+
* chart's own interval. The run bars ride the chart's candle lane at the RUN interval: on a session
|
|
80
|
+
* filter there (wrunBarsSessionFiltered) the key ends in `regular`, so a session flip re-keys the
|
|
81
|
+
* bars and the next full run refetches them, never computing on the other session's bars while the
|
|
82
|
+
* intake folds the new session's frames on another lattice. Every other key (a crypto run, an ETH
|
|
83
|
+
* run, a CME run at 1D or coarser) names no session: the flip changes none of those bars. */
|
|
84
|
+
export declare function wrunRunIntervalCoverageKey(run: Pick<OverlayRunInterval, 'interval' | 'intervalMs'>, market: {
|
|
72
85
|
exchange?: unknown;
|
|
73
86
|
symbol?: unknown;
|
|
74
87
|
transformations?: unknown;
|
|
88
|
+
sessionType?: unknown;
|
|
75
89
|
} | null | undefined): string;
|
|
76
90
|
/** The run bars open at or before the chart's newest bar: a frame or an answer may hold the next
|
|
77
91
|
* bucket before the chart shows a bar in it. A bar opens at its stamp, on the session lattice at
|
|
@@ -111,7 +125,7 @@ export interface WrunRunIntervalRowsPlan {
|
|
|
111
125
|
/**
|
|
112
126
|
* Which run bars one full run computes over (run-interval-engine.util's planRunIntervalRefresh
|
|
113
127
|
* rule, on the session's buffer): the previous session's run bars when they are the same run
|
|
114
|
-
* interval on the same market (`key`), were asked from at or before the warm-up the chart's first
|
|
128
|
+
* interval on the same market and session (`key`), were asked from at or before the warm-up the chart's first
|
|
115
129
|
* bar needs (`warmupBars` run bars below the run bar holding it), hold the run bar of the chart's
|
|
116
130
|
* newest bar (one still open there: its close past it) and hold no bar stamped past their coverage
|
|
117
131
|
* (the ask windows' end, read on stamps; the intake extends the forming bar it opened at the
|
|
@@ -119,7 +133,7 @@ export interface WrunRunIntervalRowsPlan {
|
|
|
119
133
|
* no answer filled); else a fetch from that warm-up start. Without the warm-up term, consecutive
|
|
120
134
|
* prepended pages would erode the warm-up toward zero run bars. Every full run passes here (a lazy
|
|
121
135
|
* page, a settings save, a live rebuild), so a style edit or a pan inside the held warm-up reuses
|
|
122
|
-
* the bars while another timeframe (a new key) or a raised lookback (an earlier start) refetches.
|
|
136
|
+
* the bars while another timeframe or session (a new key) or a raised lookback (an earlier start) refetches.
|
|
123
137
|
* The live reconcile right after the run refreshes the newest run bars either way.
|
|
124
138
|
*/
|
|
125
139
|
export declare function planWrunRunIntervalRows(input: {
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
* with the one it was built for), like the session's chart names (wrun-chart-context-names.util).
|
|
25
25
|
*/
|
|
26
26
|
import { runBarSpan } from '../chart/indicator-run-interval.util.js';
|
|
27
|
+
import { isChartRthActive } from '../chart/rth-session.util.js';
|
|
27
28
|
import { runIntervalWarmupStartTs } from '../chart/run-interval-warmup.leaf.js';
|
|
29
|
+
import { isEquityRegularSessionGated } from '../chart/us-equities-session.util.js';
|
|
28
30
|
import { getWrunOverlayLiveContext } from './wrun-overlay-drivers.util.js';
|
|
29
31
|
/** The intake queue key the chart market's candle frames ride for a session at another interval
|
|
30
32
|
* (beside the grid legs' queues, never a leg's fetch key). */
|
|
@@ -43,12 +45,25 @@ export function wrunRunIntervalSessionOf(context) {
|
|
|
43
45
|
export function wrunLiveRunIntervalMs(indicatorId) {
|
|
44
46
|
return wrunRunIntervalSessionOf(getWrunOverlayLiveContext(indicatorId))?.run.intervalMs;
|
|
45
47
|
}
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
+
/** Whether the chart's candle lane fetches `intervalMs` bars on a session filter, its `tradingHour`
|
|
49
|
+
* following the chart's session (candle-trading-hour.util): regular hours on a US listing unless it
|
|
50
|
+
* opted into extended hours, RTH on a CME chart in RTH at an intraday interval. */
|
|
51
|
+
export function wrunBarsSessionFiltered(market, intervalMs) {
|
|
52
|
+
return (isEquityRegularSessionGated(market?.exchange, market?.sessionType) ||
|
|
53
|
+
isChartRthActive(market?.exchange, market?.symbol, market?.sessionType, intervalMs));
|
|
54
|
+
}
|
|
55
|
+
/** The identity of the run bars a session holds: the run interval, the chart market they were
|
|
56
|
+
* fetched for (exchange, symbol, transformations) and the session their ask resolved, never the
|
|
57
|
+
* chart's own interval. The run bars ride the chart's candle lane at the RUN interval: on a session
|
|
58
|
+
* filter there (wrunBarsSessionFiltered) the key ends in `regular`, so a session flip re-keys the
|
|
59
|
+
* bars and the next full run refetches them, never computing on the other session's bars while the
|
|
60
|
+
* intake folds the new session's frames on another lattice. Every other key (a crypto run, an ETH
|
|
61
|
+
* run, a CME run at 1D or coarser) names no session: the flip changes none of those bars. */
|
|
48
62
|
export function wrunRunIntervalCoverageKey(run, market) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
63
|
+
const parts = [run.interval, market?.exchange, market?.symbol, market?.transformations];
|
|
64
|
+
if (wrunBarsSessionFiltered(market, run.intervalMs))
|
|
65
|
+
parts.push('regular');
|
|
66
|
+
return parts.map((part) => (part === undefined || part === null ? '' : String(part))).join('|');
|
|
52
67
|
}
|
|
53
68
|
/** The run bars open at or before the chart's newest bar: a frame or an answer may hold the next
|
|
54
69
|
* bucket before the chart shows a bar in it. A bar opens at its stamp, on the session lattice at
|
|
@@ -82,7 +97,7 @@ export function wrunRunIntervalSentRow(row) {
|
|
|
82
97
|
/**
|
|
83
98
|
* Which run bars one full run computes over (run-interval-engine.util's planRunIntervalRefresh
|
|
84
99
|
* rule, on the session's buffer): the previous session's run bars when they are the same run
|
|
85
|
-
* interval on the same market (`key`), were asked from at or before the warm-up the chart's first
|
|
100
|
+
* interval on the same market and session (`key`), were asked from at or before the warm-up the chart's first
|
|
86
101
|
* bar needs (`warmupBars` run bars below the run bar holding it), hold the run bar of the chart's
|
|
87
102
|
* newest bar (one still open there: its close past it) and hold no bar stamped past their coverage
|
|
88
103
|
* (the ask windows' end, read on stamps; the intake extends the forming bar it opened at the
|
|
@@ -90,7 +105,7 @@ export function wrunRunIntervalSentRow(row) {
|
|
|
90
105
|
* no answer filled); else a fetch from that warm-up start. Without the warm-up term, consecutive
|
|
91
106
|
* prepended pages would erode the warm-up toward zero run bars. Every full run passes here (a lazy
|
|
92
107
|
* page, a settings save, a live rebuild), so a style edit or a pan inside the held warm-up reuses
|
|
93
|
-
* the bars while another timeframe (a new key) or a raised lookback (an earlier start) refetches.
|
|
108
|
+
* the bars while another timeframe or session (a new key) or a raised lookback (an earlier start) refetches.
|
|
94
109
|
* The live reconcile right after the run refreshes the newest run bars either way.
|
|
95
110
|
*/
|
|
96
111
|
export function planWrunRunIntervalRows(input) {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type OverlayRunInterval } from '../chart/indicator-run-interval.util.js';
|
|
2
|
+
/** The chart's session fields a replaying chart's session market reads (isWrunRunIntervalSessionMarket). */
|
|
3
|
+
export interface WrunChartSessionFields {
|
|
4
|
+
symbol?: unknown;
|
|
5
|
+
sessionType?: unknown;
|
|
6
|
+
}
|
|
2
7
|
/** The param a twin selects its timeframe with, and the one that says whether to wait for closes. */
|
|
3
8
|
export declare const WRUN_TIMEFRAME_PARAM = "timeframe";
|
|
4
9
|
export declare const WRUN_WAIT_FOR_CLOSE_PARAM = "wait_for_close";
|
|
@@ -37,7 +42,7 @@ export interface WrunRunIntervalInput {
|
|
|
37
42
|
settings: unknown;
|
|
38
43
|
/** The chart's interval, as a key ("5m") or milliseconds. */
|
|
39
44
|
chartInterval: unknown;
|
|
40
|
-
/** Market replay keeps the package's own path. */
|
|
45
|
+
/** Market replay keeps the package's own path, except on a session market (`sessionMarket`). */
|
|
41
46
|
replay?: boolean;
|
|
42
47
|
/** An index-mode chart (forex, equities, DEX) keeps the package's own path. */
|
|
43
48
|
indexMode?: boolean;
|
|
@@ -48,6 +53,12 @@ export interface WrunRunIntervalInput {
|
|
|
48
53
|
* the session lattice: OverlayRunInterval.sessionLattice).
|
|
49
54
|
*/
|
|
50
55
|
unsupportedMarket?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The chart's market rides a session calendar (isWrunRunIntervalSessionMarket): its run bars are
|
|
58
|
+
* no fold of the epoch grid the package's own resampler keys, so market replay runs at the run
|
|
59
|
+
* interval there too, on the run bars the live run computes over.
|
|
60
|
+
*/
|
|
61
|
+
sessionMarket?: boolean;
|
|
51
62
|
}
|
|
52
63
|
/** The label of the timeframe option a twin's settings select: through its persisted select's
|
|
53
64
|
* `optionLabels`, else the twins' fixed list. Undefined when unreadable. */
|
|
@@ -70,9 +81,10 @@ export declare function wrunWaitsForClose(settings: unknown): boolean;
|
|
|
70
81
|
/**
|
|
71
82
|
* The interval a wrun overlay's package runs at when it is coarser than the chart's, else null (the
|
|
72
83
|
* package runs on the chart's bars, as before): a proven twin listed in WRUN_RUN_INTERVAL_TWINS,
|
|
73
|
-
* off
|
|
74
|
-
*
|
|
75
|
-
* is the chart's own
|
|
84
|
+
* off index mode and the markets one candle ask cannot serve (`unsupportedMarket`), live or in
|
|
85
|
+
* replay on a session market (`sessionMarket`, the live run's bars), whose timeframe selects an
|
|
86
|
+
* interval coarser than the chart. A selection at or below the chart's interval is the chart's own
|
|
87
|
+
* (wrunTimeframeIsChartOrFiner).
|
|
76
88
|
*/
|
|
77
89
|
export declare function resolveWrunRunInterval(input: WrunRunIntervalInput): WrunRunInterval | null;
|
|
78
90
|
/** Whether one candle ask at the chart's venue and symbol cannot stand in for the chart's own series
|
|
@@ -81,16 +93,36 @@ export declare function resolveWrunRunInterval(input: WrunRunIntervalInput): Wru
|
|
|
81
93
|
* (isRunIntervalUnsupportedMarket), a CME-family venue is supported: its run bars are read on the
|
|
82
94
|
* session lattice. */
|
|
83
95
|
export declare function isWrunRunIntervalUnsupportedMarket(exchange: string | undefined, transformations: string | null | undefined): boolean;
|
|
96
|
+
/**
|
|
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 the CME session lattice
|
|
99
|
+
* (isCmeSessionLatticeExchange: its 4h bars on the 17:00 Chicago lattice), or a chart whose own bars
|
|
100
|
+
* ride a session filter (wrunBarsSessionFiltered at the chart's interval: RTH on a CME chart, where
|
|
101
|
+
* a run bar above 30m is anchored on the session open and a 1D run bar holds the whole session).
|
|
102
|
+
*/
|
|
103
|
+
export declare function isWrunRunIntervalSessionMarket(exchange: string | undefined, chart: WrunChartSessionFields | null | undefined, chartInterval: unknown): boolean;
|
|
84
104
|
/**
|
|
85
105
|
* The run interval of one mounted wrun overlay: its settings against the chart's interval, venue,
|
|
86
|
-
* series (`chartTransformations`, a formula chart's legs)
|
|
106
|
+
* series (`chartTransformations`, a formula chart's legs), session (`chartMarket`: the symbol and the
|
|
107
|
+
* session type a replaying chart's session market reads) and replay state. `chartExchange` is the
|
|
87
108
|
* chart's venue; omitted, the overlay's own `settings.exchange` stands in. A venue that rides the CME
|
|
88
109
|
* session lattice (CME, CBOT, NYMEX, COMEX: isCmeSessionLatticeExchange, the rule the chart's own
|
|
89
|
-
* live bars and the run bars' live fold key on) stamps the run `sessionLattice`.
|
|
110
|
+
* live bars and the run bars' live fold key on) stamps the run `sessionLattice`. The same question
|
|
111
|
+
* with replay off is liveOverlayWrunRunInterval.
|
|
90
112
|
*/
|
|
91
113
|
export declare function overlayWrunRunInterval(chartIndex: number, overlay: {
|
|
92
114
|
settings?: unknown;
|
|
93
|
-
} | null | undefined, chartInterval: unknown, chartExchange?: string | null, chartTransformations?: string | null): WrunRunInterval | null;
|
|
115
|
+
} | null | undefined, chartInterval: unknown, chartExchange?: string | null, chartTransformations?: string | null, chartMarket?: WrunChartSessionFields | null): WrunRunInterval | null;
|
|
116
|
+
/**
|
|
117
|
+
* The run interval of one mounted wrun overlay as a live run computes it, whatever the chart's replay:
|
|
118
|
+
* overlayWrunRunInterval's settings, venue, series and session with replay off. The alerts engine
|
|
119
|
+
* evaluates live, so an Indicator arm made while its chart replays reads what live reads
|
|
120
|
+
* (alert-overlay-target `runsAtOwnTimeframe`), where the replay run keeps the package's own path off a
|
|
121
|
+
* session market.
|
|
122
|
+
*/
|
|
123
|
+
export declare function liveOverlayWrunRunInterval(overlay: {
|
|
124
|
+
settings?: unknown;
|
|
125
|
+
} | null | undefined, chartInterval: unknown, chartExchange?: string | null, chartTransformations?: string | null, chartMarket?: WrunChartSessionFields | null): WrunRunInterval | null;
|
|
94
126
|
/**
|
|
95
127
|
* The settings a run at another interval sends the package: the twin's `timeframe` forced to its
|
|
96
128
|
* chart option, on a copy. Only the values the package computes with (the init args); the
|