backtest-kit 5.9.0 → 5.11.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/README.md +17 -4
- package/build/index.cjs +812 -412
- package/build/index.mjs +809 -413
- package/package.json +1 -1
- package/types.d.ts +117 -10
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ type TExecutionContextService = InstanceType<typeof ExecutionContextService>;
|
|
|
65
65
|
* Hours: 1h, 2h, 4h, 6h, 8h, 12h
|
|
66
66
|
* Days: 1d, 3d
|
|
67
67
|
*/
|
|
68
|
-
type FrameInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "
|
|
68
|
+
type FrameInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "1w" | "1M";
|
|
69
69
|
/**
|
|
70
70
|
* Frame parameters passed to ClientFrame constructor.
|
|
71
71
|
* Extends IFrameSchema with logger instance for internal logging.
|
|
@@ -2938,7 +2938,7 @@ interface IStrategy {
|
|
|
2938
2938
|
* @param candles - Array of historical candle data
|
|
2939
2939
|
* @returns Promise resolving to closed result (always completes signal)
|
|
2940
2940
|
*/
|
|
2941
|
-
backtest: (symbol: string, strategyName: StrategyName, candles: ICandleData[]) => Promise<IStrategyBacktestResult>;
|
|
2941
|
+
backtest: (symbol: string, strategyName: StrategyName, candles: ICandleData[], frameEndTime: number) => Promise<IStrategyBacktestResult>;
|
|
2942
2942
|
/**
|
|
2943
2943
|
* Stops the strategy from generating new signals.
|
|
2944
2944
|
*
|
|
@@ -3613,7 +3613,7 @@ interface ILogger {
|
|
|
3613
3613
|
/**
|
|
3614
3614
|
* Candle time interval for fetching historical data.
|
|
3615
3615
|
*/
|
|
3616
|
-
type CandleInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h";
|
|
3616
|
+
type CandleInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "1d" | "1w";
|
|
3617
3617
|
/** Numeric type that can be undefined (used for optional numeric values) */
|
|
3618
3618
|
type Num = number | undefined;
|
|
3619
3619
|
interface IPublicCandleData {
|
|
@@ -5755,6 +5755,16 @@ declare const GLOBAL_CONFIG: {
|
|
|
5755
5755
|
* Default: false (PPPL logic is only applied when it does not break the direction of exits, ensuring clearer profit/loss outcomes)
|
|
5756
5756
|
*/
|
|
5757
5757
|
CC_ENABLE_PPPL_EVERYWHERE: boolean;
|
|
5758
|
+
/**
|
|
5759
|
+
* Enables trailing logic (Trailing Take / Trailing Stop) without requiring absorption conditions.
|
|
5760
|
+
* Allows trailing mechanisms to be activated regardless of whether absorption has been detected.
|
|
5761
|
+
*
|
|
5762
|
+
* This can lead to earlier or more frequent trailing activation, improving reactivity to price movement,
|
|
5763
|
+
* but may increase sensitivity to noise and result in premature exits.
|
|
5764
|
+
*
|
|
5765
|
+
* Default: false (trailing logic is applied only when absorption conditions are met)
|
|
5766
|
+
*/
|
|
5767
|
+
CC_ENABLE_TRAILING_EVERYWHERE: boolean;
|
|
5758
5768
|
/**
|
|
5759
5769
|
* Cost of entering a position (in USD).
|
|
5760
5770
|
* This is used as a default value for calculating position size and risk management when cost data is not provided by the strategy
|
|
@@ -5890,6 +5900,7 @@ declare function getConfig(): {
|
|
|
5890
5900
|
CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
|
|
5891
5901
|
CC_ENABLE_DCA_EVERYWHERE: boolean;
|
|
5892
5902
|
CC_ENABLE_PPPL_EVERYWHERE: boolean;
|
|
5903
|
+
CC_ENABLE_TRAILING_EVERYWHERE: boolean;
|
|
5893
5904
|
CC_POSITION_ENTRY_COST: number;
|
|
5894
5905
|
};
|
|
5895
5906
|
/**
|
|
@@ -5944,6 +5955,7 @@ declare function getDefaultConfig(): Readonly<{
|
|
|
5944
5955
|
CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
|
|
5945
5956
|
CC_ENABLE_DCA_EVERYWHERE: boolean;
|
|
5946
5957
|
CC_ENABLE_PPPL_EVERYWHERE: boolean;
|
|
5958
|
+
CC_ENABLE_TRAILING_EVERYWHERE: boolean;
|
|
5947
5959
|
CC_POSITION_ENTRY_COST: number;
|
|
5948
5960
|
}>;
|
|
5949
5961
|
/**
|
|
@@ -8417,6 +8429,7 @@ declare function writeMemory<T extends object = object>(dto: {
|
|
|
8417
8429
|
bucketName: string;
|
|
8418
8430
|
memoryId: string;
|
|
8419
8431
|
value: T;
|
|
8432
|
+
description: string;
|
|
8420
8433
|
}): Promise<void>;
|
|
8421
8434
|
/**
|
|
8422
8435
|
* Reads a value from memory scoped to the current signal.
|
|
@@ -18458,9 +18471,9 @@ interface IMemoryInstance {
|
|
|
18458
18471
|
* Write a value to memory.
|
|
18459
18472
|
* @param memoryId - Unique entry identifier
|
|
18460
18473
|
* @param value - Value to store
|
|
18461
|
-
* @param
|
|
18474
|
+
* @param description - Optional BM25 index string; defaults to JSON.stringify(value)
|
|
18462
18475
|
*/
|
|
18463
|
-
writeMemory<T extends object = object>(memoryId: string, value: T,
|
|
18476
|
+
writeMemory<T extends object = object>(memoryId: string, value: T, description: string): Promise<void>;
|
|
18464
18477
|
/**
|
|
18465
18478
|
* Search memory using BM25 full-text scoring.
|
|
18466
18479
|
* @param query - Search query string
|
|
@@ -18541,14 +18554,14 @@ declare class MemoryAdapter implements TMemoryInstance {
|
|
|
18541
18554
|
* @param dto.value - Value to store
|
|
18542
18555
|
* @param dto.signalId - Signal identifier
|
|
18543
18556
|
* @param dto.bucketName - Bucket name
|
|
18544
|
-
* @param dto.
|
|
18557
|
+
* @param dto.description - Optional BM25 index string; defaults to JSON.stringify(value)
|
|
18545
18558
|
*/
|
|
18546
18559
|
writeMemory: <T extends object = object>(dto: {
|
|
18547
18560
|
memoryId: string;
|
|
18548
18561
|
value: T;
|
|
18549
18562
|
signalId: string;
|
|
18550
18563
|
bucketName: string;
|
|
18551
|
-
|
|
18564
|
+
description: string;
|
|
18552
18565
|
}) => Promise<void>;
|
|
18553
18566
|
/**
|
|
18554
18567
|
* Search memory using BM25 full-text scoring.
|
|
@@ -21069,6 +21082,21 @@ interface IBroker {
|
|
|
21069
21082
|
/** Called when a DCA (average-buy) entry is committed. */
|
|
21070
21083
|
onAverageBuyCommit(payload: BrokerAverageBuyPayload): Promise<void>;
|
|
21071
21084
|
}
|
|
21085
|
+
/**
|
|
21086
|
+
* Constructor type for a broker adapter class.
|
|
21087
|
+
*
|
|
21088
|
+
* Used by `BrokerAdapter.useBrokerAdapter` to accept a class (not an instance).
|
|
21089
|
+
* All `IBroker` methods are optional — implement only what the adapter needs.
|
|
21090
|
+
*
|
|
21091
|
+
* @example
|
|
21092
|
+
* ```typescript
|
|
21093
|
+
* class MyBroker implements Partial<IBroker> {
|
|
21094
|
+
* async onSignalOpenCommit(payload: BrokerSignalOpenPayload) { ... }
|
|
21095
|
+
* }
|
|
21096
|
+
*
|
|
21097
|
+
* Broker.useBrokerAdapter(MyBroker); // MyBroker satisfies TBrokerCtor
|
|
21098
|
+
* ```
|
|
21099
|
+
*/
|
|
21072
21100
|
type TBrokerCtor = new () => Partial<IBroker>;
|
|
21073
21101
|
/**
|
|
21074
21102
|
* Facade for broker integration — intercepts all commit* operations before DI-core mutations.
|
|
@@ -22117,6 +22145,85 @@ declare const tpPercentShiftToPrice: (percentShift: number, originalTakeProfitPr
|
|
|
22117
22145
|
*/
|
|
22118
22146
|
declare const percentToCloseCost: (percentToClose: number, investedCost: number) => number;
|
|
22119
22147
|
|
|
22148
|
+
/**
|
|
22149
|
+
* Validates ISignalDto returned by getSignal, branching on the same logic as ClientStrategy GET_SIGNAL_FN.
|
|
22150
|
+
*
|
|
22151
|
+
* When priceOpen is provided:
|
|
22152
|
+
* - If currentPrice already reached priceOpen (shouldActivateImmediately) →
|
|
22153
|
+
* validates as pending: currentPrice must be between SL and TP
|
|
22154
|
+
* - Otherwise → validates as scheduled: priceOpen must be between SL and TP
|
|
22155
|
+
*
|
|
22156
|
+
* When priceOpen is absent:
|
|
22157
|
+
* - Validates as pending: currentPrice must be between SL and TP
|
|
22158
|
+
*
|
|
22159
|
+
* Checks:
|
|
22160
|
+
* - currentPrice is a finite positive number
|
|
22161
|
+
* - Common signal fields via validateCommonSignal (position, prices, TP/SL relationships, minuteEstimatedTime)
|
|
22162
|
+
* - Position-specific immediate-close protection (pending) or activation-close protection (scheduled)
|
|
22163
|
+
*
|
|
22164
|
+
* @param signal - Signal DTO returned by getSignal
|
|
22165
|
+
* @param currentPrice - Current market price at the moment of signal creation
|
|
22166
|
+
* @returns true if signal is valid, false if validation errors were found (errors logged to console.error)
|
|
22167
|
+
*/
|
|
22168
|
+
declare const validateSignal: (signal: ISignalDto, currentPrice: number) => boolean;
|
|
22169
|
+
|
|
22170
|
+
/**
|
|
22171
|
+
* Validates the common fields of ISignalDto that apply to both pending and scheduled signals.
|
|
22172
|
+
*
|
|
22173
|
+
* Checks:
|
|
22174
|
+
* - position is "long" or "short"
|
|
22175
|
+
* - priceOpen, priceTakeProfit, priceStopLoss are finite positive numbers
|
|
22176
|
+
* - price relationships are correct for position direction (TP/SL on correct sides of priceOpen)
|
|
22177
|
+
* - TP/SL distance constraints from GLOBAL_CONFIG
|
|
22178
|
+
* - minuteEstimatedTime is valid
|
|
22179
|
+
*
|
|
22180
|
+
* Does NOT check:
|
|
22181
|
+
* - currentPrice vs SL/TP (immediate close protection — handled by pending/scheduled validators)
|
|
22182
|
+
* - ISignalRow-specific fields: id, exchangeName, strategyName, symbol, _isScheduled, scheduledAt, pendingAt
|
|
22183
|
+
*
|
|
22184
|
+
* @deprecated This is an internal code exported for unit tests only. Use `validateSignal` in Strategy::getSignal
|
|
22185
|
+
*
|
|
22186
|
+
* @param signal - Signal DTO to validate
|
|
22187
|
+
* @returns Array of error strings (empty if valid)
|
|
22188
|
+
*/
|
|
22189
|
+
declare const validateCommonSignal: (signal: ISignalDto) => void;
|
|
22190
|
+
|
|
22191
|
+
/**
|
|
22192
|
+
* Validates a pending (immediately active) signal before it is opened.
|
|
22193
|
+
*
|
|
22194
|
+
* Checks:
|
|
22195
|
+
* - ISignalRow-specific fields: id, exchangeName, strategyName, symbol, _isScheduled
|
|
22196
|
+
* - currentPrice is a finite positive number
|
|
22197
|
+
* - Common signal fields via validateCommonSignal (position, prices, TP/SL relationships, minuteEstimatedTime)
|
|
22198
|
+
* - currentPrice is between SL and TP — position would not be immediately closed on open
|
|
22199
|
+
* - scheduledAt and pendingAt are positive numbers
|
|
22200
|
+
*
|
|
22201
|
+
* @deprecated This is an internal code exported for unit tests only. Use `validateSignal` in Strategy::getSignal
|
|
22202
|
+
*
|
|
22203
|
+
* @param signal - Pending signal row to validate
|
|
22204
|
+
* @param currentPrice - Current market price at the moment of signal creation
|
|
22205
|
+
* @throws {Error} If any validation check fails
|
|
22206
|
+
*/
|
|
22207
|
+
declare const validatePendingSignal: (signal: ISignalRow, currentPrice: number) => void;
|
|
22208
|
+
|
|
22209
|
+
/**
|
|
22210
|
+
* Validates a scheduled signal before it is registered for activation.
|
|
22211
|
+
*
|
|
22212
|
+
* Checks:
|
|
22213
|
+
* - ISignalRow-specific fields: id, exchangeName, strategyName, symbol, _isScheduled
|
|
22214
|
+
* - currentPrice is a finite positive number
|
|
22215
|
+
* - Common signal fields via validateCommonSignal (position, prices, TP/SL relationships, minuteEstimatedTime)
|
|
22216
|
+
* - priceOpen is between SL and TP — position would not be immediately closed upon activation
|
|
22217
|
+
* - scheduledAt is a positive number (pendingAt === 0 is allowed until activation)
|
|
22218
|
+
*
|
|
22219
|
+
* @deprecated This is an internal code exported for unit tests only. Use `validateSignal` in Strategy::getSignal
|
|
22220
|
+
*
|
|
22221
|
+
* @param signal - Scheduled signal row to validate
|
|
22222
|
+
* @param currentPrice - Current market price at the moment of signal creation
|
|
22223
|
+
* @throws {Error} If any validation check fails
|
|
22224
|
+
*/
|
|
22225
|
+
declare const validateScheduledSignal: (signal: IScheduledSignalRow, currentPrice: number) => void;
|
|
22226
|
+
|
|
22120
22227
|
/**
|
|
22121
22228
|
* Client implementation for exchange data access.
|
|
22122
22229
|
*
|
|
@@ -23650,7 +23757,7 @@ declare class StrategyConnectionService implements TStrategy$1 {
|
|
|
23650
23757
|
strategyName: StrategyName;
|
|
23651
23758
|
exchangeName: ExchangeName;
|
|
23652
23759
|
frameName: FrameName;
|
|
23653
|
-
}, candles: ICandleData[]) => Promise<IStrategyTickResultClosed | IStrategyTickResultCancelled | IStrategyTickResultActive>;
|
|
23760
|
+
}, candles: ICandleData[], frameEndTime: number) => Promise<IStrategyTickResultClosed | IStrategyTickResultCancelled | IStrategyTickResultActive>;
|
|
23654
23761
|
/**
|
|
23655
23762
|
* Stops the specified strategy from generating new signals.
|
|
23656
23763
|
*
|
|
@@ -25046,7 +25153,7 @@ declare class StrategyCoreService implements TStrategy {
|
|
|
25046
25153
|
* @param context - Execution context with strategyName, exchangeName, frameName
|
|
25047
25154
|
* @returns Closed signal result with PNL
|
|
25048
25155
|
*/
|
|
25049
|
-
backtest: (symbol: string, candles: ICandleData[], when: Date, backtest: boolean, context: {
|
|
25156
|
+
backtest: (symbol: string, candles: ICandleData[], frameEndTime: number, when: Date, backtest: boolean, context: {
|
|
25050
25157
|
strategyName: StrategyName;
|
|
25051
25158
|
exchangeName: ExchangeName;
|
|
25052
25159
|
frameName: FrameName;
|
|
@@ -28268,4 +28375,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
28268
28375
|
remainingCostBasis: number;
|
|
28269
28376
|
};
|
|
28270
28377
|
|
|
28271
|
-
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 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, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, 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, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Report, ReportBase, type ReportName, 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, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, 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, 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, searchMemory, set, setColumns, setConfig, setLogger, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, waitForCandle, warmCandles, writeMemory };
|
|
28378
|
+
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 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, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, 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, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Report, ReportBase, type ReportName, 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, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, 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, 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, searchMemory, set, setColumns, setConfig, setLogger, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
|