backtest-kit 9.8.0 → 9.8.2

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.
Files changed (6) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1893 -1871
  3. package/build/index.cjs +740 -259
  4. package/build/index.mjs +739 -260
  5. package/package.json +86 -86
  6. package/types.d.ts +218 -25
package/package.json CHANGED
@@ -1,86 +1,86 @@
1
- {
2
- "name": "backtest-kit",
3
- "version": "9.8.0",
4
- "description": "A TypeScript library for trading system backtest",
5
- "author": {
6
- "name": "Petr Tripolsky",
7
- "email": "tripolskypetr@gmail.com",
8
- "url": "https://github.com/tripolskypetr"
9
- },
10
- "funding": {
11
- "type": "individual",
12
- "url": "http://paypal.me/tripolskypetr"
13
- },
14
- "license": "MIT",
15
- "homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
16
- "keywords": [
17
- "backtesting",
18
- "backtest",
19
- "finance",
20
- "trading",
21
- "candles",
22
- "indicators",
23
- "multi value",
24
- "multi symbol",
25
- "framework"
26
- ],
27
- "files": [
28
- "build",
29
- "types.d.ts",
30
- "README.md"
31
- ],
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/tripolskypetr/backtest-kit",
35
- "documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
36
- },
37
- "bugs": {
38
- "url": "https://github.com/tripolskypetr/backtest-kit/issues"
39
- },
40
- "scripts": {
41
- "build": "rollup -c",
42
- "test": "npm run build && node ./test/index.mjs",
43
- "build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
44
- "docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
45
- "docs:uml": "npm run build && node ./scripts/uml.mjs",
46
- "docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
47
- "repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
48
- },
49
- "main": "build/index.cjs",
50
- "module": "build/index.mjs",
51
- "source": "src/index.ts",
52
- "types": "./types.d.ts",
53
- "exports": {
54
- "require": "./build/index.cjs",
55
- "types": "./types.d.ts",
56
- "import": "./build/index.mjs",
57
- "default": "./build/index.cjs"
58
- },
59
- "devDependencies": {
60
- "@rollup/plugin-typescript": "11.1.6",
61
- "@types/node": "22.9.0",
62
- "glob": "11.0.1",
63
- "plantuml": "0.0.2",
64
- "rimraf": "6.0.1",
65
- "rollup": "3.29.5",
66
- "rollup-plugin-dts": "6.1.1",
67
- "rollup-plugin-peer-deps-external": "2.2.4",
68
- "ts-morph": "27.0.2",
69
- "tslib": "2.7.0",
70
- "typedoc": "0.27.9",
71
- "worker-testbed": "2.0.0"
72
- },
73
- "peerDependencies": {
74
- "typescript": "^5.0.0"
75
- },
76
- "dependencies": {
77
- "di-kit": "^1.1.1",
78
- "di-scoped": "^1.0.21",
79
- "di-singleton": "^1.0.5",
80
- "functools-kit": "^2.3.0",
81
- "get-moment-stamp": "^1.1.2"
82
- },
83
- "publishConfig": {
84
- "access": "public"
85
- }
86
- }
1
+ {
2
+ "name": "backtest-kit",
3
+ "version": "9.8.2",
4
+ "description": "A TypeScript library for trading system backtest",
5
+ "author": {
6
+ "name": "Petr Tripolsky",
7
+ "email": "tripolskypetr@gmail.com",
8
+ "url": "https://github.com/tripolskypetr"
9
+ },
10
+ "funding": {
11
+ "type": "individual",
12
+ "url": "http://paypal.me/tripolskypetr"
13
+ },
14
+ "license": "MIT",
15
+ "homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
16
+ "keywords": [
17
+ "backtesting",
18
+ "backtest",
19
+ "finance",
20
+ "trading",
21
+ "candles",
22
+ "indicators",
23
+ "multi value",
24
+ "multi symbol",
25
+ "framework"
26
+ ],
27
+ "files": [
28
+ "build",
29
+ "types.d.ts",
30
+ "README.md"
31
+ ],
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/tripolskypetr/backtest-kit",
35
+ "documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/tripolskypetr/backtest-kit/issues"
39
+ },
40
+ "scripts": {
41
+ "build": "rollup -c",
42
+ "test": "npm run build && node ./test/index.mjs",
43
+ "build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
44
+ "docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
45
+ "docs:uml": "npm run build && node ./scripts/uml.mjs",
46
+ "docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
47
+ "repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
48
+ },
49
+ "main": "build/index.cjs",
50
+ "module": "build/index.mjs",
51
+ "source": "src/index.ts",
52
+ "types": "./types.d.ts",
53
+ "exports": {
54
+ "require": "./build/index.cjs",
55
+ "types": "./types.d.ts",
56
+ "import": "./build/index.mjs",
57
+ "default": "./build/index.cjs"
58
+ },
59
+ "devDependencies": {
60
+ "@rollup/plugin-typescript": "11.1.6",
61
+ "@types/node": "22.9.0",
62
+ "glob": "11.0.1",
63
+ "plantuml": "0.0.2",
64
+ "rimraf": "6.0.1",
65
+ "rollup": "3.29.5",
66
+ "rollup-plugin-dts": "6.1.1",
67
+ "rollup-plugin-peer-deps-external": "2.2.4",
68
+ "ts-morph": "27.0.2",
69
+ "tslib": "2.7.0",
70
+ "typedoc": "0.27.9",
71
+ "worker-testbed": "2.0.0"
72
+ },
73
+ "peerDependencies": {
74
+ "typescript": "^5.0.0"
75
+ },
76
+ "dependencies": {
77
+ "di-kit": "^1.1.1",
78
+ "di-scoped": "^1.0.21",
79
+ "di-singleton": "^1.0.5",
80
+ "functools-kit": "^2.3.0",
81
+ "get-moment-stamp": "^1.1.2"
82
+ },
83
+ "publishConfig": {
84
+ "access": "public"
85
+ }
86
+ }
package/types.d.ts CHANGED
@@ -4393,7 +4393,7 @@ type ExchangeName = string;
4393
4393
  * Parameters for pre-caching candles into persist storage.
4394
4394
  * Used to download historical candle data before running a backtest.
4395
4395
  */
4396
- interface ICacheCandlesParams {
4396
+ interface IWarmCandlesParams {
4397
4397
  /** Trading pair symbol (e.g., "BTCUSDT") */
4398
4398
  symbol: string;
4399
4399
  /** Name of the registered exchange schema */
@@ -4421,6 +4421,17 @@ interface ICheckCandlesParams {
4421
4421
  /** End date of the validation range (inclusive) */
4422
4422
  to: Date;
4423
4423
  }
4424
+ /**
4425
+ * Parameters for the combined check-then-warm caching flow.
4426
+ * Extends both validation and pre-cache parameter sets and adds
4427
+ * lifecycle callbacks invoked before each phase of the flow.
4428
+ */
4429
+ interface ICacheCandlesParams extends IWarmCandlesParams, ICheckCandlesParams {
4430
+ /** Invoked before the cache validation phase starts */
4431
+ onWarmStart?: (symbol: string, interval: CandleInterval, from: Date, to: Date) => void;
4432
+ /** Invoked before the cache warm-up phase starts (after a validation miss) */
4433
+ onCheckStart?: (symbol: string, interval: CandleInterval, from: Date, to: Date) => void;
4434
+ }
4424
4435
  /**
4425
4436
  * Checks cached candle presence via the persist adapter.
4426
4437
  * Issues one ranged read; adapter-side `hasValue` covers each expected timestamp,
@@ -4435,7 +4446,15 @@ declare function checkCandles(params: ICheckCandlesParams): Promise<void>;
4435
4446
  *
4436
4447
  * @param params - Cache parameters
4437
4448
  */
4438
- declare function warmCandles(params: ICacheCandlesParams): Promise<void>;
4449
+ declare function warmCandles(params: IWarmCandlesParams): Promise<void>;
4450
+ /**
4451
+ * Ensures candles for the given range are present in persist storage.
4452
+ * Runs a check-then-warm pipeline with one retry: validates the cache first
4453
+ * and, on a miss, downloads the missing data and re-validates.
4454
+ *
4455
+ * @param params - Combined cache parameters with optional lifecycle callbacks
4456
+ */
4457
+ declare function cacheCandles({ symbol, interval, from, to, exchangeName, onCheckStart, onWarmStart, }: ICacheCandlesParams): Promise<void>;
4439
4458
 
4440
4459
  /**
4441
4460
  * Type alias for enum objects with string key-value pairs
@@ -6633,6 +6652,22 @@ declare const GLOBAL_CONFIG: {
6633
6652
  * Default: true (mutex locking enabled for candle fetching)
6634
6653
  */
6635
6654
  CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
6655
+ /**
6656
+ * Enables cooperative interleaving of concurrently running backtests after each candle fetch.
6657
+ *
6658
+ * Mechanism (implemented in `Candle.spinLock`):
6659
+ * - After `getNextCandles` resolves, the current backtest awaits
6660
+ * `Promise.race([_spin.toPromise(), sleep(50)])`, where `_spin` is emitted whenever
6661
+ * another caller acquires the candle-fetch mutex.
6662
+ * - This hands the event loop to a peer backtest waiting on the same mutex, so multiple
6663
+ * parallel `Backtest.run` / `Walker` workloads progress in round-robin fashion instead
6664
+ * of one monopolizing the event loop until completion.
6665
+ * - The spin is skipped entirely when `Lookup.isParallel` is `false` (single active workload —
6666
+ * no peer to yield to) or when `CC_ENABLE_CANDLE_FETCH_MUTEX` is disabled.
6667
+ *
6668
+ * Default: true (parallel backtests are interleaved on each candle fetch boundary)
6669
+ */
6670
+ CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
6636
6671
  /**
6637
6672
  * Enables DCA (Dollar-Cost Averaging) logic even if antirecord is not broken.
6638
6673
  * Allows to commitAverageBuy if currentPrice is not the lowest price since entry, but still lower than priceOpen.
@@ -6809,6 +6844,7 @@ declare function getConfig(): {
6809
6844
  CC_MAX_SIGNALS: number;
6810
6845
  CC_MAX_LOG_LINES: number;
6811
6846
  CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
6847
+ CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
6812
6848
  CC_ENABLE_DCA_EVERYWHERE: boolean;
6813
6849
  CC_ENABLE_PPPL_EVERYWHERE: boolean;
6814
6850
  CC_ENABLE_LONG_SIGNAL: boolean;
@@ -6867,6 +6903,7 @@ declare function getDefaultConfig(): Readonly<{
6867
6903
  CC_MAX_SIGNALS: number;
6868
6904
  CC_MAX_LOG_LINES: number;
6869
6905
  CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
6906
+ CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
6870
6907
  CC_ENABLE_DCA_EVERYWHERE: boolean;
6871
6908
  CC_ENABLE_PPPL_EVERYWHERE: boolean;
6872
6909
  CC_ENABLE_LONG_SIGNAL: boolean;
@@ -16682,8 +16719,17 @@ type TLogCtor = new () => Partial<ILog>;
16682
16719
  * - Convenience methods: usePersist(), useMemory(), useDummy()
16683
16720
  */
16684
16721
  declare class LogAdapter implements ILog {
16685
- /** Internal log utils instance */
16686
- private _log;
16722
+ /** Factory producing the active log utils instance */
16723
+ private _logFactory;
16724
+ /**
16725
+ * Lazily constructs the log utils from the registered factory and memoizes
16726
+ * the result via `singleshot`.
16727
+ *
16728
+ * The instance is built on the first call and cached for all subsequent calls.
16729
+ * Reset via `clear()` so the next call rebuilds from the current factory
16730
+ * (e.g. when `process.cwd()` changes between strategy iterations).
16731
+ */
16732
+ private getInstance;
16687
16733
  /**
16688
16734
  * Lists all stored log entries.
16689
16735
  * Proxies call to the underlying log adapter.
@@ -16749,7 +16795,7 @@ declare class LogAdapter implements ILog {
16749
16795
  */
16750
16796
  useJsonl: (fileName?: string, dirName?: string) => void;
16751
16797
  /**
16752
- * Clears the cached log instance by resetting to the default in-memory adapter.
16798
+ * Clears the memoized log instance.
16753
16799
  * Call this when process.cwd() changes between strategy iterations
16754
16800
  * so a new adapter instance is created with the updated base path.
16755
16801
  */
@@ -20281,6 +20327,89 @@ declare class ScheduleUtils {
20281
20327
  */
20282
20328
  declare const Schedule: ScheduleUtils;
20283
20329
 
20330
+ /**
20331
+ * Single entry tracking one in-flight backtest or live run.
20332
+ *
20333
+ * Registered into the lookup map on activity start (e.g. `INSTANCE_TASK_FN` in
20334
+ * `Backtest`/`Live`, or per-strategy loop in `WalkerLogicPrivateService`) and
20335
+ * removed on completion or failure.
20336
+ *
20337
+ * Used by `Candle.spinLock` to detect parallel workloads via {@link LookupUtils.isParallel}.
20338
+ */
20339
+ interface IActivityEntry {
20340
+ /** Trading pair symbol (e.g. `"BTCUSDT"`). */
20341
+ symbol: string;
20342
+ /** Execution context identifying the running strategy. */
20343
+ context: {
20344
+ /** Strategy schema name driving the activity. */
20345
+ strategyName: StrategyName;
20346
+ /** Exchange schema name providing market data. */
20347
+ exchangeName: ExchangeName;
20348
+ /** Frame schema name (backtest only — live runs leave this `undefined`). */
20349
+ frameName?: FrameName;
20350
+ };
20351
+ /** `true` for backtest activities, `false` for live activities. */
20352
+ backtest: boolean;
20353
+ }
20354
+ /**
20355
+ * In-memory registry of currently running backtest and live activities.
20356
+ *
20357
+ * Purpose:
20358
+ * - Each `Backtest.run` / `Live.run` / per-strategy walker iteration registers an
20359
+ * {@link IActivityEntry} on start and removes it on completion.
20360
+ * - `Candle.spinLock` consults {@link isParallel} to decide whether the event-loop
20361
+ * hand-off (post-candle-fetch spin) is worth performing. With a single active
20362
+ * workload there is no peer to yield to, so the spin is skipped entirely.
20363
+ *
20364
+ * Exposed as the `Lookup` singleton; no constructor parameters.
20365
+ *
20366
+ * @example
20367
+ * ```typescript
20368
+ * Lookup.addActivity({ symbol: "BTCUSDT", context, backtest: true });
20369
+ * try {
20370
+ * for await (const _ of run(symbol, context)) { ... }
20371
+ * } finally {
20372
+ * Lookup.removeActivity({ symbol: "BTCUSDT", context, backtest: true });
20373
+ * }
20374
+ * ```
20375
+ */
20376
+ declare class LookupUtils {
20377
+ /** Active entries keyed by their composite {@link Key}. */
20378
+ private readonly _lookupMap;
20379
+ /**
20380
+ * `true` when more than one activity is currently registered.
20381
+ * Used by `Candle.spinLock` to decide whether yielding the event loop is useful.
20382
+ */
20383
+ get isParallel(): boolean;
20384
+ /**
20385
+ * Registers a backtest or live activity in the lookup map.
20386
+ * Idempotent for identical keys — duplicate calls overwrite the existing entry.
20387
+ *
20388
+ * @param activity - Activity descriptor identifying the running workload.
20389
+ */
20390
+ addActivity: (activity: IActivityEntry) => void;
20391
+ /**
20392
+ * Removes a previously registered activity from the lookup map.
20393
+ * Must be paired with a prior {@link addActivity}, typically in a `finally` block,
20394
+ * so a thrown error in the underlying run does not leave a stale entry behind.
20395
+ *
20396
+ * @param activity - Activity descriptor matching the one passed to {@link addActivity}.
20397
+ */
20398
+ removeActivity: (activity: IActivityEntry) => void;
20399
+ /**
20400
+ * Returns a snapshot of currently active entries.
20401
+ *
20402
+ * @returns Array of all activities present in the lookup map at call time.
20403
+ */
20404
+ listActivity: () => IActivityEntry[];
20405
+ }
20406
+ /**
20407
+ * Process-wide singleton instance of {@link LookupUtils}.
20408
+ * Imported by `Backtest`, `Live`, `WalkerLogicPrivateService` (registration sites)
20409
+ * and by `Candle` (read-only consumer via `isParallel`).
20410
+ */
20411
+ declare const Lookup: LookupUtils;
20412
+
20284
20413
  /**
20285
20414
  * Type alias for column configuration used in performance metrics markdown reports.
20286
20415
  *
@@ -23668,8 +23797,16 @@ type TStorageUtilsCtor = new () => IStorageUtils;
23668
23797
  * - Convenience methods: usePersist(), useMemory(), useDummy()
23669
23798
  */
23670
23799
  declare class StorageBacktestAdapter implements IStorageUtils {
23671
- /** Internal storage utils instance */
23672
- private _signalBacktestUtils;
23800
+ /** Factory producing the active storage utils instance */
23801
+ private _signalBacktestFactory;
23802
+ /**
23803
+ * Lazily constructs the storage utils from the registered factory and memoizes
23804
+ * the result via `singleshot`.
23805
+ *
23806
+ * The instance is built on the first call and cached for all subsequent calls.
23807
+ * Reset via `clear()` so the next call rebuilds from the current factory.
23808
+ */
23809
+ private getInstance;
23673
23810
  /**
23674
23811
  * Handles signal opened event.
23675
23812
  * Proxies call to the underlying storage adapter.
@@ -23732,7 +23869,7 @@ declare class StorageBacktestAdapter implements IStorageUtils {
23732
23869
  */
23733
23870
  useMemory: () => void;
23734
23871
  /**
23735
- * Clears the cached utils instance by resetting to the default in-memory adapter.
23872
+ * Clears the memoized utils instance.
23736
23873
  * Call this when process.cwd() changes between strategy iterations
23737
23874
  * so a new instance is created with the updated base path.
23738
23875
  */
@@ -23748,8 +23885,16 @@ declare class StorageBacktestAdapter implements IStorageUtils {
23748
23885
  * - Convenience methods: usePersist(), useMemory(), useDummy()
23749
23886
  */
23750
23887
  declare class StorageLiveAdapter implements IStorageUtils {
23751
- /** Internal storage utils instance */
23752
- private _signalLiveUtils;
23888
+ /** Factory producing the active storage utils instance */
23889
+ private _signalLiveFactory;
23890
+ /**
23891
+ * Lazily constructs the storage utils from the registered factory and memoizes
23892
+ * the result via `singleshot`.
23893
+ *
23894
+ * The instance is built on the first call and cached for all subsequent calls.
23895
+ * Reset via `clear()` so the next call rebuilds from the current factory.
23896
+ */
23897
+ private getInstance;
23753
23898
  /**
23754
23899
  * Handles signal opened event.
23755
23900
  * Proxies call to the underlying storage adapter.
@@ -23812,7 +23957,7 @@ declare class StorageLiveAdapter implements IStorageUtils {
23812
23957
  */
23813
23958
  useMemory: () => void;
23814
23959
  /**
23815
- * Clears the cached utils instance by resetting to the default persistent adapter.
23960
+ * Clears the memoized utils instance.
23816
23961
  * Call this when process.cwd() changes between strategy iterations
23817
23962
  * so a new instance is created with the updated base path.
23818
23963
  */
@@ -23930,8 +24075,16 @@ type TRecentUtilsCtor = new () => IRecentUtils;
23930
24075
  * - Convenience methods: usePersist(), useMemory()
23931
24076
  */
23932
24077
  declare class RecentBacktestAdapter implements IRecentUtils {
23933
- /** Internal storage utils instance */
23934
- private _recentBacktestUtils;
24078
+ /** Factory producing the active storage utils instance */
24079
+ private _recentBacktestFactory;
24080
+ /**
24081
+ * Lazily constructs the storage utils from the registered factory and memoizes
24082
+ * the result via `singleshot`.
24083
+ *
24084
+ * The instance is built on the first call and cached for all subsequent calls.
24085
+ * Reset via `clear()` so the next call rebuilds from the current factory.
24086
+ */
24087
+ private getInstance;
23935
24088
  /**
23936
24089
  * Handles active ping event.
23937
24090
  * Proxies call to the underlying storage adapter.
@@ -23981,7 +24134,9 @@ declare class RecentBacktestAdapter implements IRecentUtils {
23981
24134
  */
23982
24135
  useMemory: () => void;
23983
24136
  /**
23984
- * Clears the cached utils instance by resetting to the default in-memory adapter.
24137
+ * Clears the memoized utils instance.
24138
+ * Call this when process.cwd() changes between strategy iterations
24139
+ * so a new instance is created with the updated base path.
23985
24140
  */
23986
24141
  clear: () => void;
23987
24142
  }
@@ -23995,8 +24150,16 @@ declare class RecentBacktestAdapter implements IRecentUtils {
23995
24150
  * - Convenience methods: usePersist(), useMemory()
23996
24151
  */
23997
24152
  declare class RecentLiveAdapter implements IRecentUtils {
23998
- /** Internal storage utils instance */
23999
- private _recentLiveUtils;
24153
+ /** Factory producing the active storage utils instance */
24154
+ private _recentLiveFactory;
24155
+ /**
24156
+ * Lazily constructs the storage utils from the registered factory and memoizes
24157
+ * the result via `singleshot`.
24158
+ *
24159
+ * The instance is built on the first call and cached for all subsequent calls.
24160
+ * Reset via `clear()` so the next call rebuilds from the current factory.
24161
+ */
24162
+ private getInstance;
24000
24163
  /**
24001
24164
  * Handles active ping event.
24002
24165
  * Proxies call to the underlying storage adapter.
@@ -24046,7 +24209,9 @@ declare class RecentLiveAdapter implements IRecentUtils {
24046
24209
  */
24047
24210
  useMemory: () => void;
24048
24211
  /**
24049
- * Clears the cached utils instance by resetting to the default persistent adapter.
24212
+ * Clears the memoized utils instance.
24213
+ * Call this when process.cwd() changes between strategy iterations
24214
+ * so a new instance is created with the updated base path.
24050
24215
  */
24051
24216
  clear: () => void;
24052
24217
  }
@@ -24292,8 +24457,16 @@ type TNotificationUtilsCtor = new () => INotificationUtils;
24292
24457
  * - Convenience methods: usePersist(), useMemory(), useDummy()
24293
24458
  */
24294
24459
  declare class NotificationBacktestAdapter implements INotificationUtils {
24295
- /** Internal notification utils instance */
24296
- private _notificationBacktestUtils;
24460
+ /** Factory producing the active notification utils instance */
24461
+ private _notificationBacktestFactory;
24462
+ /**
24463
+ * Lazily constructs the notification utils from the registered factory and
24464
+ * memoizes the result via `singleshot`.
24465
+ *
24466
+ * The instance is built on the first call and cached for all subsequent calls.
24467
+ * Reset via `clear()` so the next call rebuilds from the current factory.
24468
+ */
24469
+ private getInstance;
24297
24470
  /**
24298
24471
  * Handles signal events.
24299
24472
  * Proxies call to the underlying notification adapter.
@@ -24389,7 +24562,7 @@ declare class NotificationBacktestAdapter implements INotificationUtils {
24389
24562
  */
24390
24563
  usePersist: () => void;
24391
24564
  /**
24392
- * Resets the cached utils instance to the default in-memory adapter.
24565
+ * Clears the memoized utils instance.
24393
24566
  * Call this when process.cwd() changes between strategy iterations
24394
24567
  * so a new instance is created with the updated base path.
24395
24568
  */
@@ -24405,8 +24578,16 @@ declare class NotificationBacktestAdapter implements INotificationUtils {
24405
24578
  * - Convenience methods: usePersist(), useMemory(), useDummy()
24406
24579
  */
24407
24580
  declare class NotificationLiveAdapter implements INotificationUtils {
24408
- /** Internal notification utils instance */
24409
- private _notificationLiveUtils;
24581
+ /** Factory producing the active notification utils instance */
24582
+ private _notificationLiveFactory;
24583
+ /**
24584
+ * Lazily constructs the notification utils from the registered factory and
24585
+ * memoizes the result via `singleshot`.
24586
+ *
24587
+ * The instance is built on the first call and cached for all subsequent calls.
24588
+ * Reset via `clear()` so the next call rebuilds from the current factory.
24589
+ */
24590
+ private getInstance;
24410
24591
  /**
24411
24592
  * Handles signal events.
24412
24593
  * Proxies call to the underlying notification adapter.
@@ -24502,7 +24683,7 @@ declare class NotificationLiveAdapter implements INotificationUtils {
24502
24683
  */
24503
24684
  usePersist: () => void;
24504
24685
  /**
24505
- * Resets the cached utils instance to the default in-memory adapter.
24686
+ * Clears the memoized utils instance.
24506
24687
  * Call this when process.cwd() changes between strategy iterations
24507
24688
  * so a new instance is created with the updated base path.
24508
24689
  */
@@ -27476,7 +27657,19 @@ type TBrokerCtor = new () => Partial<IBroker>;
27476
27657
  * ```
27477
27658
  */
27478
27659
  declare class BrokerAdapter {
27479
- private _brokerInstance;
27660
+ /** Factory producing the active `BrokerProxy` instance */
27661
+ private _brokerFactory;
27662
+ /**
27663
+ * Lazily constructs the `BrokerProxy` from the registered factory and
27664
+ * memoizes the result via `singleshot`.
27665
+ *
27666
+ * The proxy is built on the first call and cached for all subsequent calls.
27667
+ * Returns `null` when no adapter has been registered via `useBrokerAdapter()`.
27668
+ *
27669
+ * Reset via `clear()` so the next call rebuilds from the current factory
27670
+ * (e.g. when `process.cwd()` changes between strategy iterations).
27671
+ */
27672
+ private getInstance;
27480
27673
  /**
27481
27674
  * Forwards a signal-open event to the registered broker adapter.
27482
27675
  *
@@ -35886,4 +36079,4 @@ declare const getTotalClosed: (signal: Signal) => {
35886
36079
  remainingCostBasis: number;
35887
36080
  };
35888
36081
 
35889
- export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
36082
+ export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };