backtest-kit 6.12.0 → 6.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "6.12.0",
3
+ "version": "6.13.0",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -8891,6 +8891,34 @@ declare function getNextCandles(symbol: string, interval: CandleInterval, limit:
8891
8891
  */
8892
8892
  declare function getAggregatedTrades(symbol: string, limit?: number): Promise<IAggregatedTradeData[]>;
8893
8893
 
8894
+ /**
8895
+ * Returns the latest signal (pending or closed) for the current strategy context.
8896
+ *
8897
+ * Does not distinguish between active and closed signals — returns whichever
8898
+ * was recorded last. Useful for cooldown logic: e.g. skip opening a new position
8899
+ * for 4 hours after a stop-loss by checking the timestamp of the latest signal
8900
+ * regardless of its outcome.
8901
+ *
8902
+ * Searches backtest storage first, then live storage.
8903
+ * Returns null if no signal exists at all.
8904
+ *
8905
+ * Automatically detects backtest/live mode from execution context.
8906
+ *
8907
+ * @param symbol - Trading pair symbol
8908
+ * @returns Promise resolving to the latest signal or null
8909
+ *
8910
+ * @example
8911
+ * ```typescript
8912
+ * import { getLatestSignal } from "backtest-kit";
8913
+ *
8914
+ * const latest = await getLatestSignal("BTCUSDT");
8915
+ * if (latest && Date.now() - latest.closedAt < 4 * 60 * 60 * 1000) {
8916
+ * return; // cooldown after SL — skip new signal for 4 hours
8917
+ * }
8918
+ * ```
8919
+ */
8920
+ declare function getLatestSignal(symbol: string): Promise<IPublicSignalRow | null>;
8921
+
8894
8922
  /**
8895
8923
  * Writes a value to memory scoped to the current signal.
8896
8924
  *
@@ -12519,6 +12547,80 @@ declare class PersistMemoryUtils {
12519
12547
  * ```
12520
12548
  */
12521
12549
  declare const PersistMemoryAdapter: PersistMemoryUtils;
12550
+ /**
12551
+ * Type for persisted recent signal data.
12552
+ * Stores the latest active signal per context key.
12553
+ */
12554
+ type RecentData = IPublicSignalRow | null;
12555
+ /**
12556
+ * Utility class for managing recent signal persistence.
12557
+ *
12558
+ * Features:
12559
+ * - Memoized storage instances per (symbol, strategyName, exchangeName, frameName) context
12560
+ * - Custom adapter support
12561
+ * - Atomic read/write operations
12562
+ * - Crash-safe recent signal state management
12563
+ *
12564
+ * Used by RecentPersistBacktestUtils/RecentPersistLiveUtils for recent signal persistence.
12565
+ */
12566
+ declare class PersistRecentUtils {
12567
+ private PersistRecentFactory;
12568
+ private getStorage;
12569
+ private createKeyParts;
12570
+ /**
12571
+ * Registers a custom persistence adapter.
12572
+ *
12573
+ * @param Ctor - Custom PersistBase constructor
12574
+ */
12575
+ usePersistRecentAdapter(Ctor: TPersistBaseCtor<string, IPublicSignalRow>): void;
12576
+ /**
12577
+ * Reads the latest persisted recent signal for a given context.
12578
+ *
12579
+ * Returns null if no recent signal exists.
12580
+ *
12581
+ * @param symbol - Trading pair symbol
12582
+ * @param strategyName - Strategy identifier
12583
+ * @param exchangeName - Exchange identifier
12584
+ * @param frameName - Frame identifier
12585
+ * @returns Promise resolving to recent signal or null
12586
+ */
12587
+ readRecentData: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
12588
+ /**
12589
+ * Writes the latest recent signal to disk with atomic file writes.
12590
+ *
12591
+ * Uses symbol as the entity ID within the per-context storage instance.
12592
+ * Uses atomic writes to prevent corruption on crashes.
12593
+ *
12594
+ * @param signalRow - Recent signal data to persist
12595
+ * @param symbol - Trading pair symbol
12596
+ * @param strategyName - Strategy identifier
12597
+ * @param exchangeName - Exchange identifier
12598
+ * @param frameName - Frame identifier
12599
+ * @returns Promise that resolves when write is complete
12600
+ */
12601
+ writeRecentData: (signalRow: IPublicSignalRow, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<void>;
12602
+ /**
12603
+ * Clears the memoized storage cache.
12604
+ * Call this when process.cwd() changes between strategy iterations
12605
+ * so new storage instances are created with the updated base path.
12606
+ */
12607
+ clear(): void;
12608
+ /**
12609
+ * Switches to the default JSON persist adapter.
12610
+ * All future persistence writes will use JSON storage.
12611
+ */
12612
+ useJson(): void;
12613
+ /**
12614
+ * Switches to a dummy persist adapter that discards all writes.
12615
+ * All future persistence writes will be no-ops.
12616
+ */
12617
+ useDummy(): void;
12618
+ }
12619
+ /**
12620
+ * Global singleton instance of PersistRecentUtils.
12621
+ * Used by RecentPersistBacktestUtils/RecentPersistLiveUtils for recent signal persistence.
12622
+ */
12623
+ declare const PersistRecentAdapter: PersistRecentUtils;
12522
12624
 
12523
12625
  /**
12524
12626
  * Configuration interface for selective markdown service enablement.
@@ -13338,6 +13440,23 @@ declare class LogAdapter implements ILog {
13338
13440
  */
13339
13441
  declare const Log: LogAdapter;
13340
13442
 
13443
+ /** Callable that restores a previously saved subject snapshot */
13444
+ type RestoreSnapshot = () => void;
13445
+ /**
13446
+ * Manages isolation of global event-bus state between backtest sessions.
13447
+ * Allows temporarily detaching all subject subscriptions so that one session
13448
+ * does not interfere with another, then restoring them afterwards.
13449
+ */
13450
+ declare class SessionUtils {
13451
+ /**
13452
+ * Snapshots the current listener state of every global subject by replacing
13453
+ * their internal `_events` map with an empty object.
13454
+ * @returns A restore function that, when called, puts all original listeners back.
13455
+ */
13456
+ createSnapshot: () => RestoreSnapshot;
13457
+ }
13458
+ declare const Session: SessionUtils;
13459
+
13341
13460
  /**
13342
13461
  * Type alias for column configuration used in backtest markdown reports.
13343
13462
  *
@@ -20064,6 +20183,184 @@ declare const StorageLive: StorageLiveAdapter;
20064
20183
  */
20065
20184
  declare const StorageBacktest: StorageBacktestAdapter;
20066
20185
 
20186
+ /**
20187
+ * Base interface for recent signal storage adapters.
20188
+ */
20189
+ interface IRecentUtils {
20190
+ /**
20191
+ * Handles active ping event and persists the latest signal.
20192
+ * @param event - Active ping contract with signal data
20193
+ */
20194
+ handleActivePing(event: ActivePingContract): Promise<void>;
20195
+ /**
20196
+ * Retrieves the latest active signal for the given context.
20197
+ * @param symbol - Trading pair symbol
20198
+ * @param strategyName - Strategy identifier
20199
+ * @param exchangeName - Exchange identifier
20200
+ * @param frameName - Frame identifier
20201
+ * @param backtest - Flag indicating if the context is backtest or live
20202
+ * @returns The latest signal or null if not found
20203
+ */
20204
+ getLatestSignal(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean): Promise<IPublicSignalRow | null>;
20205
+ }
20206
+ /**
20207
+ * Constructor type for recent signal storage adapters.
20208
+ */
20209
+ type TRecentUtilsCtor = new () => IRecentUtils;
20210
+ /**
20211
+ * Backtest recent signal adapter with pluggable storage backend.
20212
+ *
20213
+ * Features:
20214
+ * - Adapter pattern for swappable storage implementations
20215
+ * - Default adapter: RecentMemoryBacktestUtils (in-memory storage)
20216
+ * - Alternative adapter: RecentPersistBacktestUtils
20217
+ * - Convenience methods: usePersist(), useMemory()
20218
+ */
20219
+ declare class RecentBacktestAdapter implements IRecentUtils {
20220
+ /** Internal storage utils instance */
20221
+ private _recentBacktestUtils;
20222
+ /**
20223
+ * Handles active ping event.
20224
+ * Proxies call to the underlying storage adapter.
20225
+ * @param event - Active ping contract with signal data
20226
+ */
20227
+ handleActivePing: (event: ActivePingContract) => Promise<void>;
20228
+ /**
20229
+ * Retrieves the latest signal for the given context.
20230
+ * Proxies call to the underlying storage adapter.
20231
+ * @param symbol - Trading pair symbol
20232
+ * @param strategyName - Strategy identifier
20233
+ * @param exchangeName - Exchange identifier
20234
+ * @param frameName - Frame identifier
20235
+ * @param backtest - Flag indicating if the context is backtest or live
20236
+ * @returns The latest signal or null if not found
20237
+ */
20238
+ getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
20239
+ /**
20240
+ * Sets the storage adapter constructor.
20241
+ * All future storage operations will use this adapter.
20242
+ * @param Ctor - Constructor for recent adapter
20243
+ */
20244
+ useRecentAdapter: (Ctor: TRecentUtilsCtor) => void;
20245
+ /**
20246
+ * Switches to persistent storage adapter.
20247
+ * Signals will be persisted to disk.
20248
+ */
20249
+ usePersist: () => void;
20250
+ /**
20251
+ * Switches to in-memory storage adapter (default).
20252
+ * Signals will be stored in memory only.
20253
+ */
20254
+ useMemory: () => void;
20255
+ /**
20256
+ * Clears the cached utils instance by resetting to the default in-memory adapter.
20257
+ */
20258
+ clear: () => void;
20259
+ }
20260
+ /**
20261
+ * Live recent signal adapter with pluggable storage backend.
20262
+ *
20263
+ * Features:
20264
+ * - Adapter pattern for swappable storage implementations
20265
+ * - Default adapter: RecentPersistLiveUtils (persistent storage)
20266
+ * - Alternative adapter: RecentMemoryLiveUtils
20267
+ * - Convenience methods: usePersist(), useMemory()
20268
+ */
20269
+ declare class RecentLiveAdapter implements IRecentUtils {
20270
+ /** Internal storage utils instance */
20271
+ private _recentLiveUtils;
20272
+ /**
20273
+ * Handles active ping event.
20274
+ * Proxies call to the underlying storage adapter.
20275
+ * @param event - Active ping contract with signal data
20276
+ */
20277
+ handleActivePing: (event: ActivePingContract) => Promise<void>;
20278
+ /**
20279
+ * Retrieves the latest signal for the given context.
20280
+ * Proxies call to the underlying storage adapter.
20281
+ * @param symbol - Trading pair symbol
20282
+ * @param strategyName - Strategy identifier
20283
+ * @param exchangeName - Exchange identifier
20284
+ * @param frameName - Frame identifier
20285
+ * @param backtest - Flag indicating if the context is backtest or live
20286
+ * @returns The latest signal or null if not found
20287
+ */
20288
+ getLatestSignal: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName, frameName: FrameName, backtest: boolean) => Promise<IPublicSignalRow | null>;
20289
+ /**
20290
+ * Sets the storage adapter constructor.
20291
+ * All future storage operations will use this adapter.
20292
+ * @param Ctor - Constructor for recent adapter
20293
+ */
20294
+ useRecentAdapter: (Ctor: TRecentUtilsCtor) => void;
20295
+ /**
20296
+ * Switches to persistent storage adapter (default).
20297
+ * Signals will be persisted to disk.
20298
+ */
20299
+ usePersist: () => void;
20300
+ /**
20301
+ * Switches to in-memory storage adapter.
20302
+ * Signals will be stored in memory only.
20303
+ */
20304
+ useMemory: () => void;
20305
+ /**
20306
+ * Clears the cached utils instance by resetting to the default persistent adapter.
20307
+ */
20308
+ clear: () => void;
20309
+ }
20310
+ /**
20311
+ * Main recent signal adapter that manages both backtest and live recent signal storage.
20312
+ *
20313
+ * Features:
20314
+ * - Subscribes to activePingSubject for automatic storage updates
20315
+ * - Provides unified access to the latest signal for any context
20316
+ * - Singleshot enable pattern prevents duplicate subscriptions
20317
+ * - Cleanup function for proper unsubscription
20318
+ */
20319
+ declare class RecentAdapter {
20320
+ /**
20321
+ * Enables recent signal storage by subscribing to activePingSubject.
20322
+ * Uses singleshot to ensure one-time subscription.
20323
+ *
20324
+ * @returns Cleanup function that unsubscribes from all emitters
20325
+ */
20326
+ enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable;
20327
+ /**
20328
+ * Disables recent signal storage by unsubscribing from all emitters.
20329
+ * Safe to call multiple times.
20330
+ */
20331
+ disable: () => void;
20332
+ /**
20333
+ * Retrieves the latest active signal for the given symbol and context.
20334
+ * Searches backtest storage first, then live storage.
20335
+ *
20336
+ * @param symbol - Trading pair symbol
20337
+ * @param context - Execution context with strategyName, exchangeName, and frameName
20338
+ * @param backtest - Flag indicating if the context is backtest or live
20339
+ * @returns The latest signal or null if not found
20340
+ * @throws Error if RecentAdapter is not enabled
20341
+ */
20342
+ getLatestSignal: (symbol: string, context: {
20343
+ strategyName: StrategyName;
20344
+ exchangeName: ExchangeName;
20345
+ frameName: FrameName;
20346
+ }) => Promise<IPublicSignalRow | null>;
20347
+ }
20348
+ /**
20349
+ * Global singleton instance of RecentAdapter.
20350
+ * Provides unified recent signal management for backtest and live trading.
20351
+ */
20352
+ declare const Recent: RecentAdapter;
20353
+ /**
20354
+ * Global singleton instance of RecentLiveAdapter.
20355
+ * Provides live trading recent signal storage with pluggable backends.
20356
+ */
20357
+ declare const RecentLive: RecentLiveAdapter;
20358
+ /**
20359
+ * Global singleton instance of RecentBacktestAdapter.
20360
+ * Provides backtest recent signal storage with pluggable backends.
20361
+ */
20362
+ declare const RecentBacktest: RecentBacktestAdapter;
20363
+
20067
20364
  /**
20068
20365
  * Base interface for notification adapters.
20069
20366
  * All notification adapters must implement this interface.
@@ -21026,6 +21323,7 @@ declare class CacheUtils {
21026
21323
  }) => T & {
21027
21324
  clear(): void;
21028
21325
  gc(): number | undefined;
21326
+ hasValue(...args: Parameters<T>): boolean;
21029
21327
  };
21030
21328
  /**
21031
21329
  * Wrap an async function with persistent file-based caching.
@@ -21071,6 +21369,7 @@ declare class CacheUtils {
21071
21369
  key?: (args: CacheFileKeyArgs<T>) => string;
21072
21370
  }) => T & {
21073
21371
  clear(): Promise<void>;
21372
+ hasValue(...args: Parameters<T>): Promise<boolean>;
21074
21373
  };
21075
21374
  /**
21076
21375
  * Dispose (remove) the memoized CacheFnInstance for a specific function.
@@ -21210,6 +21509,7 @@ declare class IntervalUtils {
21210
21509
  }) => F & {
21211
21510
  clear(): void;
21212
21511
  gc(): number | undefined;
21512
+ hasValue(...args: Parameters<F>): boolean;
21213
21513
  };
21214
21514
  /**
21215
21515
  * Wrap an async signal function with persistent file-based once-per-interval firing.
@@ -21246,6 +21546,7 @@ declare class IntervalUtils {
21246
21546
  key?: (args: IntervalFileKeyArgs<F>) => string;
21247
21547
  }) => F & {
21248
21548
  clear(): Promise<void>;
21549
+ hasValue(...args: Parameters<F>): Promise<boolean>;
21249
21550
  };
21250
21551
  /**
21251
21552
  * Dispose (remove) the memoized `IntervalFnInstance` for a specific function.
@@ -31278,4 +31579,4 @@ declare const getTotalClosed: (signal: Signal) => {
31278
31579
  remainingCostBasis: number;
31279
31580
  };
31280
31581
 
31281
- 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 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, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, 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, 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 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, 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 };
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 };