backtest-kit 6.14.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types.d.ts CHANGED
@@ -1053,6 +1053,53 @@ interface ActivePingContract {
1053
1053
  timestamp: number;
1054
1054
  }
1055
1055
 
1056
+ /**
1057
+ * Contract for idle ping events when no signal is active.
1058
+ *
1059
+ * Emitted by idlePingSubject every tick/minute when there is no pending
1060
+ * or scheduled signal being monitored.
1061
+ * Used for tracking idle strategy lifecycle.
1062
+ *
1063
+ * Consumers:
1064
+ * - User callbacks via listenIdlePing() / listenIdlePingOnce()
1065
+ */
1066
+ interface IdlePingContract {
1067
+ /**
1068
+ * Trading pair symbol (e.g., "BTCUSDT").
1069
+ */
1070
+ symbol: string;
1071
+ /**
1072
+ * Strategy name that is in idle state.
1073
+ */
1074
+ strategyName: StrategyName;
1075
+ /**
1076
+ * Exchange name where this strategy is running.
1077
+ */
1078
+ exchangeName: ExchangeName;
1079
+ /**
1080
+ * Frame name (if backtest)
1081
+ */
1082
+ frameName: FrameName;
1083
+ /**
1084
+ * Current market price of the symbol at the time of the ping.
1085
+ */
1086
+ currentPrice: number;
1087
+ /**
1088
+ * Execution mode flag.
1089
+ * - true: Event from backtest execution (historical candle data)
1090
+ * - false: Event from live trading (real-time tick)
1091
+ */
1092
+ backtest: boolean;
1093
+ /**
1094
+ * Event timestamp in milliseconds since Unix epoch.
1095
+ *
1096
+ * Timing semantics:
1097
+ * - Live mode: when.getTime() at the moment of ping
1098
+ * - Backtest mode: candle.timestamp of the candle being processed
1099
+ */
1100
+ timestamp: number;
1101
+ }
1102
+
1056
1103
  /**
1057
1104
  * Contract for risk rejection events.
1058
1105
  *
@@ -1567,6 +1614,19 @@ interface IActionCallbacks {
1567
1614
  * @param backtest - True for backtest mode, false for live trading
1568
1615
  */
1569
1616
  onPingActive(event: ActivePingContract, actionName: ActionName, strategyName: StrategyName, frameName: FrameName, backtest: boolean): void | Promise<void>;
1617
+ /**
1618
+ * Called every tick when no signal is active (idle state).
1619
+ *
1620
+ * Triggered by: StrategyConnectionService via idlePingSubject
1621
+ * Frequency: Every tick while no signal is pending or scheduled
1622
+ *
1623
+ * @param event - Idle ping data with current price and context
1624
+ * @param actionName - Action identifier
1625
+ * @param strategyName - Strategy identifier
1626
+ * @param frameName - Timeframe identifier
1627
+ * @param backtest - True for backtest mode, false for live trading
1628
+ */
1629
+ onPingIdle(event: IdlePingContract, actionName: ActionName, strategyName: StrategyName, frameName: FrameName, backtest: boolean): void | Promise<void>;
1570
1630
  /**
1571
1631
  * Called when signal is rejected by risk management.
1572
1632
  *
@@ -1835,6 +1895,16 @@ interface IAction {
1835
1895
  * @param event - Active pending signal monitoring data
1836
1896
  */
1837
1897
  pingActive(event: ActivePingContract): void | Promise<void>;
1898
+ /**
1899
+ * Handles idle ping events when no signal is active.
1900
+ *
1901
+ * Emitted by: StrategyConnectionService via idlePingSubject
1902
+ * Source: CREATE_COMMIT_IDLE_PING_FN callback in StrategyConnectionService
1903
+ * Frequency: Every tick while no signal is pending or scheduled
1904
+ *
1905
+ * @param event - Idle ping data with current price and context
1906
+ */
1907
+ pingIdle(event: IdlePingContract): void | Promise<void>;
1838
1908
  /**
1839
1909
  * Handles risk rejection events when signals fail risk validation.
1840
1910
  *
@@ -3526,6 +3596,26 @@ interface IStrategy {
3526
3596
  * @returns Promise resolving to remaining minutes (≥ 0) or null
3527
3597
  */
3528
3598
  getPositionCountdownMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3599
+ /**
3600
+ * Returns the number of minutes the position has been active since it opened.
3601
+ *
3602
+ * Returns null if no pending signal exists.
3603
+ *
3604
+ * @param symbol - Trading pair symbol
3605
+ * @param timestamp - Current Unix timestamp in milliseconds
3606
+ * @returns Promise resolving to active minutes (≥ 0) or null
3607
+ */
3608
+ getPositionActiveMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3609
+ /**
3610
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
3611
+ *
3612
+ * Returns null if no scheduled signal exists.
3613
+ *
3614
+ * @param symbol - Trading pair symbol
3615
+ * @param timestamp - Current Unix timestamp in milliseconds
3616
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
3617
+ */
3618
+ getPositionWaitingMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3529
3619
  /**
3530
3620
  * Returns the best price reached in the profit direction during this position's life.
3531
3621
  *
@@ -5520,6 +5610,40 @@ declare function getPositionEstimateMinutes(symbol: string): Promise<number>;
5520
5610
  * ```
5521
5611
  */
5522
5612
  declare function getPositionCountdownMinutes(symbol: string): Promise<number>;
5613
+ /**
5614
+ * Returns the number of minutes the position has been active since it opened.
5615
+ *
5616
+ * Returns null if no pending signal exists.
5617
+ *
5618
+ * @param symbol - Trading pair symbol
5619
+ * @returns Promise resolving to active minutes (≥ 0) or null
5620
+ *
5621
+ * @example
5622
+ * ```typescript
5623
+ * import { getPositionActiveMinutes } from "backtest-kit";
5624
+ *
5625
+ * const minutes = await getPositionActiveMinutes("BTCUSDT");
5626
+ * // e.g. 120 (position has been open for 2 hours)
5627
+ * ```
5628
+ */
5629
+ declare function getPositionActiveMinutes(symbol: string): Promise<number>;
5630
+ /**
5631
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
5632
+ *
5633
+ * Returns null if no scheduled signal exists.
5634
+ *
5635
+ * @param symbol - Trading pair symbol
5636
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
5637
+ *
5638
+ * @example
5639
+ * ```typescript
5640
+ * import { getPositionWaitingMinutes } from "backtest-kit";
5641
+ *
5642
+ * const minutes = await getPositionWaitingMinutes("BTCUSDT");
5643
+ * // e.g. 15 (scheduled signal has been waiting 15 minutes for activation)
5644
+ * ```
5645
+ */
5646
+ declare function getPositionWaitingMinutes(symbol: string): Promise<number>;
5523
5647
  /**
5524
5648
  * Returns the best price reached in the profit direction during this position's life.
5525
5649
  *
@@ -8699,6 +8823,23 @@ declare function listenActivePing(fn: (event: ActivePingContract) => void): () =
8699
8823
  * ```
8700
8824
  */
8701
8825
  declare function listenActivePingOnce(filterFn: (event: ActivePingContract) => boolean, fn: (event: ActivePingContract) => void): () => void;
8826
+ /**
8827
+ * Subscribes to idle ping events with queued async processing.
8828
+ *
8829
+ * Emits every tick when there is no pending or scheduled signal being monitored.
8830
+ *
8831
+ * @param fn - Callback function to handle idle ping events
8832
+ * @returns Unsubscribe function to stop listening
8833
+ */
8834
+ declare function listenIdlePing(fn: (event: IdlePingContract) => void): () => void;
8835
+ /**
8836
+ * Subscribes to filtered idle ping events with one-time execution.
8837
+ *
8838
+ * @param filterFn - Predicate to filter events
8839
+ * @param fn - Callback function to handle the matching event
8840
+ * @returns Unsubscribe function to cancel the listener before it fires
8841
+ */
8842
+ declare function listenIdlePingOnce(filterFn: (event: IdlePingContract) => boolean, fn: (event: IdlePingContract) => void): () => void;
8702
8843
  /**
8703
8844
  * Subscribes to strategy management events with queued async processing.
8704
8845
  *
@@ -9124,6 +9265,32 @@ declare function getAggregatedTrades(symbol: string, limit?: number): Promise<IA
9124
9265
  * ```
9125
9266
  */
9126
9267
  declare function getLatestSignal(symbol: string): Promise<IPublicSignalRow | null>;
9268
+ /**
9269
+ * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
9270
+ *
9271
+ * Does not distinguish between active and closed signals — measures time since
9272
+ * whichever signal was recorded last. Useful for cooldown logic after a stop-loss.
9273
+ *
9274
+ * Searches backtest storage first, then live storage.
9275
+ * Returns null if no signal exists at all.
9276
+ *
9277
+ * Automatically detects backtest/live mode from execution context.
9278
+ *
9279
+ * @param symbol - Trading pair symbol
9280
+ * @param timestamp - Current timestamp in milliseconds
9281
+ * @returns Promise resolving to whole minutes since the latest signal was created, or null
9282
+ *
9283
+ * @example
9284
+ * ```typescript
9285
+ * import { getMinutesSinceLatestSignalCreated } from "backtest-kit";
9286
+ *
9287
+ * const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT", Date.now());
9288
+ * if (minutes !== null && minutes < 24 * 60) {
9289
+ * return; // cooldown — skip new signal for 24 hours after last signal
9290
+ * }
9291
+ * ```
9292
+ */
9293
+ declare function getMinutesSinceLatestSignalCreated(symbol: string, timestamp: number): Promise<number | null>;
9127
9294
 
9128
9295
  /**
9129
9296
  * Writes a value to memory scoped to the current signal.
@@ -14352,6 +14519,34 @@ declare class BacktestUtils {
14352
14519
  exchangeName: ExchangeName;
14353
14520
  frameName: FrameName;
14354
14521
  }) => Promise<number>;
14522
+ /**
14523
+ * Returns the number of minutes the position has been active since it opened.
14524
+ *
14525
+ * Returns null if no pending signal exists.
14526
+ *
14527
+ * @param symbol - Trading pair symbol
14528
+ * @param context - Execution context with strategyName, exchangeName, and frameName
14529
+ * @returns Active minutes (≥ 0), or null if no active position
14530
+ */
14531
+ getPositionActiveMinutes: (symbol: string, context: {
14532
+ strategyName: StrategyName;
14533
+ exchangeName: ExchangeName;
14534
+ frameName: FrameName;
14535
+ }) => Promise<number>;
14536
+ /**
14537
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
14538
+ *
14539
+ * Returns null if no scheduled signal exists.
14540
+ *
14541
+ * @param symbol - Trading pair symbol
14542
+ * @param context - Execution context with strategyName, exchangeName, and frameName
14543
+ * @returns Waiting minutes (≥ 0), or null if no scheduled signal
14544
+ */
14545
+ getPositionWaitingMinutes: (symbol: string, context: {
14546
+ strategyName: StrategyName;
14547
+ exchangeName: ExchangeName;
14548
+ frameName: FrameName;
14549
+ }) => Promise<number>;
14355
14550
  /**
14356
14551
  * Returns the best price reached in the profit direction during this position's life.
14357
14552
  *
@@ -15836,6 +16031,32 @@ declare class LiveUtils {
15836
16031
  strategyName: StrategyName;
15837
16032
  exchangeName: ExchangeName;
15838
16033
  }) => Promise<number>;
16034
+ /**
16035
+ * Returns the number of minutes the position has been active since it opened.
16036
+ *
16037
+ * Returns null if no pending signal exists.
16038
+ *
16039
+ * @param symbol - Trading pair symbol
16040
+ * @param context - Execution context with strategyName and exchangeName
16041
+ * @returns Active minutes (≥ 0), or null if no active position
16042
+ */
16043
+ getPositionActiveMinutes: (symbol: string, context: {
16044
+ strategyName: StrategyName;
16045
+ exchangeName: ExchangeName;
16046
+ }) => Promise<number>;
16047
+ /**
16048
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
16049
+ *
16050
+ * Returns null if no scheduled signal exists.
16051
+ *
16052
+ * @param symbol - Trading pair symbol
16053
+ * @param context - Execution context with strategyName and exchangeName
16054
+ * @returns Waiting minutes (≥ 0), or null if no scheduled signal
16055
+ */
16056
+ getPositionWaitingMinutes: (symbol: string, context: {
16057
+ strategyName: StrategyName;
16058
+ exchangeName: ExchangeName;
16059
+ }) => Promise<number>;
15839
16060
  /**
15840
16061
  * Returns the best price reached in the profit direction during this position's life.
15841
16062
  *
@@ -19078,6 +19299,36 @@ declare class ReflectUtils {
19078
19299
  exchangeName: ExchangeName;
19079
19300
  frameName: FrameName;
19080
19301
  }, backtest?: boolean) => Promise<boolean | null>;
19302
+ /**
19303
+ * Returns the number of minutes the position has been active since it opened.
19304
+ *
19305
+ * Returns null if no pending signal exists.
19306
+ *
19307
+ * @param symbol - Trading pair symbol
19308
+ * @param context - Execution context with strategyName, exchangeName and frameName
19309
+ * @param backtest - True if backtest mode, false if live mode (default: false)
19310
+ * @returns Promise resolving to active minutes (≥ 0) or null
19311
+ */
19312
+ getPositionActiveMinutes: (symbol: string, context: {
19313
+ strategyName: StrategyName;
19314
+ exchangeName: ExchangeName;
19315
+ frameName: FrameName;
19316
+ }, backtest?: boolean) => Promise<number | null>;
19317
+ /**
19318
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
19319
+ *
19320
+ * Returns null if no scheduled signal exists.
19321
+ *
19322
+ * @param symbol - Trading pair symbol
19323
+ * @param context - Execution context with strategyName, exchangeName and frameName
19324
+ * @param backtest - True if backtest mode, false if live mode (default: false)
19325
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
19326
+ */
19327
+ getPositionWaitingMinutes: (symbol: string, context: {
19328
+ strategyName: StrategyName;
19329
+ exchangeName: ExchangeName;
19330
+ frameName: FrameName;
19331
+ }, backtest?: boolean) => Promise<number | null>;
19081
19332
  /**
19082
19333
  * Returns the number of minutes elapsed since the highest profit price was recorded.
19083
19334
  *
@@ -20539,6 +20790,17 @@ interface IRecentUtils {
20539
20790
  * @returns The latest signal or null if not found
20540
20791
  */
20541
20792
  getLatestSignal(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean): Promise<IPublicSignalRow | null>;
20793
+ /**
20794
+ * Returns the number of minutes elapsed since the latest signal's timestamp.
20795
+ * @param symbol - Trading pair symbol
20796
+ * @param strategyName - Strategy identifier
20797
+ * @param exchangeName - Exchange identifier
20798
+ * @param frameName - Frame identifier
20799
+ * @param backtest - Flag indicating if the context is backtest or live
20800
+ * @param currentTimestamp - Current timestamp in milliseconds
20801
+ * @returns Minutes since the latest signal, or null if no signal found
20802
+ */
20803
+ getMinutesSinceLatestSignalCreated(timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean): Promise<number | null>;
20542
20804
  }
20543
20805
  /**
20544
20806
  * Constructor type for recent signal storage adapters.
@@ -20573,6 +20835,18 @@ declare class RecentBacktestAdapter implements IRecentUtils {
20573
20835
  * @returns The latest signal or null if not found
20574
20836
  */
20575
20837
  getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
20838
+ /**
20839
+ * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
20840
+ * Proxies call to the underlying storage adapter.
20841
+ * @param timestamp - Current timestamp in milliseconds
20842
+ * @param symbol - Trading pair symbol
20843
+ * @param strategyName - Strategy identifier
20844
+ * @param exchangeName - Exchange identifier
20845
+ * @param frameName - Frame identifier
20846
+ * @param backtest - Flag indicating if the context is backtest or live
20847
+ * @returns Whole minutes since the latest signal was created, or null if no signal found
20848
+ */
20849
+ getMinutesSinceLatestSignalCreated: (timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<number | null>;
20576
20850
  /**
20577
20851
  * Sets the storage adapter constructor.
20578
20852
  * All future storage operations will use this adapter.
@@ -20623,6 +20897,18 @@ declare class RecentLiveAdapter implements IRecentUtils {
20623
20897
  * @returns The latest signal or null if not found
20624
20898
  */
20625
20899
  getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
20900
+ /**
20901
+ * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
20902
+ * Proxies call to the underlying storage adapter.
20903
+ * @param timestamp - Current timestamp in milliseconds
20904
+ * @param symbol - Trading pair symbol
20905
+ * @param strategyName - Strategy identifier
20906
+ * @param exchangeName - Exchange identifier
20907
+ * @param frameName - Frame identifier
20908
+ * @param backtest - Flag indicating if the context is backtest or live
20909
+ * @returns Whole minutes since the latest signal was created, or null if no signal found
20910
+ */
20911
+ getMinutesSinceLatestSignalCreated: (timestamp: number, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<number | null>;
20626
20912
  /**
20627
20913
  * Sets the storage adapter constructor.
20628
20914
  * All future storage operations will use this adapter.
@@ -20681,6 +20967,20 @@ declare class RecentAdapter {
20681
20967
  exchangeName: ExchangeName;
20682
20968
  frameName: FrameName;
20683
20969
  }) => Promise<IPublicSignalRow | null>;
20970
+ /**
20971
+ * Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
20972
+ * Searches backtest storage first, then live storage.
20973
+ * @param timestamp - Current timestamp in milliseconds
20974
+ * @param symbol - Trading pair symbol
20975
+ * @param context - Execution context with strategyName, exchangeName, and frameName
20976
+ * @returns Whole minutes since the latest signal was created, or null if no signal found
20977
+ * @throws Error if RecentAdapter is not enabled
20978
+ */
20979
+ getMinutesSinceLatestSignalCreated: (timestamp: number, symbol: string, context: {
20980
+ strategyName: StrategyName;
20981
+ exchangeName: ExchangeName;
20982
+ frameName: FrameName;
20983
+ }) => Promise<number | null>;
20684
20984
  }
20685
20985
  /**
20686
20986
  * Global singleton instance of RecentAdapter.
@@ -20698,6 +20998,94 @@ declare const RecentLive: RecentLiveAdapter;
20698
20998
  */
20699
20999
  declare const RecentBacktest: RecentBacktestAdapter;
20700
21000
 
21001
+ /**
21002
+ * Defines which notification categories are enabled when calling `NotificationAdapter.enable()`.
21003
+ *
21004
+ * Pass an instance of this interface to selectively subscribe to only the event types you need.
21005
+ * When omitted, all categories default to `true` via `WILDCARD_TARGET`.
21006
+ *
21007
+ * @example
21008
+ * // Subscribe only to signal lifecycle and error events
21009
+ * notificationAdapter.enable({ signal: true, common_error: true, critical_error: true, validation_error: true,
21010
+ * partial_profit: false, partial_loss: false, breakeven: false, strategy_commit: false, signal_sync: false,
21011
+ * risk: false, info: false });
21012
+ */
21013
+ interface INotificationTarget {
21014
+ /**
21015
+ * Signal lifecycle events emitted by the strategy engine.
21016
+ * Covers four actions: `signal.opened`, `signal.scheduled`, `signal.closed`, `signal.cancelled`.
21017
+ * Source: `signalBacktestEmitter` / `signalLiveEmitter` (IStrategyTickResult).
21018
+ */
21019
+ signal: boolean;
21020
+ /**
21021
+ * Partial profit availability notifications (`partial_profit.available`).
21022
+ * Fired when the price reaches a partial-profit level defined in the strategy,
21023
+ * before the commit decision is made.
21024
+ * Source: `partialProfitSubject` (PartialProfitContract).
21025
+ */
21026
+ partial_profit: boolean;
21027
+ /**
21028
+ * Partial loss availability notifications (`partial_loss.available`).
21029
+ * Fired when the price reaches a partial-loss level defined in the strategy,
21030
+ * before the commit decision is made.
21031
+ * Source: `partialLossSubject` (PartialLossContract).
21032
+ */
21033
+ partial_loss: boolean;
21034
+ /**
21035
+ * Breakeven availability notifications (`breakeven.available`).
21036
+ * Fired when the price reaches the breakeven level, before the commit is applied.
21037
+ * Source: `breakevenSubject` (BreakevenContract).
21038
+ */
21039
+ breakeven: boolean;
21040
+ /**
21041
+ * Strategy commit confirmations.
21042
+ * Covers all committed actions: `partial_profit.commit`, `partial_loss.commit`,
21043
+ * `breakeven.commit`, `trailing_stop.commit`, `trailing_take.commit`,
21044
+ * `activate_scheduled.commit`, `average_buy.commit`, `cancel_scheduled.commit`,
21045
+ * `close_pending.commit`.
21046
+ * Source: `strategyCommitSubject` (StrategyCommitContract).
21047
+ */
21048
+ strategy_commit: boolean;
21049
+ /**
21050
+ * Signal synchronization events for live trading (`signal_sync.open`, `signal_sync.close`).
21051
+ * Fired when a limit order is confirmed filled (`signal-open`) or when an open
21052
+ * position is confirmed exited (`signal-close`) by the exchange sync layer.
21053
+ * Source: `syncSubject` (SignalSyncContract).
21054
+ */
21055
+ signal_sync: boolean;
21056
+ /**
21057
+ * Risk manager rejection notifications (`risk.rejection`).
21058
+ * Fired when the risk manager blocks a new signal from opening due to
21059
+ * active position count limits or other risk rules.
21060
+ * Source: `riskSubject` (RiskContract).
21061
+ */
21062
+ risk: boolean;
21063
+ /**
21064
+ * Informational signal notifications (`signal.info`).
21065
+ * Manual or strategy-triggered messages attached to an active signal,
21066
+ * carrying a `note` and optional `notificationId`.
21067
+ * Source: `signalNotifySubject` (SignalInfoContract).
21068
+ */
21069
+ info: boolean;
21070
+ /**
21071
+ * Non-fatal runtime errors (`error.info`).
21072
+ * Emitted by the global `errorEmitter` for recoverable errors that are
21073
+ * caught and logged but do not terminate the process.
21074
+ */
21075
+ common_error: boolean;
21076
+ /**
21077
+ * Critical (fatal) errors (`error.critical`).
21078
+ * Emitted by the global `exitEmitter` when an unrecoverable error
21079
+ * causes the backtest or live session to terminate.
21080
+ */
21081
+ critical_error: boolean;
21082
+ /**
21083
+ * Validation errors (`error.validation`).
21084
+ * Emitted by `validationSubject` when strategy configuration or
21085
+ * input data fails schema/business-rule validation.
21086
+ */
21087
+ validation_error: boolean;
21088
+ }
20701
21089
  /**
20702
21090
  * Base interface for notification adapters.
20703
21091
  * All notification adapters must implement this interface.
@@ -21011,7 +21399,7 @@ declare class NotificationAdapter {
21011
21399
  *
21012
21400
  * @returns Cleanup function that unsubscribes from all emitters
21013
21401
  */
21014
- enable: (() => () => void) & functools_kit.ISingleshotClearable;
21402
+ enable: (({ signal, info, partial_profit, partial_loss, breakeven, strategy_commit, signal_sync, risk, common_error, critical_error, validation_error, }?: INotificationTarget) => () => void) & functools_kit.ISingleshotClearable;
21015
21403
  /**
21016
21404
  * Disables notification storage by unsubscribing from all emitters.
21017
21405
  * Safe to call multiple times.
@@ -23151,6 +23539,21 @@ declare class ActionBase implements IPublicAction {
23151
23539
  * ```
23152
23540
  */
23153
23541
  pingActive(event: ActivePingContract, source?: string): void | Promise<void>;
23542
+ /**
23543
+ * Handles idle ping events when no signal is active.
23544
+ *
23545
+ * Called every tick while no signal is pending or scheduled.
23546
+ * Use to monitor idle strategy state and implement entry condition logic.
23547
+ *
23548
+ * Triggered by: ActionCoreService.pingIdle() via StrategyConnectionService
23549
+ * Source: idlePingSubject.next() in CREATE_COMMIT_IDLE_PING_FN callback
23550
+ * Frequency: Every tick while no signal is pending or scheduled
23551
+ *
23552
+ * Default implementation: Logs idle ping event.
23553
+ *
23554
+ * @param event - Idle ping data with symbol, strategy info, current price, timestamp
23555
+ */
23556
+ pingIdle(event: IdlePingContract, source?: string): void | Promise<void>;
23154
23557
  /**
23155
23558
  * Handles risk rejection events when signals fail risk validation.
23156
23559
  *
@@ -24357,6 +24760,11 @@ declare const schedulePingSubject: Subject<SchedulePingContract>;
24357
24760
  * Allows users to track active signal lifecycle and implement custom dynamic management logic.
24358
24761
  */
24359
24762
  declare const activePingSubject: Subject<ActivePingContract>;
24763
+ /**
24764
+ * Idle ping emitter for strategy idle state events.
24765
+ * Emits every tick when there is no pending or scheduled signal being monitored.
24766
+ */
24767
+ declare const idlePingSubject: Subject<IdlePingContract>;
24360
24768
  /**
24361
24769
  * Strategy management signal emitter.
24362
24770
  * Emits when strategy management actions are executed:
@@ -24406,6 +24814,7 @@ declare const emitters_doneWalkerSubject: typeof doneWalkerSubject;
24406
24814
  declare const emitters_errorEmitter: typeof errorEmitter;
24407
24815
  declare const emitters_exitEmitter: typeof exitEmitter;
24408
24816
  declare const emitters_highestProfitSubject: typeof highestProfitSubject;
24817
+ declare const emitters_idlePingSubject: typeof idlePingSubject;
24409
24818
  declare const emitters_maxDrawdownSubject: typeof maxDrawdownSubject;
24410
24819
  declare const emitters_partialLossSubject: typeof partialLossSubject;
24411
24820
  declare const emitters_partialProfitSubject: typeof partialProfitSubject;
@@ -24426,7 +24835,7 @@ declare const emitters_walkerCompleteSubject: typeof walkerCompleteSubject;
24426
24835
  declare const emitters_walkerEmitter: typeof walkerEmitter;
24427
24836
  declare const emitters_walkerStopSubject: typeof walkerStopSubject;
24428
24837
  declare namespace emitters {
24429
- export { emitters_activePingSubject as activePingSubject, emitters_backtestScheduleOpenSubject as backtestScheduleOpenSubject, emitters_breakevenSubject as breakevenSubject, emitters_doneBacktestSubject as doneBacktestSubject, emitters_doneLiveSubject as doneLiveSubject, emitters_doneWalkerSubject as doneWalkerSubject, emitters_errorEmitter as errorEmitter, emitters_exitEmitter as exitEmitter, emitters_highestProfitSubject as highestProfitSubject, emitters_maxDrawdownSubject as maxDrawdownSubject, emitters_partialLossSubject as partialLossSubject, emitters_partialProfitSubject as partialProfitSubject, emitters_performanceEmitter as performanceEmitter, emitters_progressBacktestEmitter as progressBacktestEmitter, emitters_progressWalkerEmitter as progressWalkerEmitter, emitters_riskSubject as riskSubject, emitters_schedulePingSubject as schedulePingSubject, emitters_shutdownEmitter as shutdownEmitter, emitters_signalBacktestEmitter as signalBacktestEmitter, emitters_signalEmitter as signalEmitter, emitters_signalLiveEmitter as signalLiveEmitter, emitters_signalNotifySubject as signalNotifySubject, emitters_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
24838
+ export { emitters_activePingSubject as activePingSubject, emitters_backtestScheduleOpenSubject as backtestScheduleOpenSubject, emitters_breakevenSubject as breakevenSubject, emitters_doneBacktestSubject as doneBacktestSubject, emitters_doneLiveSubject as doneLiveSubject, emitters_doneWalkerSubject as doneWalkerSubject, emitters_errorEmitter as errorEmitter, emitters_exitEmitter as exitEmitter, emitters_highestProfitSubject as highestProfitSubject, emitters_idlePingSubject as idlePingSubject, emitters_maxDrawdownSubject as maxDrawdownSubject, emitters_partialLossSubject as partialLossSubject, emitters_partialProfitSubject as partialProfitSubject, emitters_performanceEmitter as performanceEmitter, emitters_progressBacktestEmitter as progressBacktestEmitter, emitters_progressWalkerEmitter as progressWalkerEmitter, emitters_riskSubject as riskSubject, emitters_schedulePingSubject as schedulePingSubject, emitters_shutdownEmitter as shutdownEmitter, emitters_signalBacktestEmitter as signalBacktestEmitter, emitters_signalEmitter as signalEmitter, emitters_signalLiveEmitter as signalLiveEmitter, emitters_signalNotifySubject as signalNotifySubject, emitters_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
24430
24839
  }
24431
24840
 
24432
24841
  /**
@@ -25436,6 +25845,22 @@ declare class ActionCoreService implements TAction$1 {
25436
25845
  exchangeName: ExchangeName;
25437
25846
  frameName: FrameName;
25438
25847
  }) => Promise<void>;
25848
+ /**
25849
+ * Routes idle ping event to all registered actions for the strategy.
25850
+ *
25851
+ * Retrieves action list from strategy schema (IStrategySchema.actions)
25852
+ * and invokes the pingIdle handler on each ClientAction instance sequentially.
25853
+ * Called every tick when there is no pending or scheduled signal being monitored.
25854
+ *
25855
+ * @param backtest - Whether running in backtest mode (true) or live mode (false)
25856
+ * @param event - Idle state monitoring data
25857
+ * @param context - Strategy execution context with strategyName, exchangeName, frameName
25858
+ */
25859
+ pingIdle: (backtest: boolean, event: IdlePingContract, context: {
25860
+ strategyName: StrategyName;
25861
+ exchangeName: ExchangeName;
25862
+ frameName: FrameName;
25863
+ }) => Promise<void>;
25439
25864
  /**
25440
25865
  * Routes risk rejection event to all registered actions for the strategy.
25441
25866
  *
@@ -26504,6 +26929,38 @@ declare class StrategyConnectionService implements TStrategy$1 {
26504
26929
  exchangeName: ExchangeName;
26505
26930
  frameName: FrameName;
26506
26931
  }) => Promise<number | null>;
26932
+ /**
26933
+ * Returns the number of minutes the position has been active since it opened.
26934
+ *
26935
+ * Delegates to ClientStrategy.getPositionActiveMinutes().
26936
+ * Returns null if no pending signal exists.
26937
+ *
26938
+ * @param backtest - Whether running in backtest mode
26939
+ * @param symbol - Trading pair symbol
26940
+ * @param context - Execution context with strategyName, exchangeName, frameName
26941
+ * @returns Promise resolving to active minutes (≥ 0) or null
26942
+ */
26943
+ getPositionActiveMinutes: (backtest: boolean, symbol: string, context: {
26944
+ strategyName: StrategyName;
26945
+ exchangeName: ExchangeName;
26946
+ frameName: FrameName;
26947
+ }) => Promise<number | null>;
26948
+ /**
26949
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
26950
+ *
26951
+ * Delegates to ClientStrategy.getPositionWaitingMinutes().
26952
+ * Returns null if no scheduled signal exists.
26953
+ *
26954
+ * @param backtest - Whether running in backtest mode
26955
+ * @param symbol - Trading pair symbol
26956
+ * @param context - Execution context with strategyName, exchangeName, frameName
26957
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
26958
+ */
26959
+ getPositionWaitingMinutes: (backtest: boolean, symbol: string, context: {
26960
+ strategyName: StrategyName;
26961
+ exchangeName: ExchangeName;
26962
+ frameName: FrameName;
26963
+ }) => Promise<number | null>;
26507
26964
  /**
26508
26965
  * Returns the best price reached in the profit direction during this position's life.
26509
26966
  *
@@ -27493,6 +27950,16 @@ declare class ActionProxy implements IPublicAction {
27493
27950
  * @returns Promise resolving to user's pingActive() result or null on error
27494
27951
  */
27495
27952
  pingActive(event: ActivePingContract): Promise<any>;
27953
+ /**
27954
+ * Handles idle ping events with error capture.
27955
+ *
27956
+ * Wraps the user's pingIdle() method to catch and log any errors.
27957
+ * Called every tick while no signal is pending or scheduled.
27958
+ *
27959
+ * @param event - Idle ping data with symbol, strategy info, current price, timestamp
27960
+ * @returns Promise resolving to user's pingIdle() result or null on error
27961
+ */
27962
+ pingIdle(event: IdlePingContract): Promise<any>;
27496
27963
  /**
27497
27964
  * Handles risk rejection events with error capture.
27498
27965
  *
@@ -27648,6 +28115,10 @@ declare class ClientAction implements IAction {
27648
28115
  * Handles active ping events during active pending signal monitoring.
27649
28116
  */
27650
28117
  pingActive(event: ActivePingContract): Promise<void>;
28118
+ /**
28119
+ * Handles idle ping events when no signal is active.
28120
+ */
28121
+ pingIdle(event: IdlePingContract): Promise<void>;
27651
28122
  /**
27652
28123
  * Handles risk rejection events when signals fail risk validation.
27653
28124
  */
@@ -27835,6 +28306,19 @@ declare class ActionConnectionService implements TAction {
27835
28306
  exchangeName: ExchangeName;
27836
28307
  frameName: FrameName;
27837
28308
  }) => Promise<void>;
28309
+ /**
28310
+ * Routes idle ping event to appropriate ClientAction instance.
28311
+ *
28312
+ * @param event - Idle ping event data
28313
+ * @param backtest - Whether running in backtest mode
28314
+ * @param context - Execution context with action name, strategy name, exchange name, frame name
28315
+ */
28316
+ pingIdle: (event: IdlePingContract, backtest: boolean, context: {
28317
+ actionName: ActionName;
28318
+ strategyName: StrategyName;
28319
+ exchangeName: ExchangeName;
28320
+ frameName: FrameName;
28321
+ }) => Promise<void>;
27838
28322
  /**
27839
28323
  * Routes riskRejection event to appropriate ClientAction instance.
27840
28324
  *
@@ -28807,6 +29291,32 @@ declare class StrategyCoreService implements TStrategy {
28807
29291
  exchangeName: ExchangeName;
28808
29292
  frameName: FrameName;
28809
29293
  }) => Promise<number | null>;
29294
+ /**
29295
+ * Returns the number of minutes the position has been active since it opened.
29296
+ *
29297
+ * @param backtest - Whether running in backtest mode
29298
+ * @param symbol - Trading pair symbol
29299
+ * @param context - Execution context with strategyName, exchangeName, frameName
29300
+ * @returns Promise resolving to active minutes (≥ 0) or null
29301
+ */
29302
+ getPositionActiveMinutes: (backtest: boolean, symbol: string, context: {
29303
+ strategyName: StrategyName;
29304
+ exchangeName: ExchangeName;
29305
+ frameName: FrameName;
29306
+ }) => Promise<number | null>;
29307
+ /**
29308
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
29309
+ *
29310
+ * @param backtest - Whether running in backtest mode
29311
+ * @param symbol - Trading pair symbol
29312
+ * @param context - Execution context with strategyName, exchangeName, frameName
29313
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
29314
+ */
29315
+ getPositionWaitingMinutes: (backtest: boolean, symbol: string, context: {
29316
+ strategyName: StrategyName;
29317
+ exchangeName: ExchangeName;
29318
+ frameName: FrameName;
29319
+ }) => Promise<number | null>;
28810
29320
  /**
28811
29321
  * Returns the best price reached in the profit direction during this position's life.
28812
29322
  *
@@ -31926,4 +32436,4 @@ declare const getTotalClosed: (signal: Signal) => {
31926
32436
  remainingCostBasis: number;
31927
32437
  };
31928
32438
 
31929
- 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, 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 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 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 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 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, type MemoryData, 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, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, 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, 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, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, 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, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMode, getNextCandles, getOrderBook, getPendingSignal, 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, getRawCandles, getRiskSchema, getScheduledSignal, 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, 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, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
32439
+ 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, 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 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 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 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 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, type MemoryData, 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, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, 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, 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, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, 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, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, 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, 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, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };