backtest-kit 9.0.0 → 9.0.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.
package/types.d.ts CHANGED
@@ -9593,15 +9593,23 @@ interface IStateInstance {
9593
9593
  waitForInit(initial: boolean): Promise<void>;
9594
9594
  /**
9595
9595
  * Read the current state value.
9596
+ * Returns `initialValue` when the stored `when` is greater than the requested `when`
9597
+ * (look-ahead bias protection).
9598
+ * @param when - Logical timestamp at which the read is happening
9596
9599
  * @returns Current state value
9597
9600
  */
9598
- getState<Value extends object = object>(): Promise<Value>;
9601
+ getState<Value extends object = object>(when: Date): Promise<Value>;
9599
9602
  /**
9600
9603
  * Update the state value.
9604
+ * A write with a smaller `when` overwrites an existing record —
9605
+ * that lets a restarted backtest reset live-written state without breaking live.
9606
+ * The dispatch updater receives the look-ahead-guarded current value
9607
+ * (or `initialValue` when the stored `when` is in the future).
9601
9608
  * @param dispatch - New value or updater function receiving current value
9609
+ * @param when - Logical timestamp this value belongs to
9602
9610
  * @returns Updated state value
9603
9611
  */
9604
- setState<Value extends object = object>(dispatch: Value | Dispatch<Value>): Promise<Value>;
9612
+ setState<Value extends object = object>(dispatch: Value | Dispatch<Value>, when: Date): Promise<Value>;
9605
9613
  /**
9606
9614
  * Releases any resources held by this instance.
9607
9615
  */
@@ -9650,12 +9658,14 @@ declare class StateBacktestAdapter implements TStateAdapter {
9650
9658
  * @param dto.signalId - Signal identifier
9651
9659
  * @param dto.bucketName - Bucket name
9652
9660
  * @param dto.initialValue - Default value when no persisted state exists
9661
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
9653
9662
  * @returns Current state value
9654
9663
  */
9655
9664
  getState: <Value extends object = object>(dto: {
9656
9665
  signalId: string;
9657
9666
  bucketName: BucketName;
9658
9667
  initialValue: object;
9668
+ when: Date;
9659
9669
  }) => Promise<Value>;
9660
9670
  /**
9661
9671
  * Update the state value for a signal.
@@ -9663,12 +9673,14 @@ declare class StateBacktestAdapter implements TStateAdapter {
9663
9673
  * @param dto.signalId - Signal identifier
9664
9674
  * @param dto.bucketName - Bucket name
9665
9675
  * @param dto.initialValue - Default value when no persisted state exists
9676
+ * @param dto.when - Logical timestamp this value belongs to
9666
9677
  * @returns Updated state value
9667
9678
  */
9668
9679
  setState: <Value extends object = object>(dispatch: Value | Dispatch<Value>, dto: {
9669
9680
  signalId: string;
9670
9681
  bucketName: BucketName;
9671
9682
  initialValue: object;
9683
+ when: Date;
9672
9684
  }) => Promise<Value>;
9673
9685
  /**
9674
9686
  * Switches to in-memory adapter (default).
@@ -9727,12 +9739,14 @@ declare class StateLiveAdapter implements TStateAdapter {
9727
9739
  * @param dto.signalId - Signal identifier
9728
9740
  * @param dto.bucketName - Bucket name
9729
9741
  * @param dto.initialValue - Default value when no persisted state exists
9742
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
9730
9743
  * @returns Current state value
9731
9744
  */
9732
9745
  getState: <Value extends object = object>(dto: {
9733
9746
  signalId: string;
9734
9747
  bucketName: BucketName;
9735
9748
  initialValue: object;
9749
+ when: Date;
9736
9750
  }) => Promise<Value>;
9737
9751
  /**
9738
9752
  * Update the state value for a signal.
@@ -9740,12 +9754,14 @@ declare class StateLiveAdapter implements TStateAdapter {
9740
9754
  * @param dto.signalId - Signal identifier
9741
9755
  * @param dto.bucketName - Bucket name
9742
9756
  * @param dto.initialValue - Default value when no persisted state exists
9757
+ * @param dto.when - Logical timestamp this value belongs to
9743
9758
  * @returns Updated state value
9744
9759
  */
9745
9760
  setState: <Value extends object = object>(dispatch: Value | Dispatch<Value>, dto: {
9746
9761
  signalId: string;
9747
9762
  bucketName: BucketName;
9748
9763
  initialValue: object;
9764
+ when: Date;
9749
9765
  }) => Promise<Value>;
9750
9766
  /**
9751
9767
  * Switches to in-memory adapter.
@@ -9804,6 +9820,7 @@ declare class StateAdapter {
9804
9820
  * @param dto.bucketName - Bucket name
9805
9821
  * @param dto.initialValue - Default value when no persisted state exists
9806
9822
  * @param dto.backtest - Flag indicating if the context is backtest or live
9823
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
9807
9824
  * @returns Current state value
9808
9825
  * @throws Error if adapter is not enabled
9809
9826
  */
@@ -9812,6 +9829,7 @@ declare class StateAdapter {
9812
9829
  bucketName: BucketName;
9813
9830
  initialValue: object;
9814
9831
  backtest: boolean;
9832
+ when: Date;
9815
9833
  }) => Promise<Value>;
9816
9834
  /**
9817
9835
  * Update the state value for a signal.
@@ -9821,6 +9839,7 @@ declare class StateAdapter {
9821
9839
  * @param dto.bucketName - Bucket name
9822
9840
  * @param dto.initialValue - Default value when no persisted state exists
9823
9841
  * @param dto.backtest - Flag indicating if the context is backtest or live
9842
+ * @param dto.when - Logical timestamp this value belongs to
9824
9843
  * @returns Updated state value
9825
9844
  * @throws Error if adapter is not enabled
9826
9845
  */
@@ -9829,6 +9848,7 @@ declare class StateAdapter {
9829
9848
  bucketName: BucketName;
9830
9849
  initialValue: object;
9831
9850
  backtest: boolean;
9851
+ when: Date;
9832
9852
  }) => Promise<Value>;
9833
9853
  }
9834
9854
  /**
@@ -12827,6 +12847,7 @@ type MeasureData = {
12827
12847
  type IntervalData = {
12828
12848
  id: string;
12829
12849
  data: unknown;
12850
+ when: Date;
12830
12851
  removed: boolean;
12831
12852
  };
12832
12853
  /**
@@ -14532,7 +14553,7 @@ interface IPersistMeasureInstance {
14532
14553
  * @param key - Cache key within the bucket
14533
14554
  * @returns Promise that resolves when write is complete
14534
14555
  */
14535
- writeMeasureData(data: MeasureData, key: string): Promise<void>;
14556
+ writeMeasureData(data: MeasureData, key: string, when: Date): Promise<void>;
14536
14557
  /**
14537
14558
  * Soft-delete an entry by setting its `removed` flag.
14538
14559
  * File stays on disk, but subsequent reads return null.
@@ -14662,7 +14683,7 @@ declare class PersistMeasureUtils {
14662
14683
  * @param key - Cache key within the bucket
14663
14684
  * @returns Promise that resolves when write is complete
14664
14685
  */
14665
- writeMeasureData: (data: MeasureData, bucket: string, key: string) => Promise<void>;
14686
+ writeMeasureData: (data: MeasureData, bucket: string, key: string, when: Date) => Promise<void>;
14666
14687
  /**
14667
14688
  * Soft-deletes a measure entry in the given bucket by setting `removed: true`.
14668
14689
  * Lazily initializes the bucket instance on first access.
@@ -14732,7 +14753,7 @@ interface IPersistIntervalInstance {
14732
14753
  * @param key - Marker key within the bucket
14733
14754
  * @returns Promise that resolves when write is complete
14734
14755
  */
14735
- writeIntervalData(data: IntervalData, key: string): Promise<void>;
14756
+ writeIntervalData(data: IntervalData, key: string, when: Date): Promise<void>;
14736
14757
  /**
14737
14758
  * Soft-delete a marker. After this call the function will fire again
14738
14759
  * on the next IntervalFileInstance.run call for the same key.
@@ -14859,7 +14880,7 @@ declare class PersistIntervalUtils {
14859
14880
  * @param key - Marker key within the bucket
14860
14881
  * @returns Promise that resolves when write is complete
14861
14882
  */
14862
- writeIntervalData: (data: IntervalData, bucket: string, key: string) => Promise<void>;
14883
+ writeIntervalData: (data: IntervalData, bucket: string, key: string, when: Date) => Promise<void>;
14863
14884
  /**
14864
14885
  * Soft-deletes a marker in the given bucket by setting `removed: true`.
14865
14886
  * Lazily initializes the bucket instance on first access.
@@ -14905,6 +14926,7 @@ type MemoryData = {
14905
14926
  data: object;
14906
14927
  removed: boolean;
14907
14928
  index: string;
14929
+ when: number;
14908
14930
  };
14909
14931
  /**
14910
14932
  * Per-context memory entry persistence instance interface.
@@ -14942,11 +14964,12 @@ interface IPersistMemoryInstance {
14942
14964
  /**
14943
14965
  * Write a memory entry.
14944
14966
  *
14945
- * @param data - Entry data to persist
14967
+ * @param data - Entry data to persist (already carries `data.when`)
14946
14968
  * @param memoryId - Memory entry identifier
14969
+ * @param when - Logical timestamp this entry belongs to (duplicates `data.when` for API consistency)
14947
14970
  * @returns Promise that resolves when write is complete
14948
14971
  */
14949
- writeMemoryData(data: MemoryData, memoryId: string): Promise<void>;
14972
+ writeMemoryData(data: MemoryData, memoryId: string, when: Date): Promise<void>;
14950
14973
  /**
14951
14974
  * Soft-delete a memory entry. File stays on disk; subsequent reads return null.
14952
14975
  *
@@ -15027,7 +15050,7 @@ declare class PersistMemoryInstance implements IPersistMemoryInstance {
15027
15050
  * @param memoryId - Memory entry identifier
15028
15051
  * @returns Promise that resolves when write is complete
15029
15052
  */
15030
- writeMemoryData(data: MemoryData, memoryId: string): Promise<void>;
15053
+ writeMemoryData(data: MemoryData, memoryId: string, _when: Date): Promise<void>;
15031
15054
  /**
15032
15055
  * Soft-deletes a memory entry by writing `removed: true` flag.
15033
15056
  *
@@ -15120,13 +15143,14 @@ declare class PersistMemoryUtils {
15120
15143
  * Writes a memory entry for the given context.
15121
15144
  * Lazily initializes the instance on first access.
15122
15145
  *
15123
- * @param data - Entry data to persist
15146
+ * @param data - Entry data to persist (already carries `data.when`)
15124
15147
  * @param signalId - Signal identifier
15125
15148
  * @param bucketName - Bucket name
15126
15149
  * @param memoryId - Memory entry identifier
15150
+ * @param when - Logical timestamp this entry belongs to (duplicates `data.when` for API consistency)
15127
15151
  * @returns Promise that resolves when write is complete
15128
15152
  */
15129
- writeMemoryData: (data: MemoryData, signalId: string, bucketName: string, memoryId: string) => Promise<void>;
15153
+ writeMemoryData: (data: MemoryData, signalId: string, bucketName: string, memoryId: string, when: Date) => Promise<void>;
15130
15154
  /**
15131
15155
  * Soft-deletes a memory entry for the given context.
15132
15156
  * Lazily initializes the instance on first access.
@@ -15219,10 +15243,11 @@ interface IPersistRecentInstance {
15219
15243
  /**
15220
15244
  * Write the latest recent signal for this context.
15221
15245
  *
15222
- * @param signalRow - Recent signal data to persist
15246
+ * @param signalRow - Recent signal data to persist (already carries `signalRow.timestamp`)
15247
+ * @param when - Logical timestamp this signal belongs to (duplicates `signalRow.timestamp` for API consistency)
15223
15248
  * @returns Promise that resolves when write is complete
15224
15249
  */
15225
- writeRecentData(signalRow: IPublicSignalRow): Promise<void>;
15250
+ writeRecentData(signalRow: IPublicSignalRow, when: Date): Promise<void>;
15226
15251
  }
15227
15252
  /**
15228
15253
  * Default file-based implementation of IPersistRecentInstance.
@@ -15277,7 +15302,7 @@ declare class PersistRecentInstance implements IPersistRecentInstance {
15277
15302
  * @param signalRow - Recent signal data to persist
15278
15303
  * @returns Promise that resolves when write is complete
15279
15304
  */
15280
- writeRecentData(signalRow: IPublicSignalRow): Promise<void>;
15305
+ writeRecentData(signalRow: IPublicSignalRow, _when: Date): Promise<void>;
15281
15306
  }
15282
15307
  /**
15283
15308
  * Constructor type for IPersistRecentInstance.
@@ -15340,15 +15365,16 @@ declare class PersistRecentUtils {
15340
15365
  * Writes the latest recent signal for the given context.
15341
15366
  * Lazily initializes the instance on first access.
15342
15367
  *
15343
- * @param signalRow - Recent signal data to persist
15368
+ * @param signalRow - Recent signal data to persist (already carries `signalRow.timestamp`)
15344
15369
  * @param symbol - Trading pair symbol
15345
15370
  * @param strategyName - Strategy identifier
15346
15371
  * @param exchangeName - Exchange identifier
15347
15372
  * @param frameName - Frame identifier (may be empty)
15348
15373
  * @param backtest - True for backtest mode, false for live mode
15374
+ * @param when - Logical timestamp this signal belongs to (duplicates `signalRow.timestamp` for API consistency)
15349
15375
  * @returns Promise that resolves when write is complete
15350
15376
  */
15351
- writeRecentData: (signalRow: IPublicSignalRow, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<void>;
15377
+ writeRecentData: (signalRow: IPublicSignalRow, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean, when: Date) => Promise<void>;
15352
15378
  /**
15353
15379
  * Clears the memoized instance cache.
15354
15380
  * Call when process.cwd() changes between strategy iterations.
@@ -15375,6 +15401,7 @@ declare const PersistRecentAdapter: PersistRecentUtils;
15375
15401
  type StateData = {
15376
15402
  id: string;
15377
15403
  data: object;
15404
+ when: number;
15378
15405
  };
15379
15406
  /**
15380
15407
  * Per-context state persistence instance interface.
@@ -15401,10 +15428,11 @@ interface IPersistStateInstance {
15401
15428
  /**
15402
15429
  * Write state for this context.
15403
15430
  *
15404
- * @param data - State data to persist
15431
+ * @param data - State data to persist (already carries `data.when`)
15432
+ * @param when - Logical timestamp this value belongs to (duplicates `data.when` for API consistency)
15405
15433
  * @returns Promise that resolves when write is complete
15406
15434
  */
15407
- writeStateData(data: StateData): Promise<void>;
15435
+ writeStateData(data: StateData, when: Date): Promise<void>;
15408
15436
  /**
15409
15437
  * Release any resources held by this instance.
15410
15438
  * Default implementations may treat this as a no-op.
@@ -15458,7 +15486,7 @@ declare class PersistStateInstance implements IPersistStateInstance {
15458
15486
  * @param data - State data to persist
15459
15487
  * @returns Promise that resolves when write is complete
15460
15488
  */
15461
- writeStateData(data: StateData): Promise<void>;
15489
+ writeStateData(data: StateData, _when: Date): Promise<void>;
15462
15490
  /**
15463
15491
  * No-op for the default file-based implementation.
15464
15492
  * Resource cleanup (memo cache invalidation) is handled by PersistStateUtils.dispose().
@@ -15522,12 +15550,13 @@ declare class PersistStateUtils {
15522
15550
  * Writes state for the given context.
15523
15551
  * Lazily initializes the instance on first access.
15524
15552
  *
15525
- * @param data - State data to persist
15553
+ * @param data - State data to persist (already carries `data.when`)
15526
15554
  * @param signalId - Signal identifier
15527
15555
  * @param bucketName - Bucket name
15556
+ * @param when - Logical timestamp this value belongs to (duplicates `data.when` for API consistency)
15528
15557
  * @returns Promise that resolves when write is complete
15529
15558
  */
15530
- writeStateData: (data: StateData, signalId: string, bucketName: string) => Promise<void>;
15559
+ writeStateData: (data: StateData, signalId: string, bucketName: string, when: Date) => Promise<void>;
15531
15560
  /**
15532
15561
  * Switches to PersistStateDummyInstance (all operations are no-ops).
15533
15562
  */
@@ -15562,6 +15591,7 @@ declare const PersistStateAdapter: PersistStateUtils;
15562
15591
  type SessionData = {
15563
15592
  id: string;
15564
15593
  data: object | null;
15594
+ when: number;
15565
15595
  };
15566
15596
  /**
15567
15597
  * Per-context session persistence instance interface.
@@ -15588,10 +15618,11 @@ interface IPersistSessionInstance {
15588
15618
  /**
15589
15619
  * Write session data for this context.
15590
15620
  *
15591
- * @param data - Session data to persist
15621
+ * @param data - Session data to persist (already carries `data.when`)
15622
+ * @param when - Logical timestamp this value belongs to (duplicates `data.when` for API consistency)
15592
15623
  * @returns Promise that resolves when write is complete
15593
15624
  */
15594
- writeSessionData(data: SessionData): Promise<void>;
15625
+ writeSessionData(data: SessionData, when: Date): Promise<void>;
15595
15626
  /**
15596
15627
  * Release any resources held by this instance.
15597
15628
  * Default implementations may treat this as a no-op.
@@ -15647,7 +15678,7 @@ declare class PersistSessionInstance implements IPersistSessionInstance {
15647
15678
  * @param data - Session data to persist
15648
15679
  * @returns Promise that resolves when write is complete
15649
15680
  */
15650
- writeSessionData(data: SessionData): Promise<void>;
15681
+ writeSessionData(data: SessionData, _when: Date): Promise<void>;
15651
15682
  /**
15652
15683
  * No-op for the default file-based implementation.
15653
15684
  * Resource cleanup (memo cache invalidation) is handled by PersistSessionUtils.dispose().
@@ -15714,13 +15745,14 @@ declare class PersistSessionUtils {
15714
15745
  * Writes session data for the given context.
15715
15746
  * Lazily initializes the instance on first access.
15716
15747
  *
15717
- * @param data - Session data to persist
15748
+ * @param data - Session data to persist (already carries `data.when`)
15718
15749
  * @param strategyName - Strategy identifier
15719
15750
  * @param exchangeName - Exchange identifier
15720
15751
  * @param frameName - Frame identifier
15752
+ * @param when - Logical timestamp this value belongs to (duplicates `data.when` for API consistency)
15721
15753
  * @returns Promise that resolves when write is complete
15722
15754
  */
15723
- writeSessionData: (data: SessionData, strategyName: string, exchangeName: string, frameName: string) => Promise<void>;
15755
+ writeSessionData: (data: SessionData, strategyName: string, exchangeName: string, frameName: string, when: Date) => Promise<void>;
15724
15756
  /**
15725
15757
  * Switches to PersistSessionDummyInstance (all operations are no-ops).
15726
15758
  */
@@ -16628,13 +16660,19 @@ interface ISessionInstance {
16628
16660
  /**
16629
16661
  * Write a new session value.
16630
16662
  * @param value - New value or null to clear
16663
+ * @param when - Logical timestamp this value belongs to.
16664
+ * A write with a smaller `when` overwrites an existing record —
16665
+ * that lets a restarted backtest reset live-written state.
16631
16666
  */
16632
- setData<Value extends object = object>(value: Value | null): Promise<void>;
16667
+ setData<Value extends object = object>(value: Value | null, when: Date): Promise<void>;
16633
16668
  /**
16634
16669
  * Read the current session value.
16635
- * @returns Current session value, or null if not set
16670
+ * Returns null when the stored `when` is greater than the requested `when`
16671
+ * (look-ahead bias protection).
16672
+ * @param when - Logical timestamp at which the read is happening
16673
+ * @returns Current session value, or null if not set / look-ahead
16636
16674
  */
16637
- getData<Value extends object = object>(): Promise<Value | null>;
16675
+ getData<Value extends object = object>(when: Date): Promise<Value | null>;
16638
16676
  /**
16639
16677
  * Releases any resources held by this instance.
16640
16678
  */
@@ -16671,13 +16709,14 @@ declare class SessionBacktestAdapter implements TSessionAdapter {
16671
16709
  * @param context.strategyName - Strategy identifier
16672
16710
  * @param context.exchangeName - Exchange identifier
16673
16711
  * @param context.frameName - Frame identifier
16674
- * @returns Current session value, or null if not set
16712
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
16713
+ * @returns Current session value, or null if not set / look-ahead
16675
16714
  */
16676
16715
  getData: <Value extends object = object>(symbol: string, context: {
16677
16716
  strategyName: StrategyName;
16678
16717
  exchangeName: ExchangeName;
16679
16718
  frameName: FrameName;
16680
- }) => Promise<Value | null>;
16719
+ }, when: Date) => Promise<Value | null>;
16681
16720
  /**
16682
16721
  * Update the session value for a backtest run.
16683
16722
  * @param symbol - Trading pair symbol
@@ -16685,12 +16724,13 @@ declare class SessionBacktestAdapter implements TSessionAdapter {
16685
16724
  * @param context.strategyName - Strategy identifier
16686
16725
  * @param context.exchangeName - Exchange identifier
16687
16726
  * @param context.frameName - Frame identifier
16727
+ * @param when - Logical timestamp this value belongs to
16688
16728
  */
16689
16729
  setData: <Value extends object = object>(symbol: string, value: Value | null, context: {
16690
16730
  strategyName: StrategyName;
16691
16731
  exchangeName: ExchangeName;
16692
16732
  frameName: FrameName;
16693
- }) => Promise<void>;
16733
+ }, when: Date) => Promise<void>;
16694
16734
  /**
16695
16735
  * Switches to in-memory adapter (default).
16696
16736
  * All data lives in process memory only.
@@ -16736,13 +16776,14 @@ declare class SessionLiveAdapter implements TSessionAdapter {
16736
16776
  * @param context.strategyName - Strategy identifier
16737
16777
  * @param context.exchangeName - Exchange identifier
16738
16778
  * @param context.frameName - Frame identifier
16739
- * @returns Current session value, or null if not set
16779
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
16780
+ * @returns Current session value, or null if not set / look-ahead
16740
16781
  */
16741
16782
  getData: <Value extends object = object>(symbol: string, context: {
16742
16783
  strategyName: StrategyName;
16743
16784
  exchangeName: ExchangeName;
16744
16785
  frameName: FrameName;
16745
- }) => Promise<Value | null>;
16786
+ }, when: Date) => Promise<Value | null>;
16746
16787
  /**
16747
16788
  * Update the session value for a live run.
16748
16789
  * @param symbol - Trading pair symbol
@@ -16750,12 +16791,13 @@ declare class SessionLiveAdapter implements TSessionAdapter {
16750
16791
  * @param context.strategyName - Strategy identifier
16751
16792
  * @param context.exchangeName - Exchange identifier
16752
16793
  * @param context.frameName - Frame identifier
16794
+ * @param when - Logical timestamp this value belongs to
16753
16795
  */
16754
16796
  setData: <Value extends object = object>(symbol: string, value: Value | null, context: {
16755
16797
  strategyName: StrategyName;
16756
16798
  exchangeName: ExchangeName;
16757
16799
  frameName: FrameName;
16758
- }) => Promise<void>;
16800
+ }, when: Date) => Promise<void>;
16759
16801
  /**
16760
16802
  * Switches to in-memory adapter.
16761
16803
  * All data lives in process memory only.
@@ -16797,13 +16839,14 @@ declare class SessionAdapter {
16797
16839
  * @param context.exchangeName - Exchange identifier
16798
16840
  * @param context.frameName - Frame identifier
16799
16841
  * @param backtest - Flag indicating if the context is backtest or live
16800
- * @returns Current session value, or null if not set
16842
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
16843
+ * @returns Current session value, or null if not set / look-ahead
16801
16844
  */
16802
16845
  getData: <Value extends object = object>(symbol: string, context: {
16803
16846
  strategyName: StrategyName;
16804
16847
  exchangeName: ExchangeName;
16805
16848
  frameName: FrameName;
16806
- }, backtest: boolean) => Promise<Value | null>;
16849
+ }, backtest: boolean, when: Date) => Promise<Value | null>;
16807
16850
  /**
16808
16851
  * Update the session value for a signal.
16809
16852
  * Routes to SessionBacktest or SessionLive based on backtest.
@@ -16813,12 +16856,13 @@ declare class SessionAdapter {
16813
16856
  * @param context.exchangeName - Exchange identifier
16814
16857
  * @param context.frameName - Frame identifier
16815
16858
  * @param backtest - Flag indicating if the context is backtest or live
16859
+ * @param when - Logical timestamp this value belongs to
16816
16860
  */
16817
16861
  setData: <Value extends object = object>(symbol: string, value: Value | null, context: {
16818
16862
  strategyName: StrategyName;
16819
16863
  exchangeName: ExchangeName;
16820
16864
  frameName: FrameName;
16821
- }, backtest: boolean) => Promise<void>;
16865
+ }, backtest: boolean, when: Date) => Promise<void>;
16822
16866
  }
16823
16867
  /**
16824
16868
  * Global singleton instance of SessionAdapter.
@@ -23707,23 +23751,28 @@ interface IRecentUtils {
23707
23751
  handleActivePing(event: ActivePingContract): Promise<void>;
23708
23752
  /**
23709
23753
  * Retrieves the latest active signal for the given context.
23754
+ * Returns null if the stored signal's `timestamp` is greater than the requested `when`
23755
+ * (look-ahead bias protection).
23710
23756
  * @param symbol - Trading pair symbol
23711
23757
  * @param strategyName - Strategy identifier
23712
23758
  * @param exchangeName - Exchange identifier
23713
23759
  * @param frameName - Frame identifier
23714
23760
  * @param backtest - Flag indicating if the context is backtest or live
23715
- * @returns The latest signal or null if not found
23761
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
23762
+ * @returns The latest signal or null if not found / shadowed by look-ahead
23716
23763
  */
23717
- getLatestSignal(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean): Promise<IPublicSignalRow | null>;
23764
+ getLatestSignal(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean, when: Date): Promise<IPublicSignalRow | null>;
23718
23765
  /**
23719
23766
  * Returns the number of minutes elapsed since the latest signal's timestamp.
23767
+ * `timestamp` doubles as the look-ahead cutoff — a signal whose `timestamp`
23768
+ * exceeds the requested one is treated as not yet visible.
23769
+ * @param timestamp - Current timestamp in milliseconds (also serves as look-ahead cutoff)
23720
23770
  * @param symbol - Trading pair symbol
23721
23771
  * @param strategyName - Strategy identifier
23722
23772
  * @param exchangeName - Exchange identifier
23723
23773
  * @param frameName - Frame identifier
23724
23774
  * @param backtest - Flag indicating if the context is backtest or live
23725
- * @param currentTimestamp - Current timestamp in milliseconds
23726
- * @returns Minutes since the latest signal, or null if no signal found
23775
+ * @returns Minutes since the latest signal, or null if no signal found / shadowed by look-ahead
23727
23776
  */
23728
23777
  getMinutesSinceLatestSignalCreated(timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean): Promise<number | null>;
23729
23778
  }
@@ -23757,19 +23806,22 @@ declare class RecentBacktestAdapter implements IRecentUtils {
23757
23806
  * @param exchangeName - Exchange identifier
23758
23807
  * @param frameName - Frame identifier
23759
23808
  * @param backtest - Flag indicating if the context is backtest or live
23760
- * @returns The latest signal or null if not found
23809
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
23810
+ * @returns The latest signal or null if not found / shadowed by look-ahead
23761
23811
  */
23762
- getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
23812
+ getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean, when: Date) => Promise<IPublicSignalRow | null>;
23763
23813
  /**
23764
23814
  * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
23765
- * Proxies call to the underlying storage adapter.
23766
- * @param timestamp - Current timestamp in milliseconds
23815
+ * Proxies call to the underlying storage adapter. `timestamp` doubles as the
23816
+ * look-ahead cutoff a signal whose `timestamp` exceeds the requested one is
23817
+ * treated as not yet visible.
23818
+ * @param timestamp - Current timestamp in milliseconds (also serves as look-ahead cutoff)
23767
23819
  * @param symbol - Trading pair symbol
23768
23820
  * @param strategyName - Strategy identifier
23769
23821
  * @param exchangeName - Exchange identifier
23770
23822
  * @param frameName - Frame identifier
23771
23823
  * @param backtest - Flag indicating if the context is backtest or live
23772
- * @returns Whole minutes since the latest signal was created, or null if no signal found
23824
+ * @returns Whole minutes since the latest signal was created, or null if no signal found / shadowed by look-ahead
23773
23825
  */
23774
23826
  getMinutesSinceLatestSignalCreated: (timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<number | null>;
23775
23827
  /**
@@ -23819,19 +23871,22 @@ declare class RecentLiveAdapter implements IRecentUtils {
23819
23871
  * @param exchangeName - Exchange identifier
23820
23872
  * @param frameName - Frame identifier
23821
23873
  * @param backtest - Flag indicating if the context is backtest or live
23822
- * @returns The latest signal or null if not found
23874
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
23875
+ * @returns The latest signal or null if not found / shadowed by look-ahead
23823
23876
  */
23824
- getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
23877
+ getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean, when: Date) => Promise<IPublicSignalRow | null>;
23825
23878
  /**
23826
23879
  * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
23827
- * Proxies call to the underlying storage adapter.
23828
- * @param timestamp - Current timestamp in milliseconds
23880
+ * Proxies call to the underlying storage adapter. `timestamp` doubles as the
23881
+ * look-ahead cutoff a signal whose `timestamp` exceeds the requested one is
23882
+ * treated as not yet visible.
23883
+ * @param timestamp - Current timestamp in milliseconds (also serves as look-ahead cutoff)
23829
23884
  * @param symbol - Trading pair symbol
23830
23885
  * @param strategyName - Strategy identifier
23831
23886
  * @param exchangeName - Exchange identifier
23832
23887
  * @param frameName - Frame identifier
23833
23888
  * @param backtest - Flag indicating if the context is backtest or live
23834
- * @returns Whole minutes since the latest signal was created, or null if no signal found
23889
+ * @returns Whole minutes since the latest signal was created, or null if no signal found / shadowed by look-ahead
23835
23890
  */
23836
23891
  getMinutesSinceLatestSignalCreated: (timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<number | null>;
23837
23892
  /**
@@ -23880,32 +23935,37 @@ declare class RecentAdapter {
23880
23935
  /**
23881
23936
  * Retrieves the latest active signal for the given symbol and context.
23882
23937
  * Searches backtest storage first, then live storage.
23938
+ * Returns null if the stored signal's `timestamp` is greater than the requested `when`
23939
+ * (look-ahead bias protection).
23883
23940
  *
23884
23941
  * @param symbol - Trading pair symbol
23885
23942
  * @param context - Execution context with strategyName, exchangeName, and frameName
23886
- * @param backtest - Flag indicating if the context is backtest or live
23887
- * @returns The latest signal or null if not found
23943
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
23944
+ * @returns The latest signal or null if not found / shadowed by look-ahead
23888
23945
  * @throws Error if RecentAdapter is not enabled
23889
23946
  */
23890
23947
  getLatestSignal: (symbol: string, context: {
23891
23948
  strategyName: StrategyName;
23892
23949
  exchangeName: ExchangeName;
23893
23950
  frameName: FrameName;
23894
- }) => Promise<IPublicSignalRow | null>;
23951
+ }, when: Date) => Promise<IPublicSignalRow | null>;
23895
23952
  /**
23896
23953
  * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
23897
23954
  * Searches backtest storage first, then live storage.
23898
- * @param timestamp - Current timestamp in milliseconds
23955
+ * `when` doubles as the look-ahead cutoff — a signal whose `timestamp` exceeds
23956
+ * `when.getTime()` is treated as not yet visible — and as the "now" against
23957
+ * which elapsed minutes are computed.
23899
23958
  * @param symbol - Trading pair symbol
23900
23959
  * @param context - Execution context with strategyName, exchangeName, and frameName
23901
- * @returns Whole minutes since the latest signal was created, or null if no signal found
23960
+ * @param when - Logical timestamp at which the read is happening (look-ahead cutoff + "now")
23961
+ * @returns Whole minutes since the latest signal was created, or null if no signal found / shadowed by look-ahead
23902
23962
  * @throws Error if RecentAdapter is not enabled
23903
23963
  */
23904
23964
  getMinutesSinceLatestSignalCreated: (symbol: string, context: {
23905
23965
  strategyName: StrategyName;
23906
23966
  exchangeName: ExchangeName;
23907
23967
  frameName: FrameName;
23908
- }) => Promise<number | null>;
23968
+ }, when: Date) => Promise<number | null>;
23909
23969
  }
23910
23970
  /**
23911
23971
  * Global singleton instance of RecentAdapter.
@@ -24400,38 +24460,46 @@ interface IMemoryInstance {
24400
24460
  * @param memoryId - Unique entry identifier
24401
24461
  * @param value - Value to store
24402
24462
  * @param description - Optional BM25 index string; defaults to JSON.stringify(value)
24463
+ * @param when - Logical timestamp this entry belongs to (look-ahead guard)
24403
24464
  */
24404
- writeMemory<T extends object = object>(memoryId: string, value: T, description: string): Promise<void>;
24465
+ writeMemory<T extends object = object>(memoryId: string, value: T, description: string, when: Date): Promise<void>;
24405
24466
  /**
24406
24467
  * Search memory using BM25 full-text scoring.
24468
+ * Filters out entries whose `when` is greater than the requested `when`.
24407
24469
  * @param query - Search query string
24470
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
24408
24471
  * @returns Array of matching entries with scores
24409
24472
  */
24410
- searchMemory<T extends object = object>(query: string, settings?: SearchSettings): Promise<Array<{
24473
+ searchMemory<T extends object = object>(query: string, when: Date, settings?: SearchSettings): Promise<Array<{
24411
24474
  memoryId: string;
24412
24475
  score: number;
24413
24476
  content: T;
24414
24477
  }>>;
24415
24478
  /**
24416
24479
  * List all entries in memory.
24480
+ * Filters out entries whose `when` is greater than the requested `when`.
24481
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
24417
24482
  * @returns Array of all stored entries
24418
24483
  */
24419
- listMemory<T extends object = object>(): Promise<Array<{
24484
+ listMemory<T extends object = object>(when: Date): Promise<Array<{
24420
24485
  memoryId: string;
24421
24486
  content: T;
24422
24487
  }>>;
24423
24488
  /**
24424
24489
  * Remove an entry from memory.
24425
24490
  * @param memoryId - Unique entry identifier
24491
+ * @param when - Logical timestamp (kept for API consistency; removal is by UUID)
24426
24492
  */
24427
- removeMemory(memoryId: string): Promise<void>;
24493
+ removeMemory(memoryId: string, when: Date): Promise<void>;
24428
24494
  /**
24429
24495
  * Read a single entry from memory.
24496
+ * Behaves as not-found if the stored `when` is greater than the requested `when`.
24430
24497
  * @param memoryId - Unique entry identifier
24498
+ * @param when - Logical timestamp at which the read is happening (look-ahead guard)
24431
24499
  * @returns Entry value
24432
- * @throws Error if entry not found
24500
+ * @throws Error if entry not found (or shadowed by look-ahead)
24433
24501
  */
24434
- readMemory<T extends object = object>(memoryId: string): Promise<T>;
24502
+ readMemory<T extends object = object>(memoryId: string, when: Date): Promise<T>;
24435
24503
  /**
24436
24504
  * Releases any resources held by this instance.
24437
24505
  */
@@ -24480,6 +24548,7 @@ declare class MemoryBacktestAdapter implements TMemoryInstance {
24480
24548
  * @param dto.signalId - Signal identifier
24481
24549
  * @param dto.bucketName - Bucket name
24482
24550
  * @param dto.description - BM25 index string; defaults to JSON.stringify(value)
24551
+ * @param dto.when - Logical timestamp this entry belongs to (look-ahead guard)
24483
24552
  */
24484
24553
  writeMemory: <T extends object = object>(dto: {
24485
24554
  memoryId: string;
@@ -24487,18 +24556,21 @@ declare class MemoryBacktestAdapter implements TMemoryInstance {
24487
24556
  signalId: string;
24488
24557
  bucketName: string;
24489
24558
  description: string;
24559
+ when: Date;
24490
24560
  }) => Promise<void>;
24491
24561
  /**
24492
24562
  * Search memory using BM25 full-text scoring.
24493
24563
  * @param dto.query - Search query string
24494
24564
  * @param dto.signalId - Signal identifier
24495
24565
  * @param dto.bucketName - Bucket name
24566
+ * @param dto.when - Logical timestamp at which the search is happening (look-ahead guard)
24496
24567
  * @returns Matching entries sorted by relevance score
24497
24568
  */
24498
24569
  searchMemory: <T extends object = object>(dto: {
24499
24570
  query: string;
24500
24571
  signalId: string;
24501
24572
  bucketName: string;
24573
+ when: Date;
24502
24574
  settings?: SearchSettings;
24503
24575
  }) => Promise<{
24504
24576
  memoryId: string;
@@ -24509,11 +24581,13 @@ declare class MemoryBacktestAdapter implements TMemoryInstance {
24509
24581
  * List all entries in memory.
24510
24582
  * @param dto.signalId - Signal identifier
24511
24583
  * @param dto.bucketName - Bucket name
24584
+ * @param dto.when - Logical timestamp at which the list is happening (look-ahead guard)
24512
24585
  * @returns Array of all stored entries
24513
24586
  */
24514
24587
  listMemory: <T extends object = object>(dto: {
24515
24588
  signalId: string;
24516
24589
  bucketName: string;
24590
+ when: Date;
24517
24591
  }) => Promise<{
24518
24592
  memoryId: string;
24519
24593
  content: T;
@@ -24523,17 +24597,20 @@ declare class MemoryBacktestAdapter implements TMemoryInstance {
24523
24597
  * @param dto.memoryId - Unique entry identifier
24524
24598
  * @param dto.signalId - Signal identifier
24525
24599
  * @param dto.bucketName - Bucket name
24600
+ * @param dto.when - Logical timestamp (kept for API consistency; removal is by UUID)
24526
24601
  */
24527
24602
  removeMemory: (dto: {
24528
24603
  memoryId: string;
24529
24604
  signalId: string;
24530
24605
  bucketName: string;
24606
+ when: Date;
24531
24607
  }) => Promise<void>;
24532
24608
  /**
24533
24609
  * Read a single entry from memory.
24534
24610
  * @param dto.memoryId - Unique entry identifier
24535
24611
  * @param dto.signalId - Signal identifier
24536
24612
  * @param dto.bucketName - Bucket name
24613
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
24537
24614
  * @returns Entry value
24538
24615
  * @throws Error if entry not found
24539
24616
  */
@@ -24541,6 +24618,7 @@ declare class MemoryBacktestAdapter implements TMemoryInstance {
24541
24618
  memoryId: string;
24542
24619
  signalId: string;
24543
24620
  bucketName: string;
24621
+ when: Date;
24544
24622
  }) => Promise<T>;
24545
24623
  /**
24546
24624
  * Switches to in-memory BM25 adapter (default).
@@ -24596,6 +24674,7 @@ declare class MemoryLiveAdapter implements TMemoryInstance {
24596
24674
  * @param dto.signalId - Signal identifier
24597
24675
  * @param dto.bucketName - Bucket name
24598
24676
  * @param dto.description - BM25 index string; defaults to JSON.stringify(value)
24677
+ * @param dto.when - Logical timestamp this entry belongs to (look-ahead guard)
24599
24678
  */
24600
24679
  writeMemory: <T extends object = object>(dto: {
24601
24680
  memoryId: string;
@@ -24603,18 +24682,21 @@ declare class MemoryLiveAdapter implements TMemoryInstance {
24603
24682
  signalId: string;
24604
24683
  bucketName: string;
24605
24684
  description: string;
24685
+ when: Date;
24606
24686
  }) => Promise<void>;
24607
24687
  /**
24608
24688
  * Search memory using BM25 full-text scoring.
24609
24689
  * @param dto.query - Search query string
24610
24690
  * @param dto.signalId - Signal identifier
24611
24691
  * @param dto.bucketName - Bucket name
24692
+ * @param dto.when - Logical timestamp at which the search is happening (look-ahead guard)
24612
24693
  * @returns Matching entries sorted by relevance score
24613
24694
  */
24614
24695
  searchMemory: <T extends object = object>(dto: {
24615
24696
  query: string;
24616
24697
  signalId: string;
24617
24698
  bucketName: string;
24699
+ when: Date;
24618
24700
  settings?: SearchSettings;
24619
24701
  }) => Promise<{
24620
24702
  memoryId: string;
@@ -24625,11 +24707,13 @@ declare class MemoryLiveAdapter implements TMemoryInstance {
24625
24707
  * List all entries in memory.
24626
24708
  * @param dto.signalId - Signal identifier
24627
24709
  * @param dto.bucketName - Bucket name
24710
+ * @param dto.when - Logical timestamp at which the list is happening (look-ahead guard)
24628
24711
  * @returns Array of all stored entries
24629
24712
  */
24630
24713
  listMemory: <T extends object = object>(dto: {
24631
24714
  signalId: string;
24632
24715
  bucketName: string;
24716
+ when: Date;
24633
24717
  }) => Promise<{
24634
24718
  memoryId: string;
24635
24719
  content: T;
@@ -24639,17 +24723,20 @@ declare class MemoryLiveAdapter implements TMemoryInstance {
24639
24723
  * @param dto.memoryId - Unique entry identifier
24640
24724
  * @param dto.signalId - Signal identifier
24641
24725
  * @param dto.bucketName - Bucket name
24726
+ * @param dto.when - Logical timestamp (kept for API consistency; removal is by UUID)
24642
24727
  */
24643
24728
  removeMemory: (dto: {
24644
24729
  memoryId: string;
24645
24730
  signalId: string;
24646
24731
  bucketName: string;
24732
+ when: Date;
24647
24733
  }) => Promise<void>;
24648
24734
  /**
24649
24735
  * Read a single entry from memory.
24650
24736
  * @param dto.memoryId - Unique entry identifier
24651
24737
  * @param dto.signalId - Signal identifier
24652
24738
  * @param dto.bucketName - Bucket name
24739
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
24653
24740
  * @returns Entry value
24654
24741
  * @throws Error if entry not found
24655
24742
  */
@@ -24657,6 +24744,7 @@ declare class MemoryLiveAdapter implements TMemoryInstance {
24657
24744
  memoryId: string;
24658
24745
  signalId: string;
24659
24746
  bucketName: string;
24747
+ when: Date;
24660
24748
  }) => Promise<T>;
24661
24749
  /**
24662
24750
  * Switches to in-memory BM25 adapter.
@@ -24717,6 +24805,7 @@ declare class MemoryAdapter {
24717
24805
  * @param dto.bucketName - Bucket name
24718
24806
  * @param dto.description - BM25 index string; defaults to JSON.stringify(value)
24719
24807
  * @param dto.backtest - Flag indicating if the context is backtest or live
24808
+ * @param dto.when - Logical timestamp this entry belongs to (look-ahead guard)
24720
24809
  */
24721
24810
  writeMemory: <T extends object = object>(dto: {
24722
24811
  memoryId: string;
@@ -24725,6 +24814,7 @@ declare class MemoryAdapter {
24725
24814
  bucketName: string;
24726
24815
  description: string;
24727
24816
  backtest: boolean;
24817
+ when: Date;
24728
24818
  }) => Promise<void>;
24729
24819
  /**
24730
24820
  * Search memory using BM25 full-text scoring.
@@ -24733,6 +24823,7 @@ declare class MemoryAdapter {
24733
24823
  * @param dto.signalId - Signal identifier
24734
24824
  * @param dto.bucketName - Bucket name
24735
24825
  * @param dto.backtest - Flag indicating if the context is backtest or live
24826
+ * @param dto.when - Logical timestamp at which the search is happening (look-ahead guard)
24736
24827
  * @returns Matching entries sorted by relevance score
24737
24828
  */
24738
24829
  searchMemory: <T extends object = object>(dto: {
@@ -24741,6 +24832,7 @@ declare class MemoryAdapter {
24741
24832
  bucketName: string;
24742
24833
  settings?: SearchSettings;
24743
24834
  backtest: boolean;
24835
+ when: Date;
24744
24836
  }) => Promise<{
24745
24837
  memoryId: string;
24746
24838
  score: number;
@@ -24752,12 +24844,14 @@ declare class MemoryAdapter {
24752
24844
  * @param dto.signalId - Signal identifier
24753
24845
  * @param dto.bucketName - Bucket name
24754
24846
  * @param dto.backtest - Flag indicating if the context is backtest or live
24847
+ * @param dto.when - Logical timestamp at which the list is happening (look-ahead guard)
24755
24848
  * @returns Array of all stored entries
24756
24849
  */
24757
24850
  listMemory: <T extends object = object>(dto: {
24758
24851
  signalId: string;
24759
24852
  bucketName: string;
24760
24853
  backtest: boolean;
24854
+ when: Date;
24761
24855
  }) => Promise<{
24762
24856
  memoryId: string;
24763
24857
  content: T;
@@ -24769,12 +24863,14 @@ declare class MemoryAdapter {
24769
24863
  * @param dto.signalId - Signal identifier
24770
24864
  * @param dto.bucketName - Bucket name
24771
24865
  * @param dto.backtest - Flag indicating if the context is backtest or live
24866
+ * @param dto.when - Logical timestamp (kept for API consistency; removal is by UUID)
24772
24867
  */
24773
24868
  removeMemory: (dto: {
24774
24869
  memoryId: string;
24775
24870
  signalId: string;
24776
24871
  bucketName: string;
24777
24872
  backtest: boolean;
24873
+ when: Date;
24778
24874
  }) => Promise<void>;
24779
24875
  /**
24780
24876
  * Read a single entry from memory.
@@ -24783,6 +24879,7 @@ declare class MemoryAdapter {
24783
24879
  * @param dto.signalId - Signal identifier
24784
24880
  * @param dto.bucketName - Bucket name
24785
24881
  * @param dto.backtest - Flag indicating if the context is backtest or live
24882
+ * @param dto.when - Logical timestamp at which the read is happening (look-ahead guard)
24786
24883
  * @returns Entry value
24787
24884
  * @throws Error if entry not found
24788
24885
  */
@@ -24791,6 +24888,7 @@ declare class MemoryAdapter {
24791
24888
  signalId: string;
24792
24889
  bucketName: string;
24793
24890
  backtest: boolean;
24891
+ when: Date;
24794
24892
  }) => Promise<T>;
24795
24893
  }
24796
24894
  /**
@@ -28052,6 +28150,15 @@ declare namespace emitters {
28052
28150
  */
28053
28151
  declare const alignToInterval: (date: Date, interval: CandleInterval) => Date;
28054
28152
 
28153
+ /**
28154
+ * Returns the step in milliseconds for a given candle interval.
28155
+ * For example, for "15m" interval, it returns 900000 (15 * 60 * 1000).
28156
+ *
28157
+ * @param interval - Candle interval (e.g., "1m", "15m", "1h")
28158
+ * @returns Step in milliseconds corresponding to the interval
28159
+ */
28160
+ declare const intervalStepMs: (interval: CandleInterval) => number;
28161
+
28055
28162
  /**
28056
28163
  * Waits for the next candle interval to start and returns the timestamp of the new candle.
28057
28164
  * @param {CandleInterval} interval - The candle interval (e.g., "1m", "1h") to wait for.
@@ -35727,4 +35834,4 @@ declare const getTotalClosed: (signal: Signal) => {
35727
35834
  remainingCostBasis: number;
35728
35835
  };
35729
35836
 
35730
- 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, 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, warmCandles, writeMemory };
35837
+ 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, warmCandles, writeMemory };