backtest-kit 6.13.0 → 6.15.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.
Files changed (4) hide show
  1. package/build/index.cjs +1024 -132
  2. package/build/index.mjs +1020 -133
  3. package/package.json +2 -2
  4. package/types.d.ts +641 -10
package/types.d.ts CHANGED
@@ -3526,6 +3526,26 @@ interface IStrategy {
3526
3526
  * @returns Promise resolving to remaining minutes (≥ 0) or null
3527
3527
  */
3528
3528
  getPositionCountdownMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3529
+ /**
3530
+ * Returns the number of minutes the position has been active since it opened.
3531
+ *
3532
+ * Returns null if no pending signal exists.
3533
+ *
3534
+ * @param symbol - Trading pair symbol
3535
+ * @param timestamp - Current Unix timestamp in milliseconds
3536
+ * @returns Promise resolving to active minutes (≥ 0) or null
3537
+ */
3538
+ getPositionActiveMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3539
+ /**
3540
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
3541
+ *
3542
+ * Returns null if no scheduled signal exists.
3543
+ *
3544
+ * @param symbol - Trading pair symbol
3545
+ * @param timestamp - Current Unix timestamp in milliseconds
3546
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
3547
+ */
3548
+ getPositionWaitingMinutes: (symbol: string, timestamp: number) => Promise<number | null>;
3529
3549
  /**
3530
3550
  * Returns the best price reached in the profit direction during this position's life.
3531
3551
  *
@@ -4748,6 +4768,79 @@ interface IPositionOverlapLadder {
4748
4768
  lowerPercent: number;
4749
4769
  }
4750
4770
 
4771
+ /**
4772
+ * Optional payload for signal info notifications.
4773
+ * Both fields are optional — omitting notificationNote falls back to the signal's own note.
4774
+ */
4775
+ type SignalNotificationPayload = {
4776
+ /** Optional user-defined identifier for correlating the notification with external systems (e.g. Telegram message ID) */
4777
+ notificationId: string;
4778
+ /** Human-readable note to attach to the notification. Falls back to signal.note if omitted. */
4779
+ notificationNote: string;
4780
+ };
4781
+ /**
4782
+ * Helper service for emitting signal info notifications.
4783
+ *
4784
+ * Handles validation (memoized per context) and emission of `signal.info` events
4785
+ * via `signalNotifySubject`. Used internally by the framework action pipeline —
4786
+ * end users interact with this via `commitSignalNotify()` in `onActivePing` callbacks.
4787
+ */
4788
+ declare class NotificationHelperService {
4789
+ private readonly loggerService;
4790
+ private readonly strategySchemaService;
4791
+ private readonly riskValidationService;
4792
+ private readonly strategyValidationService;
4793
+ private readonly exchangeValidationService;
4794
+ private readonly frameValidationService;
4795
+ private readonly actionValidationService;
4796
+ private readonly strategyCoreService;
4797
+ private readonly timeMetaService;
4798
+ /**
4799
+ * Validates strategy, exchange, frame, risk, and action schemas for the given context.
4800
+ *
4801
+ * Memoized per unique `"strategyName:exchangeName[:frameName]"` key — subsequent calls
4802
+ * with the same context are no-ops, so validation runs at most once per context.
4803
+ *
4804
+ * @param context - Routing context: strategyName, exchangeName, frameName
4805
+ * @throws {Error} If any registered schema fails validation
4806
+ */
4807
+ validate: ((context: {
4808
+ strategyName: StrategyName;
4809
+ exchangeName: ExchangeName;
4810
+ frameName: FrameName;
4811
+ }) => Promise<void>) & functools_kit.IClearableMemoize<string> & functools_kit.IControlMemoize<string, Promise<void>>;
4812
+ /**
4813
+ * Emits a `signal.info` notification for the currently active pending signal.
4814
+ *
4815
+ * Validates all schemas (via memoized `validate`), resolves the pending signal
4816
+ * for the given symbol, then emits a `SignalInfoContract` via `signalNotifySubject`,
4817
+ * which is routed to all registered `listenSignalNotify` callbacks and persisted
4818
+ * by `NotificationAdapter`.
4819
+ *
4820
+ * @param payload - Optional notification fields (notificationId, notificationNote)
4821
+ * @param symbol - Trading pair symbol (e.g. "BTCUSDT")
4822
+ * @param currentPrice - Market price at the time of the call
4823
+ * @param context - Routing context: strategyName, exchangeName, frameName
4824
+ * @param backtest - true when called during a backtest run
4825
+ *
4826
+ * @throws {Error} If no active pending signal is found for the given symbol
4827
+ *
4828
+ * @example
4829
+ * ```typescript
4830
+ * // Inside onActivePing callback:
4831
+ * await commitSignalNotify("BTCUSDT", {
4832
+ * notificationNote: "RSI crossed 70, consider closing",
4833
+ * notificationId: "msg-123",
4834
+ * });
4835
+ * ```
4836
+ */
4837
+ commitSignalNotify: (payload: Partial<SignalNotificationPayload>, symbol: string, currentPrice: number, context: {
4838
+ strategyName: StrategyName;
4839
+ exchangeName: ExchangeName;
4840
+ frameName: FrameName;
4841
+ }, backtest: boolean) => Promise<void>;
4842
+ }
4843
+
4751
4844
  /**
4752
4845
  * Cancels the scheduled signal without stopping the strategy.
4753
4846
  *
@@ -5447,6 +5540,40 @@ declare function getPositionEstimateMinutes(symbol: string): Promise<number>;
5447
5540
  * ```
5448
5541
  */
5449
5542
  declare function getPositionCountdownMinutes(symbol: string): Promise<number>;
5543
+ /**
5544
+ * Returns the number of minutes the position has been active since it opened.
5545
+ *
5546
+ * Returns null if no pending signal exists.
5547
+ *
5548
+ * @param symbol - Trading pair symbol
5549
+ * @returns Promise resolving to active minutes (≥ 0) or null
5550
+ *
5551
+ * @example
5552
+ * ```typescript
5553
+ * import { getPositionActiveMinutes } from "backtest-kit";
5554
+ *
5555
+ * const minutes = await getPositionActiveMinutes("BTCUSDT");
5556
+ * // e.g. 120 (position has been open for 2 hours)
5557
+ * ```
5558
+ */
5559
+ declare function getPositionActiveMinutes(symbol: string): Promise<number>;
5560
+ /**
5561
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
5562
+ *
5563
+ * Returns null if no scheduled signal exists.
5564
+ *
5565
+ * @param symbol - Trading pair symbol
5566
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
5567
+ *
5568
+ * @example
5569
+ * ```typescript
5570
+ * import { getPositionWaitingMinutes } from "backtest-kit";
5571
+ *
5572
+ * const minutes = await getPositionWaitingMinutes("BTCUSDT");
5573
+ * // e.g. 15 (scheduled signal has been waiting 15 minutes for activation)
5574
+ * ```
5575
+ */
5576
+ declare function getPositionWaitingMinutes(symbol: string): Promise<number>;
5450
5577
  /**
5451
5578
  * Returns the best price reached in the profit direction during this position's life.
5452
5579
  *
@@ -5868,6 +5995,38 @@ declare function hasNoPendingSignal(symbol: string): Promise<boolean>;
5868
5995
  * ```
5869
5996
  */
5870
5997
  declare function hasNoScheduledSignal(symbol: string): Promise<boolean>;
5998
+ /**
5999
+ * Emits a `signal.info` notification for the currently active pending signal.
6000
+ *
6001
+ * Broadcasts a user-defined informational note without affecting position state.
6002
+ * Useful for annotating strategy decisions, triggering external alerts, or logging
6003
+ * mid-position events (e.g. RSI crossing a threshold, volume spike detected).
6004
+ *
6005
+ * Automatically reads backtest/live mode from execution context.
6006
+ * Automatically reads strategyName, exchangeName, frameName from method context.
6007
+ * Automatically fetches current price via getAveragePrice.
6008
+ *
6009
+ * @param symbol - Trading pair symbol (e.g. "BTCUSDT")
6010
+ * @param payload - Optional notification fields
6011
+ * @param payload.notificationNote - Human-readable note. Falls back to signal.note if omitted.
6012
+ * @param payload.notificationId - Optional correlation ID for external systems (e.g. Telegram message ID).
6013
+ *
6014
+ * @throws {Error} If called outside an execution context
6015
+ * @throws {Error} If called outside a method context
6016
+ * @throws {Error} If no active pending signal exists for the given symbol
6017
+ *
6018
+ * @example
6019
+ * ```typescript
6020
+ * import { commitSignalNotify } from "backtest-kit";
6021
+ *
6022
+ * // Inside onActivePing callback:
6023
+ * await commitSignalNotify("BTCUSDT", {
6024
+ * notificationNote: "RSI crossed 70, consider closing",
6025
+ * notificationId: "msg-123",
6026
+ * });
6027
+ * ```
6028
+ */
6029
+ declare function commitSignalNotify(symbol: string, payload?: Partial<SignalNotificationPayload>): Promise<void>;
5871
6030
 
5872
6031
  /**
5873
6032
  * Stops the strategy from generating new signals.
@@ -7581,6 +7740,89 @@ interface MaxDrawdownContract {
7581
7740
  backtest: boolean;
7582
7741
  }
7583
7742
 
7743
+ /**
7744
+ * Contract for signal info notification events.
7745
+ *
7746
+ * Emitted by signalNotifySubject when a strategy calls commitSignalInfo() to broadcast
7747
+ * a user-defined informational message for an open position.
7748
+ * Used for custom strategy annotations, debug output, and external notification routing.
7749
+ *
7750
+ * Consumers:
7751
+ * - User callbacks via listenSignalNotify() / listenSignalNotifyOnce()
7752
+ *
7753
+ * @example
7754
+ * ```typescript
7755
+ * import { listenSignalNotify } from "backtest-kit";
7756
+ *
7757
+ * // Listen to all signal info events
7758
+ * listenSignalNotify((event) => {
7759
+ * console.log(`[${event.backtest ? "Backtest" : "Live"}] Signal ${event.data.id}: ${event.note}`);
7760
+ * console.log(`Symbol: ${event.symbol}, Price: ${event.currentPrice}`);
7761
+ * });
7762
+ *
7763
+ * // Wait for the first info event on BTCUSDT
7764
+ * listenSignalNotifyOnce(
7765
+ * (event) => event.symbol === "BTCUSDT",
7766
+ * (event) => console.log("BTCUSDT info:", event.note)
7767
+ * );
7768
+ * ```
7769
+ */
7770
+ interface SignalInfoContract {
7771
+ /**
7772
+ * Trading pair symbol (e.g., "BTCUSDT").
7773
+ * Identifies which market this info event belongs to.
7774
+ */
7775
+ symbol: string;
7776
+ /**
7777
+ * Strategy name that generated this signal.
7778
+ * Identifies which strategy execution this info event belongs to.
7779
+ */
7780
+ strategyName: StrategyName;
7781
+ /**
7782
+ * Exchange name where this signal is being executed.
7783
+ * Identifies which exchange this info event belongs to.
7784
+ */
7785
+ exchangeName: ExchangeName;
7786
+ /**
7787
+ * Frame name where this signal is being executed.
7788
+ * Identifies which frame this info event belongs to (empty string for live mode).
7789
+ */
7790
+ frameName: FrameName;
7791
+ /**
7792
+ * Complete signal row data with original prices.
7793
+ * Contains all signal information including originalPriceStopLoss, originalPriceTakeProfit, and partialExecuted.
7794
+ */
7795
+ data: IPublicSignalRow;
7796
+ /**
7797
+ * Current market price at the moment the info event was emitted.
7798
+ */
7799
+ currentPrice: number;
7800
+ /**
7801
+ * User-defined informational note attached to this event.
7802
+ * Provided by the strategy when calling commitSignalInfo().
7803
+ */
7804
+ note: string;
7805
+ /**
7806
+ * Optional user-defined identifier for correlating this event with external systems.
7807
+ * Provided by the strategy when calling commitSignalInfo().
7808
+ */
7809
+ notificationId?: string;
7810
+ /**
7811
+ * Execution mode flag.
7812
+ * - true: Event from backtest execution (historical candle data)
7813
+ * - false: Event from live trading (real-time tick)
7814
+ */
7815
+ backtest: boolean;
7816
+ /**
7817
+ * Event timestamp in milliseconds since Unix epoch.
7818
+ *
7819
+ * Timing semantics:
7820
+ * - Live mode: when.getTime() at the moment the info event was emitted
7821
+ * - Backtest mode: candle.timestamp of the candle that triggered the event
7822
+ */
7823
+ timestamp: number;
7824
+ }
7825
+
7584
7826
  /**
7585
7827
  * Subscribes to all signal events with queued async processing.
7586
7828
  *
@@ -8636,6 +8878,24 @@ declare function listenMaxDrawdown(fn: (event: MaxDrawdownContract) => void): ()
8636
8878
  * @return Unsubscribe function to cancel the listener before it fires
8637
8879
  */
8638
8880
  declare function listenMaxDrawdownOnce(filterFn: (event: MaxDrawdownContract) => boolean, fn: (event: MaxDrawdownContract) => void): () => void;
8881
+ /**
8882
+ * Subscribes to signal info events with queued async processing.
8883
+ * Emits when a strategy calls commitSignalInfo() to broadcast a user-defined note for an open position.
8884
+ * Events are processed sequentially in order received, even if callback is async.
8885
+ * Uses queued wrapper to prevent concurrent execution of the callback.
8886
+ * @param fn - Callback function to handle signal info events
8887
+ * @return Unsubscribe function to stop listening to events
8888
+ */
8889
+ declare function listenSignalNotify(fn: (event: SignalInfoContract) => void): () => void;
8890
+ /**
8891
+ * Subscribes to filtered signal info events with one-time execution.
8892
+ * Listens for events matching the filter predicate, then executes callback once
8893
+ * and automatically unsubscribes.
8894
+ * @param filterFn - Predicate to filter which events trigger the callback
8895
+ * @param fn - Callback function to handle the filtered event (called only once)
8896
+ * @return Unsubscribe function to cancel the listener before it fires
8897
+ */
8898
+ declare function listenSignalNotifyOnce(filterFn: (event: SignalInfoContract) => boolean, fn: (event: SignalInfoContract) => void): () => void;
8639
8899
 
8640
8900
  /**
8641
8901
  * Checks if trade context is active (execution and method contexts).
@@ -10578,6 +10838,70 @@ interface ClosePendingCommitNotification {
10578
10838
  /** Unix timestamp in milliseconds when the notification was created */
10579
10839
  createdAt: number;
10580
10840
  }
10841
+ /**
10842
+ * Signal info notification.
10843
+ * Emitted when a strategy broadcasts a user-defined informational note for an open position.
10844
+ */
10845
+ interface SignalInfoNotification {
10846
+ /** Discriminator for type-safe union */
10847
+ type: "signal.info";
10848
+ /** Unique notification identifier */
10849
+ id: string;
10850
+ /** Unix timestamp in milliseconds when the info event was emitted */
10851
+ timestamp: number;
10852
+ /** Whether this notification is from backtest mode (true) or live mode (false) */
10853
+ backtest: boolean;
10854
+ /** Trading pair symbol (e.g., "BTCUSDT") */
10855
+ symbol: string;
10856
+ /** Strategy name that generated this signal */
10857
+ strategyName: StrategyName;
10858
+ /** Exchange name where signal was executed */
10859
+ exchangeName: ExchangeName;
10860
+ /** Unique signal identifier (UUID v4) */
10861
+ signalId: string;
10862
+ /** Current market price when the info event was emitted */
10863
+ currentPrice: number;
10864
+ /** Trade direction: "long" (buy) or "short" (sell) */
10865
+ position: "long" | "short";
10866
+ /** Entry price for the position */
10867
+ priceOpen: number;
10868
+ /** Effective take profit price (with trailing if set) */
10869
+ priceTakeProfit: number;
10870
+ /** Effective stop loss price (with trailing if set) */
10871
+ priceStopLoss: number;
10872
+ /** Original take profit price before any trailing adjustments */
10873
+ originalPriceTakeProfit: number;
10874
+ /** Original stop loss price before any trailing adjustments */
10875
+ originalPriceStopLoss: number;
10876
+ /** Original entry price at signal creation (unchanged by DCA averaging) */
10877
+ originalPriceOpen: number;
10878
+ /** Total number of DCA entries (_entry.length). 1 = no averaging. */
10879
+ totalEntries: number;
10880
+ /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10881
+ totalPartials: number;
10882
+ /** Unrealized PNL at the moment the info event was emitted (from data.pnl) */
10883
+ pnl: IStrategyPnL;
10884
+ /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10885
+ pnlPercentage: number;
10886
+ /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
10887
+ pnlPriceOpen: number;
10888
+ /** Exit price from PNL calculation (adjusted with slippage and fees) */
10889
+ pnlPriceClose: number;
10890
+ /** Absolute profit/loss in USD */
10891
+ pnlCost: number;
10892
+ /** Total invested capital in USD */
10893
+ pnlEntries: number;
10894
+ /** User-defined informational note provided by the strategy */
10895
+ note: string;
10896
+ /** Optional user-defined identifier for correlating this notification with external systems */
10897
+ notificationId?: string;
10898
+ /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
10899
+ scheduledAt: number;
10900
+ /** Pending timestamp in milliseconds (when position became pending/active at priceOpen) */
10901
+ pendingAt: number;
10902
+ /** Unix timestamp in milliseconds when the notification was created */
10903
+ createdAt: number;
10904
+ }
10581
10905
  /**
10582
10906
  * Root discriminated union of all notification types.
10583
10907
  * Type discrimination is done via the `type` field.
@@ -10604,7 +10928,7 @@ interface ClosePendingCommitNotification {
10604
10928
  * }
10605
10929
  * ```
10606
10930
  */
10607
- type NotificationModel = SignalOpenedNotification | SignalClosedNotification | PartialProfitAvailableNotification | PartialLossAvailableNotification | BreakevenAvailableNotification | PartialProfitCommitNotification | PartialLossCommitNotification | BreakevenCommitNotification | AverageBuyCommitNotification | ActivateScheduledCommitNotification | TrailingStopCommitNotification | TrailingTakeCommitNotification | CancelScheduledCommitNotification | ClosePendingCommitNotification | SignalSyncOpenNotification | SignalSyncCloseNotification | RiskRejectionNotification | SignalScheduledNotification | SignalCancelledNotification | InfoErrorNotification | CriticalErrorNotification | ValidationErrorNotification;
10931
+ type NotificationModel = SignalOpenedNotification | SignalClosedNotification | PartialProfitAvailableNotification | PartialLossAvailableNotification | BreakevenAvailableNotification | PartialProfitCommitNotification | PartialLossCommitNotification | BreakevenCommitNotification | AverageBuyCommitNotification | ActivateScheduledCommitNotification | TrailingStopCommitNotification | TrailingTakeCommitNotification | CancelScheduledCommitNotification | ClosePendingCommitNotification | SignalSyncOpenNotification | SignalSyncCloseNotification | RiskRejectionNotification | SignalScheduledNotification | SignalCancelledNotification | InfoErrorNotification | CriticalErrorNotification | ValidationErrorNotification | SignalInfoNotification;
10608
10932
 
10609
10933
  /**
10610
10934
  * Unified tick event data for report generation.
@@ -13286,6 +13610,33 @@ declare class MarkdownUtils {
13286
13610
  * ```
13287
13611
  */
13288
13612
  disable: ({ backtest: bt, breakeven, heat, live, partial, performance, risk, strategy, schedule, walker, sync, highest_profit, max_drawdown, }?: Partial<IMarkdownTarget>) => void;
13613
+ /**
13614
+ * Clears markdown report data selectively.
13615
+ *
13616
+ * Clears accumulated data for specified markdown services without unsubscribing.
13617
+ * Use this method to reset report data for specific services while keeping them active.
13618
+ *
13619
+ * Each cleared service will:
13620
+ * - Clear accumulated data for all reports
13621
+ * - Start fresh with new data for future events
13622
+ * - Not affect event subscriptions or report generation status
13623
+ *
13624
+ * @param config - Service configuration object specifying which services to clear. Defaults to clearing all services.
13625
+ * @param config.backtest - Clear backtest result report data
13626
+ * @param config.breakeven - Clear breakeven event tracking data
13627
+ * @param config.partial - Clear partial profit/loss event tracking data
13628
+ * @param config.heat - Clear portfolio heatmap analysis data
13629
+ * @param config.walker - Clear walker strategy comparison report data
13630
+ * @param config.performance - Clear performance bottleneck analysis data
13631
+ * @param config.risk - Clear risk rejection tracking data
13632
+ * @param config.schedule - Clear scheduled signal tracking data
13633
+ * @param config.live - Clear live trading event report data
13634
+ * @param config.strategy - Clear strategy report data
13635
+ * @param config.sync - Clear sync report data
13636
+ * @param config.highest_profit - Clear highest profit report data
13637
+ * @param config.max_drawdown - Clear max drawdown report data
13638
+ */
13639
+ clear: ({ backtest: bt, breakeven, heat, live, partial, performance, risk, strategy, schedule, walker, sync, highest_profit, max_drawdown, }?: Partial<IMarkdownTarget>) => void;
13289
13640
  }
13290
13641
  /**
13291
13642
  * Markdown adapter with pluggable storage backend and instance memoization.
@@ -13318,12 +13669,6 @@ declare class MarkdownAdapter extends MarkdownUtils {
13318
13669
  * All dumps append to a single .jsonl file per markdown type.
13319
13670
  */
13320
13671
  useJsonl(): void;
13321
- /**
13322
- * Clears the memoized storage cache.
13323
- * Call this when process.cwd() changes between strategy iterations
13324
- * so new storage instances are created with the updated base path.
13325
- */
13326
- clear(): void;
13327
13672
  /**
13328
13673
  * Switches to a dummy markdown adapter that discards all writes.
13329
13674
  * All future markdown writes will be no-ops.
@@ -14061,6 +14406,34 @@ declare class BacktestUtils {
14061
14406
  exchangeName: ExchangeName;
14062
14407
  frameName: FrameName;
14063
14408
  }) => Promise<number>;
14409
+ /**
14410
+ * Returns the number of minutes the position has been active since it opened.
14411
+ *
14412
+ * Returns null if no pending signal exists.
14413
+ *
14414
+ * @param symbol - Trading pair symbol
14415
+ * @param context - Execution context with strategyName, exchangeName, and frameName
14416
+ * @returns Active minutes (≥ 0), or null if no active position
14417
+ */
14418
+ getPositionActiveMinutes: (symbol: string, context: {
14419
+ strategyName: StrategyName;
14420
+ exchangeName: ExchangeName;
14421
+ frameName: FrameName;
14422
+ }) => Promise<number>;
14423
+ /**
14424
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
14425
+ *
14426
+ * Returns null if no scheduled signal exists.
14427
+ *
14428
+ * @param symbol - Trading pair symbol
14429
+ * @param context - Execution context with strategyName, exchangeName, and frameName
14430
+ * @returns Waiting minutes (≥ 0), or null if no scheduled signal
14431
+ */
14432
+ getPositionWaitingMinutes: (symbol: string, context: {
14433
+ strategyName: StrategyName;
14434
+ exchangeName: ExchangeName;
14435
+ frameName: FrameName;
14436
+ }) => Promise<number>;
14064
14437
  /**
14065
14438
  * Returns the best price reached in the profit direction during this position's life.
14066
14439
  *
@@ -14799,6 +15172,30 @@ declare class BacktestUtils {
14799
15172
  exchangeName: ExchangeName;
14800
15173
  frameName: FrameName;
14801
15174
  }, cost?: number) => Promise<boolean>;
15175
+ /**
15176
+ * Emits a `signal.info` notification for the currently active pending signal.
15177
+ *
15178
+ * @param symbol - Trading pair symbol
15179
+ * @param currentPrice - Market price at the time of the call
15180
+ * @param context - Execution context with strategyName, exchangeName, frameName
15181
+ * @param payload - Optional notification fields (notificationNote, notificationId)
15182
+ *
15183
+ * @throws {Error} If no active pending signal exists for the given symbol
15184
+ *
15185
+ * @example
15186
+ * ```typescript
15187
+ * await Backtest.commitSignalNotify("BTCUSDT", 42000, {
15188
+ * strategyName: "my-strategy",
15189
+ * exchangeName: "binance",
15190
+ * frameName: "1h"
15191
+ * }, { notificationNote: "RSI crossed 70" });
15192
+ * ```
15193
+ */
15194
+ commitSignalNotify: (symbol: string, currentPrice: number, context: {
15195
+ strategyName: StrategyName;
15196
+ exchangeName: ExchangeName;
15197
+ frameName: FrameName;
15198
+ }, payload?: Partial<SignalNotificationPayload>) => Promise<void>;
14802
15199
  /**
14803
15200
  * Gets statistical data from all closed signals for a symbol-strategy pair.
14804
15201
  *
@@ -15521,6 +15918,32 @@ declare class LiveUtils {
15521
15918
  strategyName: StrategyName;
15522
15919
  exchangeName: ExchangeName;
15523
15920
  }) => Promise<number>;
15921
+ /**
15922
+ * Returns the number of minutes the position has been active since it opened.
15923
+ *
15924
+ * Returns null if no pending signal exists.
15925
+ *
15926
+ * @param symbol - Trading pair symbol
15927
+ * @param context - Execution context with strategyName and exchangeName
15928
+ * @returns Active minutes (≥ 0), or null if no active position
15929
+ */
15930
+ getPositionActiveMinutes: (symbol: string, context: {
15931
+ strategyName: StrategyName;
15932
+ exchangeName: ExchangeName;
15933
+ }) => Promise<number>;
15934
+ /**
15935
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
15936
+ *
15937
+ * Returns null if no scheduled signal exists.
15938
+ *
15939
+ * @param symbol - Trading pair symbol
15940
+ * @param context - Execution context with strategyName and exchangeName
15941
+ * @returns Waiting minutes (≥ 0), or null if no scheduled signal
15942
+ */
15943
+ getPositionWaitingMinutes: (symbol: string, context: {
15944
+ strategyName: StrategyName;
15945
+ exchangeName: ExchangeName;
15946
+ }) => Promise<number>;
15524
15947
  /**
15525
15948
  * Returns the best price reached in the profit direction during this position's life.
15526
15949
  *
@@ -16211,6 +16634,28 @@ declare class LiveUtils {
16211
16634
  strategyName: StrategyName;
16212
16635
  exchangeName: ExchangeName;
16213
16636
  }, cost?: number) => Promise<boolean>;
16637
+ /**
16638
+ * Emits a `signal.info` notification for the currently active pending signal.
16639
+ *
16640
+ * @param symbol - Trading pair symbol
16641
+ * @param currentPrice - Market price at the time of the call
16642
+ * @param context - Execution context with strategyName and exchangeName
16643
+ * @param payload - Optional notification fields (notificationNote, notificationId)
16644
+ *
16645
+ * @throws {Error} If no active pending signal exists for the given symbol
16646
+ *
16647
+ * @example
16648
+ * ```typescript
16649
+ * await Live.commitSignalNotify("BTCUSDT", 42000, {
16650
+ * strategyName: "my-strategy",
16651
+ * exchangeName: "binance",
16652
+ * }, { notificationNote: "RSI crossed 70" });
16653
+ * ```
16654
+ */
16655
+ commitSignalNotify: (symbol: string, currentPrice: number, context: {
16656
+ strategyName: StrategyName;
16657
+ exchangeName: ExchangeName;
16658
+ }, payload?: Partial<SignalNotificationPayload>) => Promise<void>;
16214
16659
  /**
16215
16660
  * Gets statistical data from all live trading events for a symbol-strategy pair.
16216
16661
  *
@@ -18741,6 +19186,36 @@ declare class ReflectUtils {
18741
19186
  exchangeName: ExchangeName;
18742
19187
  frameName: FrameName;
18743
19188
  }, backtest?: boolean) => Promise<boolean | null>;
19189
+ /**
19190
+ * Returns the number of minutes the position has been active since it opened.
19191
+ *
19192
+ * Returns null if no pending signal exists.
19193
+ *
19194
+ * @param symbol - Trading pair symbol
19195
+ * @param context - Execution context with strategyName, exchangeName and frameName
19196
+ * @param backtest - True if backtest mode, false if live mode (default: false)
19197
+ * @returns Promise resolving to active minutes (≥ 0) or null
19198
+ */
19199
+ getPositionActiveMinutes: (symbol: string, context: {
19200
+ strategyName: StrategyName;
19201
+ exchangeName: ExchangeName;
19202
+ frameName: FrameName;
19203
+ }, backtest?: boolean) => Promise<number | null>;
19204
+ /**
19205
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
19206
+ *
19207
+ * Returns null if no scheduled signal exists.
19208
+ *
19209
+ * @param symbol - Trading pair symbol
19210
+ * @param context - Execution context with strategyName, exchangeName and frameName
19211
+ * @param backtest - True if backtest mode, false if live mode (default: false)
19212
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
19213
+ */
19214
+ getPositionWaitingMinutes: (symbol: string, context: {
19215
+ strategyName: StrategyName;
19216
+ exchangeName: ExchangeName;
19217
+ frameName: FrameName;
19218
+ }, backtest?: boolean) => Promise<number | null>;
18744
19219
  /**
18745
19220
  * Returns the number of minutes elapsed since the highest profit price was recorded.
18746
19221
  *
@@ -20361,6 +20836,94 @@ declare const RecentLive: RecentLiveAdapter;
20361
20836
  */
20362
20837
  declare const RecentBacktest: RecentBacktestAdapter;
20363
20838
 
20839
+ /**
20840
+ * Defines which notification categories are enabled when calling `NotificationAdapter.enable()`.
20841
+ *
20842
+ * Pass an instance of this interface to selectively subscribe to only the event types you need.
20843
+ * When omitted, all categories default to `true` via `WILDCARD_TARGET`.
20844
+ *
20845
+ * @example
20846
+ * // Subscribe only to signal lifecycle and error events
20847
+ * notificationAdapter.enable({ signal: true, common_error: true, critical_error: true, validation_error: true,
20848
+ * partial_profit: false, partial_loss: false, breakeven: false, strategy_commit: false, signal_sync: false,
20849
+ * risk: false, info: false });
20850
+ */
20851
+ interface INotificationTarget {
20852
+ /**
20853
+ * Signal lifecycle events emitted by the strategy engine.
20854
+ * Covers four actions: `signal.opened`, `signal.scheduled`, `signal.closed`, `signal.cancelled`.
20855
+ * Source: `signalBacktestEmitter` / `signalLiveEmitter` (IStrategyTickResult).
20856
+ */
20857
+ signal: boolean;
20858
+ /**
20859
+ * Partial profit availability notifications (`partial_profit.available`).
20860
+ * Fired when the price reaches a partial-profit level defined in the strategy,
20861
+ * before the commit decision is made.
20862
+ * Source: `partialProfitSubject` (PartialProfitContract).
20863
+ */
20864
+ partial_profit: boolean;
20865
+ /**
20866
+ * Partial loss availability notifications (`partial_loss.available`).
20867
+ * Fired when the price reaches a partial-loss level defined in the strategy,
20868
+ * before the commit decision is made.
20869
+ * Source: `partialLossSubject` (PartialLossContract).
20870
+ */
20871
+ partial_loss: boolean;
20872
+ /**
20873
+ * Breakeven availability notifications (`breakeven.available`).
20874
+ * Fired when the price reaches the breakeven level, before the commit is applied.
20875
+ * Source: `breakevenSubject` (BreakevenContract).
20876
+ */
20877
+ breakeven: boolean;
20878
+ /**
20879
+ * Strategy commit confirmations.
20880
+ * Covers all committed actions: `partial_profit.commit`, `partial_loss.commit`,
20881
+ * `breakeven.commit`, `trailing_stop.commit`, `trailing_take.commit`,
20882
+ * `activate_scheduled.commit`, `average_buy.commit`, `cancel_scheduled.commit`,
20883
+ * `close_pending.commit`.
20884
+ * Source: `strategyCommitSubject` (StrategyCommitContract).
20885
+ */
20886
+ strategy_commit: boolean;
20887
+ /**
20888
+ * Signal synchronization events for live trading (`signal_sync.open`, `signal_sync.close`).
20889
+ * Fired when a limit order is confirmed filled (`signal-open`) or when an open
20890
+ * position is confirmed exited (`signal-close`) by the exchange sync layer.
20891
+ * Source: `syncSubject` (SignalSyncContract).
20892
+ */
20893
+ signal_sync: boolean;
20894
+ /**
20895
+ * Risk manager rejection notifications (`risk.rejection`).
20896
+ * Fired when the risk manager blocks a new signal from opening due to
20897
+ * active position count limits or other risk rules.
20898
+ * Source: `riskSubject` (RiskContract).
20899
+ */
20900
+ risk: boolean;
20901
+ /**
20902
+ * Informational signal notifications (`signal.info`).
20903
+ * Manual or strategy-triggered messages attached to an active signal,
20904
+ * carrying a `note` and optional `notificationId`.
20905
+ * Source: `signalNotifySubject` (SignalInfoContract).
20906
+ */
20907
+ info: boolean;
20908
+ /**
20909
+ * Non-fatal runtime errors (`error.info`).
20910
+ * Emitted by the global `errorEmitter` for recoverable errors that are
20911
+ * caught and logged but do not terminate the process.
20912
+ */
20913
+ common_error: boolean;
20914
+ /**
20915
+ * Critical (fatal) errors (`error.critical`).
20916
+ * Emitted by the global `exitEmitter` when an unrecoverable error
20917
+ * causes the backtest or live session to terminate.
20918
+ */
20919
+ critical_error: boolean;
20920
+ /**
20921
+ * Validation errors (`error.validation`).
20922
+ * Emitted by `validationSubject` when strategy configuration or
20923
+ * input data fails schema/business-rule validation.
20924
+ */
20925
+ validation_error: boolean;
20926
+ }
20364
20927
  /**
20365
20928
  * Base interface for notification adapters.
20366
20929
  * All notification adapters must implement this interface.
@@ -20371,6 +20934,7 @@ interface INotificationUtils {
20371
20934
  * @param data - The strategy tick result data
20372
20935
  */
20373
20936
  handleSignal(data: IStrategyTickResult): Promise<void>;
20937
+ handleSignalNotify(data: SignalInfoContract): Promise<void>;
20374
20938
  /**
20375
20939
  * Handles partial profit availability event.
20376
20940
  * @param data - The partial profit contract data
@@ -20449,6 +21013,7 @@ declare class NotificationBacktestAdapter implements INotificationUtils {
20449
21013
  * @param data - The strategy tick result data
20450
21014
  */
20451
21015
  handleSignal: (data: IStrategyTickResult) => Promise<void>;
21016
+ handleSignalNotify: (data: SignalInfoContract) => Promise<void>;
20452
21017
  /**
20453
21018
  * Handles partial profit availability event.
20454
21019
  * Proxies call to the underlying notification adapter.
@@ -20561,6 +21126,7 @@ declare class NotificationLiveAdapter implements INotificationUtils {
20561
21126
  * @param data - The strategy tick result data
20562
21127
  */
20563
21128
  handleSignal: (data: IStrategyTickResult) => Promise<void>;
21129
+ handleSignalNotify: (data: SignalInfoContract) => Promise<void>;
20564
21130
  /**
20565
21131
  * Handles partial profit availability event.
20566
21132
  * Proxies call to the underlying notification adapter.
@@ -20671,7 +21237,7 @@ declare class NotificationAdapter {
20671
21237
  *
20672
21238
  * @returns Cleanup function that unsubscribes from all emitters
20673
21239
  */
20674
- enable: (() => () => void) & functools_kit.ISingleshotClearable;
21240
+ enable: (({ signal, info, partial_profit, partial_loss, breakeven, strategy_commit, signal_sync, risk, common_error, critical_error, validation_error, }?: INotificationTarget) => () => void) & functools_kit.ISingleshotClearable;
20675
21241
  /**
20676
21242
  * Disables notification storage by unsubscribing from all emitters.
20677
21243
  * Safe to call multiple times.
@@ -24051,6 +24617,11 @@ declare const highestProfitSubject: Subject<HighestProfitContract>;
24051
24617
  * Allows users to track drawdown levels and implement custom risk management logic based on drawdown thresholds.
24052
24618
  */
24053
24619
  declare const maxDrawdownSubject: Subject<MaxDrawdownContract>;
24620
+ /**
24621
+ * Signal info emitter for user-defined informational notes on open positions.
24622
+ * Emits when a strategy calls commitSignalInfo() to broadcast a custom annotation.
24623
+ */
24624
+ declare const signalNotifySubject: Subject<SignalInfoContract>;
24054
24625
 
24055
24626
  declare const emitters_activePingSubject: typeof activePingSubject;
24056
24627
  declare const emitters_backtestScheduleOpenSubject: typeof backtestScheduleOpenSubject;
@@ -24073,6 +24644,7 @@ declare const emitters_shutdownEmitter: typeof shutdownEmitter;
24073
24644
  declare const emitters_signalBacktestEmitter: typeof signalBacktestEmitter;
24074
24645
  declare const emitters_signalEmitter: typeof signalEmitter;
24075
24646
  declare const emitters_signalLiveEmitter: typeof signalLiveEmitter;
24647
+ declare const emitters_signalNotifySubject: typeof signalNotifySubject;
24076
24648
  declare const emitters_strategyCommitSubject: typeof strategyCommitSubject;
24077
24649
  declare const emitters_syncSubject: typeof syncSubject;
24078
24650
  declare const emitters_validationSubject: typeof validationSubject;
@@ -24080,7 +24652,7 @@ declare const emitters_walkerCompleteSubject: typeof walkerCompleteSubject;
24080
24652
  declare const emitters_walkerEmitter: typeof walkerEmitter;
24081
24653
  declare const emitters_walkerStopSubject: typeof walkerStopSubject;
24082
24654
  declare namespace emitters {
24083
- 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_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
24655
+ 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 };
24084
24656
  }
24085
24657
 
24086
24658
  /**
@@ -26158,6 +26730,38 @@ declare class StrategyConnectionService implements TStrategy$1 {
26158
26730
  exchangeName: ExchangeName;
26159
26731
  frameName: FrameName;
26160
26732
  }) => Promise<number | null>;
26733
+ /**
26734
+ * Returns the number of minutes the position has been active since it opened.
26735
+ *
26736
+ * Delegates to ClientStrategy.getPositionActiveMinutes().
26737
+ * Returns null if no pending signal exists.
26738
+ *
26739
+ * @param backtest - Whether running in backtest mode
26740
+ * @param symbol - Trading pair symbol
26741
+ * @param context - Execution context with strategyName, exchangeName, frameName
26742
+ * @returns Promise resolving to active minutes (≥ 0) or null
26743
+ */
26744
+ getPositionActiveMinutes: (backtest: boolean, symbol: string, context: {
26745
+ strategyName: StrategyName;
26746
+ exchangeName: ExchangeName;
26747
+ frameName: FrameName;
26748
+ }) => Promise<number | null>;
26749
+ /**
26750
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
26751
+ *
26752
+ * Delegates to ClientStrategy.getPositionWaitingMinutes().
26753
+ * Returns null if no scheduled signal exists.
26754
+ *
26755
+ * @param backtest - Whether running in backtest mode
26756
+ * @param symbol - Trading pair symbol
26757
+ * @param context - Execution context with strategyName, exchangeName, frameName
26758
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
26759
+ */
26760
+ getPositionWaitingMinutes: (backtest: boolean, symbol: string, context: {
26761
+ strategyName: StrategyName;
26762
+ exchangeName: ExchangeName;
26763
+ frameName: FrameName;
26764
+ }) => Promise<number | null>;
26161
26765
  /**
26162
26766
  * Returns the best price reached in the profit direction during this position's life.
26163
26767
  *
@@ -28461,6 +29065,32 @@ declare class StrategyCoreService implements TStrategy {
28461
29065
  exchangeName: ExchangeName;
28462
29066
  frameName: FrameName;
28463
29067
  }) => Promise<number | null>;
29068
+ /**
29069
+ * Returns the number of minutes the position has been active since it opened.
29070
+ *
29071
+ * @param backtest - Whether running in backtest mode
29072
+ * @param symbol - Trading pair symbol
29073
+ * @param context - Execution context with strategyName, exchangeName, frameName
29074
+ * @returns Promise resolving to active minutes (≥ 0) or null
29075
+ */
29076
+ getPositionActiveMinutes: (backtest: boolean, symbol: string, context: {
29077
+ strategyName: StrategyName;
29078
+ exchangeName: ExchangeName;
29079
+ frameName: FrameName;
29080
+ }) => Promise<number | null>;
29081
+ /**
29082
+ * Returns the number of minutes the scheduled signal has been waiting for activation.
29083
+ *
29084
+ * @param backtest - Whether running in backtest mode
29085
+ * @param symbol - Trading pair symbol
29086
+ * @param context - Execution context with strategyName, exchangeName, frameName
29087
+ * @returns Promise resolving to waiting minutes (≥ 0) or null
29088
+ */
29089
+ getPositionWaitingMinutes: (backtest: boolean, symbol: string, context: {
29090
+ strategyName: StrategyName;
29091
+ exchangeName: ExchangeName;
29092
+ frameName: FrameName;
29093
+ }) => Promise<number | null>;
28464
29094
  /**
28465
29095
  * Returns the best price reached in the profit direction during this position's life.
28466
29096
  *
@@ -31388,6 +32018,7 @@ declare class MaxDrawdownReportService {
31388
32018
  }
31389
32019
 
31390
32020
  declare const backtest: {
32021
+ notificationHelperService: NotificationHelperService;
31391
32022
  exchangeValidationService: ExchangeValidationService;
31392
32023
  strategyValidationService: StrategyValidationService;
31393
32024
  frameValidationService: FrameValidationService;
@@ -31579,4 +32210,4 @@ declare const getTotalClosed: (signal: Signal) => {
31579
32210
  remainingCostBasis: number;
31580
32211
  };
31581
32212
 
31582
- 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 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, 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, 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 };
32213
+ 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, 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, 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 };