backtest-kit 13.0.0 → 13.2.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/build/index.cjs +505 -131
- package/build/index.mjs +504 -132
- package/package.json +1 -1
- package/types.d.ts +231 -2
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -2423,6 +2423,35 @@ type StrategyCommitContract = CancelScheduledCommit | ClosePendingCommit | Parti
|
|
|
2423
2423
|
* The content of this object is not defined by the system and can be used freely by strategy implementations.
|
|
2424
2424
|
*/
|
|
2425
2425
|
type RuntimeData = Record<string, unknown>;
|
|
2426
|
+
/**
|
|
2427
|
+
* Type for persisted deferred strategy state.
|
|
2428
|
+
* Snapshot of the in-flight commit queue and deferred user actions that have not yet
|
|
2429
|
+
* been forwarded to the broker. Restored on waitForInit after a live crash so the
|
|
2430
|
+
* pending broker operations are not silently lost.
|
|
2431
|
+
*/
|
|
2432
|
+
type StrategyStatus = {
|
|
2433
|
+
/**
|
|
2434
|
+
* Id of the pending signal these deferred operations belong to (from _pendingSignal.id),
|
|
2435
|
+
* or null if there was no pending signal when the snapshot was written. On restore, the
|
|
2436
|
+
* deferred fields are applied only when this matches the restored _pendingSignal.id —
|
|
2437
|
+
* otherwise the snapshot belongs to a different/stale position and is discarded.
|
|
2438
|
+
*/
|
|
2439
|
+
pendingSignalId: string | null;
|
|
2440
|
+
/**
|
|
2441
|
+
* User-supplied signal DTO scheduled to be consumed by the next getSignal tick instead
|
|
2442
|
+
* of params.getSignal (set via createPending / createScheduled), or null if none queued.
|
|
2443
|
+
* createPending and createScheduled overwrite the same slot, so only the latest wins.
|
|
2444
|
+
*/
|
|
2445
|
+
createSignal: ISignalDto | null;
|
|
2446
|
+
/** Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained */
|
|
2447
|
+
commitQueue: ICommitRow[];
|
|
2448
|
+
/** Deferred user-initiated close (closePending), or null if none pending */
|
|
2449
|
+
closedSignal: ISignalCloseRow | null;
|
|
2450
|
+
/** Deferred user-initiated scheduled cancel (cancelScheduled), or null if none pending */
|
|
2451
|
+
cancelledSignal: IScheduledSignalCancelRow | null;
|
|
2452
|
+
/** Deferred user-initiated scheduled activate (activateScheduled), or null if none pending */
|
|
2453
|
+
activatedSignal: IScheduledSignalActivateRow | null;
|
|
2454
|
+
};
|
|
2426
2455
|
/**
|
|
2427
2456
|
* Commit payload for strategy commits.
|
|
2428
2457
|
* Used in activateScheduled, closePending, cancelScheduled
|
|
@@ -2919,7 +2948,7 @@ interface IStrategySchema {
|
|
|
2919
2948
|
* If priceOpen is provided - becomes scheduled signal waiting for price to reach entry point.
|
|
2920
2949
|
* If priceOpen is omitted - opens immediately at current price.
|
|
2921
2950
|
*/
|
|
2922
|
-
getSignal
|
|
2951
|
+
getSignal?: (symbol: string, when: Date, currentPrice: number) => Promise<ISignalDto | null>;
|
|
2923
2952
|
/** Optional lifecycle event callbacks (onOpen, onClose) */
|
|
2924
2953
|
callbacks?: Partial<IStrategyCallbacks>;
|
|
2925
2954
|
/** Optional risk profile identifier for risk management */
|
|
@@ -3428,6 +3457,29 @@ interface IStrategy {
|
|
|
3428
3457
|
* ```
|
|
3429
3458
|
*/
|
|
3430
3459
|
closePending: (symbol: string, backtest: boolean, payload: Partial<CommitPayload>) => Promise<void>;
|
|
3460
|
+
/**
|
|
3461
|
+
* Queues a user-supplied signal DTO to be consumed by the next tick instead of
|
|
3462
|
+
* params.getSignal. Works out of the async-hooks execution context. The DTO is validated
|
|
3463
|
+
* (reusing validateCommonSignal with priceOpen defaulting to currentPrice) before being
|
|
3464
|
+
* stored, and the call is rejected if a signal or deferred action is already in flight.
|
|
3465
|
+
* priceOpen is optional — when omitted the position opens immediately at currentPrice;
|
|
3466
|
+
* when provided the pipeline decides immediate-vs-scheduled.
|
|
3467
|
+
*
|
|
3468
|
+
* @param symbol - Trading pair symbol (e.g., "BTCUSDT")
|
|
3469
|
+
* @param currentPrice - Current market price (priceOpen fallback for immediate signals)
|
|
3470
|
+
* @param dto - Signal DTO to open
|
|
3471
|
+
* @returns Promise that resolves when the DTO is queued
|
|
3472
|
+
*/
|
|
3473
|
+
createSignal: (symbol: string, currentPrice: number, dto: ISignalDto) => Promise<void>;
|
|
3474
|
+
/**
|
|
3475
|
+
* Returns the deferred strategy-state snapshot held in memory for this iteration — exactly
|
|
3476
|
+
* what would be written to persist (queued createSignal, commit queue, deferred user-action
|
|
3477
|
+
* flags and the current pending signal id). Synchronous in-memory read; works out of context.
|
|
3478
|
+
*
|
|
3479
|
+
* @param symbol - Trading pair symbol (e.g., "BTCUSDT")
|
|
3480
|
+
* @returns The current StrategyData snapshot
|
|
3481
|
+
*/
|
|
3482
|
+
getStatus: (symbol: string) => Promise<StrategyStatus>;
|
|
3431
3483
|
/**
|
|
3432
3484
|
* Executes partial close at profit level (moving toward TP).
|
|
3433
3485
|
*
|
|
@@ -6447,6 +6499,47 @@ declare function hasNoScheduledSignal(symbol: string): Promise<boolean>;
|
|
|
6447
6499
|
* ```
|
|
6448
6500
|
*/
|
|
6449
6501
|
declare function commitSignalNotify(symbol: string, payload?: Partial<SignalNotificationPayload>): Promise<void>;
|
|
6502
|
+
/**
|
|
6503
|
+
* Queues a user-supplied signal DTO to be consumed by the next tick instead of params.getSignal.
|
|
6504
|
+
*
|
|
6505
|
+
* priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
|
|
6506
|
+
* current price; provided → opens immediately if already reached, otherwise registers a
|
|
6507
|
+
* scheduled (priceOpen-awaiting) signal. The DTO is validated (reusing validateSignal) and the
|
|
6508
|
+
* call is rejected if a signal or deferred action is already in flight.
|
|
6509
|
+
*
|
|
6510
|
+
* Automatically detects backtest/live mode from execution context.
|
|
6511
|
+
*
|
|
6512
|
+
* @param symbol - Trading pair symbol
|
|
6513
|
+
* @param dto - Signal DTO to open (priceOpen optional)
|
|
6514
|
+
* @returns Promise that resolves when the DTO is queued
|
|
6515
|
+
*
|
|
6516
|
+
* @example
|
|
6517
|
+
* ```typescript
|
|
6518
|
+
* import { createSignal } from "backtest-kit";
|
|
6519
|
+
*
|
|
6520
|
+
* // Open immediately at current price
|
|
6521
|
+
* await commitCreateSignal("BTCUSDT", { position: "long", priceTakeProfit: 110, priceStopLoss: 90 });
|
|
6522
|
+
* ```
|
|
6523
|
+
*/
|
|
6524
|
+
declare function commitCreateSignal(symbol: string, dto: ISignalDto): Promise<void>;
|
|
6525
|
+
/**
|
|
6526
|
+
* Returns the in-memory deferred strategy-state snapshot for the current iteration: the queued
|
|
6527
|
+
* createSignal, commit queue and deferred user-action flags, plus the current pending signal id.
|
|
6528
|
+
*
|
|
6529
|
+
* Automatically detects backtest/live mode from execution context.
|
|
6530
|
+
*
|
|
6531
|
+
* @param symbol - Trading pair symbol
|
|
6532
|
+
* @returns Promise resolving to the current StrategyStatus snapshot
|
|
6533
|
+
*
|
|
6534
|
+
* @example
|
|
6535
|
+
* ```typescript
|
|
6536
|
+
* import { getStrategyStatus } from "backtest-kit";
|
|
6537
|
+
*
|
|
6538
|
+
* const status = await getStrategyStatus("BTCUSDT");
|
|
6539
|
+
* console.log(status.pendingSignalId, status.commitQueue.length);
|
|
6540
|
+
* ```
|
|
6541
|
+
*/
|
|
6542
|
+
declare function getStrategyStatus(symbol: string): Promise<StrategyStatus>;
|
|
6450
6543
|
|
|
6451
6544
|
/**
|
|
6452
6545
|
* Stops the strategy from generating new signals.
|
|
@@ -14123,6 +14216,19 @@ declare const PersistScheduleAdapter: PersistScheduleUtils;
|
|
|
14123
14216
|
* pending broker operations are not silently lost.
|
|
14124
14217
|
*/
|
|
14125
14218
|
type StrategyData = {
|
|
14219
|
+
/**
|
|
14220
|
+
* Id of the pending signal these deferred operations belong to (from _pendingSignal.id),
|
|
14221
|
+
* or null if there was no pending signal when the snapshot was written. On restore, the
|
|
14222
|
+
* deferred fields are applied only when this matches the restored _pendingSignal.id —
|
|
14223
|
+
* otherwise the snapshot belongs to a different/stale position and is discarded.
|
|
14224
|
+
*/
|
|
14225
|
+
pendingSignalId: string | null;
|
|
14226
|
+
/**
|
|
14227
|
+
* User-supplied signal DTO scheduled to be consumed by the next getSignal tick instead
|
|
14228
|
+
* of params.getSignal (set via createPending / createScheduled), or null if none queued.
|
|
14229
|
+
* createPending and createScheduled overwrite the same slot, so only the latest wins.
|
|
14230
|
+
*/
|
|
14231
|
+
createSignal: ISignalDto | null;
|
|
14126
14232
|
/** Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained */
|
|
14127
14233
|
commitQueue: ICommitRow[];
|
|
14128
14234
|
/** Deferred user-initiated close (closePending), or null if none pending */
|
|
@@ -18742,6 +18848,36 @@ declare class BacktestUtils {
|
|
|
18742
18848
|
exchangeName: ExchangeName;
|
|
18743
18849
|
frameName: FrameName;
|
|
18744
18850
|
}, payload?: Partial<CommitPayload>) => Promise<void>;
|
|
18851
|
+
/**
|
|
18852
|
+
* Queues a user-supplied signal DTO to be consumed by the next backtest tick instead of
|
|
18853
|
+
* params.getSignal.
|
|
18854
|
+
*
|
|
18855
|
+
* priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
|
|
18856
|
+
* current price; provided → opens immediately if already reached, otherwise registers a
|
|
18857
|
+
* scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.
|
|
18858
|
+
*
|
|
18859
|
+
* @param symbol - Trading pair symbol
|
|
18860
|
+
* @param context - Execution context with strategyName, exchangeName, and frameName
|
|
18861
|
+
* @param dto - Signal DTO to open (priceOpen optional)
|
|
18862
|
+
* @returns Promise that resolves when the DTO is queued
|
|
18863
|
+
*/
|
|
18864
|
+
commitCreateSignal: (symbol: string, context: {
|
|
18865
|
+
strategyName: StrategyName;
|
|
18866
|
+
exchangeName: ExchangeName;
|
|
18867
|
+
frameName: FrameName;
|
|
18868
|
+
}, dto: ISignalDto) => Promise<void>;
|
|
18869
|
+
/**
|
|
18870
|
+
* Returns the in-memory deferred strategy-state snapshot for the current backtest iteration.
|
|
18871
|
+
*
|
|
18872
|
+
* @param symbol - Trading pair symbol
|
|
18873
|
+
* @param context - Execution context with strategyName, exchangeName, and frameName
|
|
18874
|
+
* @returns Promise resolving to the current StrategyStatus snapshot
|
|
18875
|
+
*/
|
|
18876
|
+
getStrategyStatus: (symbol: string, context: {
|
|
18877
|
+
strategyName: StrategyName;
|
|
18878
|
+
exchangeName: ExchangeName;
|
|
18879
|
+
frameName: FrameName;
|
|
18880
|
+
}) => Promise<StrategyStatus>;
|
|
18745
18881
|
/**
|
|
18746
18882
|
* Executes partial close at profit level (moving toward TP).
|
|
18747
18883
|
*
|
|
@@ -20223,6 +20359,34 @@ declare class LiveUtils {
|
|
|
20223
20359
|
strategyName: StrategyName;
|
|
20224
20360
|
exchangeName: ExchangeName;
|
|
20225
20361
|
}, payload?: Partial<CommitPayload>) => Promise<void>;
|
|
20362
|
+
/**
|
|
20363
|
+
* Queues a user-supplied signal DTO to be consumed by the next live tick instead of
|
|
20364
|
+
* params.getSignal.
|
|
20365
|
+
*
|
|
20366
|
+
* priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
|
|
20367
|
+
* current price; provided → opens immediately if already reached, otherwise registers a
|
|
20368
|
+
* scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.
|
|
20369
|
+
*
|
|
20370
|
+
* @param symbol - Trading pair symbol
|
|
20371
|
+
* @param context - Execution context with strategyName and exchangeName
|
|
20372
|
+
* @param dto - Signal DTO to open (priceOpen optional)
|
|
20373
|
+
* @returns Promise that resolves when the DTO is queued
|
|
20374
|
+
*/
|
|
20375
|
+
commitCreateSignal: (symbol: string, context: {
|
|
20376
|
+
strategyName: StrategyName;
|
|
20377
|
+
exchangeName: ExchangeName;
|
|
20378
|
+
}, dto: ISignalDto) => Promise<void>;
|
|
20379
|
+
/**
|
|
20380
|
+
* Returns the in-memory deferred strategy-state snapshot for the current live iteration.
|
|
20381
|
+
*
|
|
20382
|
+
* @param symbol - Trading pair symbol
|
|
20383
|
+
* @param context - Execution context with strategyName and exchangeName
|
|
20384
|
+
* @returns Promise resolving to the current StrategyStatus snapshot
|
|
20385
|
+
*/
|
|
20386
|
+
getStrategyStatus: (symbol: string, context: {
|
|
20387
|
+
strategyName: StrategyName;
|
|
20388
|
+
exchangeName: ExchangeName;
|
|
20389
|
+
}) => Promise<StrategyStatus>;
|
|
20226
20390
|
/**
|
|
20227
20391
|
* Executes partial close at profit level (moving toward TP).
|
|
20228
20392
|
*
|
|
@@ -32255,6 +32419,38 @@ declare class StrategyConnectionService implements TStrategy$1 {
|
|
|
32255
32419
|
exchangeName: ExchangeName;
|
|
32256
32420
|
frameName: FrameName;
|
|
32257
32421
|
}, payload?: Partial<CommitPayload>) => Promise<void>;
|
|
32422
|
+
/**
|
|
32423
|
+
* Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.
|
|
32424
|
+
*
|
|
32425
|
+
* Delegates to ClientStrategy.createSignal(). Validated and rejected if a signal/deferred
|
|
32426
|
+
* action is already in flight. Works out of the async-hooks execution context.
|
|
32427
|
+
*
|
|
32428
|
+
* @param backtest - Whether running in backtest mode
|
|
32429
|
+
* @param symbol - Trading pair symbol
|
|
32430
|
+
* @param dto - Signal DTO to open
|
|
32431
|
+
* @param context - Context with strategyName, exchangeName, frameName
|
|
32432
|
+
* @returns Promise that resolves when the DTO is queued
|
|
32433
|
+
*/
|
|
32434
|
+
createSignal: (backtest: boolean, symbol: string, dto: ISignalDto, context: {
|
|
32435
|
+
strategyName: StrategyName;
|
|
32436
|
+
exchangeName: ExchangeName;
|
|
32437
|
+
frameName: FrameName;
|
|
32438
|
+
}) => Promise<void>;
|
|
32439
|
+
/**
|
|
32440
|
+
* Returns the in-memory deferred strategy-state snapshot for this iteration.
|
|
32441
|
+
*
|
|
32442
|
+
* Delegates to ClientStrategy.getStatus(). Synchronous in-memory read; works out of context.
|
|
32443
|
+
*
|
|
32444
|
+
* @param backtest - Whether running in backtest mode
|
|
32445
|
+
* @param symbol - Trading pair symbol
|
|
32446
|
+
* @param context - Context with strategyName, exchangeName, frameName
|
|
32447
|
+
* @returns Promise resolving to the current StrategyData snapshot
|
|
32448
|
+
*/
|
|
32449
|
+
getStatus: (backtest: boolean, symbol: string, context: {
|
|
32450
|
+
strategyName: StrategyName;
|
|
32451
|
+
exchangeName: ExchangeName;
|
|
32452
|
+
frameName: FrameName;
|
|
32453
|
+
}) => Promise<StrategyStatus>;
|
|
32258
32454
|
/**
|
|
32259
32455
|
* Checks whether `partialProfit` would succeed without executing it.
|
|
32260
32456
|
* Delegates to `ClientStrategy.validatePartialProfit()` — no throws, pure boolean result.
|
|
@@ -33834,6 +34030,39 @@ declare class StrategyCoreService implements TStrategy {
|
|
|
33834
34030
|
exchangeName: ExchangeName;
|
|
33835
34031
|
frameName: FrameName;
|
|
33836
34032
|
}, payload?: Partial<CommitPayload>) => Promise<void>;
|
|
34033
|
+
/**
|
|
34034
|
+
* Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.
|
|
34035
|
+
*
|
|
34036
|
+
* Validates the context, then delegates to StrategyConnectionService.createSignal().
|
|
34037
|
+
* Rejected if a signal or deferred action is already in flight. Does not require execution context.
|
|
34038
|
+
*
|
|
34039
|
+
* @param backtest - Whether running in backtest mode
|
|
34040
|
+
* @param symbol - Trading pair symbol
|
|
34041
|
+
* @param dto - Signal DTO to open
|
|
34042
|
+
* @param context - Context with strategyName, exchangeName, frameName
|
|
34043
|
+
* @returns Promise that resolves when the DTO is queued
|
|
34044
|
+
*/
|
|
34045
|
+
createSignal: (backtest: boolean, symbol: string, dto: ISignalDto, context: {
|
|
34046
|
+
strategyName: StrategyName;
|
|
34047
|
+
exchangeName: ExchangeName;
|
|
34048
|
+
frameName: FrameName;
|
|
34049
|
+
}) => Promise<void>;
|
|
34050
|
+
/**
|
|
34051
|
+
* Returns the in-memory deferred strategy-state snapshot for this iteration.
|
|
34052
|
+
*
|
|
34053
|
+
* Validates the context, then delegates to StrategyConnectionService.getStatus().
|
|
34054
|
+
* Does not require execution context.
|
|
34055
|
+
*
|
|
34056
|
+
* @param backtest - Whether running in backtest mode
|
|
34057
|
+
* @param symbol - Trading pair symbol
|
|
34058
|
+
* @param context - Context with strategyName, exchangeName, frameName
|
|
34059
|
+
* @returns Promise resolving to the current StrategyStatus snapshot
|
|
34060
|
+
*/
|
|
34061
|
+
getStatus: (backtest: boolean, symbol: string, context: {
|
|
34062
|
+
strategyName: StrategyName;
|
|
34063
|
+
exchangeName: ExchangeName;
|
|
34064
|
+
frameName: FrameName;
|
|
34065
|
+
}) => Promise<StrategyStatus>;
|
|
33837
34066
|
/**
|
|
33838
34067
|
* Disposes the ClientStrategy instance for the given context.
|
|
33839
34068
|
*
|
|
@@ -37574,4 +37803,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
37574
37803
|
*/
|
|
37575
37804
|
declare const getPriceScale: (value: number) => number;
|
|
37576
37805
|
|
|
37577
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AfterEndContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, type BeforeStartContract, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, Cron, type CronCallback, type CronEntry, type CronHandle, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPersistStrategyInstance, 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 IRuntimeInfo, type IRuntimeRange, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, PersistStrategyAdapter, PersistStrategyInstance, 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, type RuntimeData, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyData, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TPersistStrategyInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, beginContext, beginTime, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getPriceScale, getRawCandles, getRiskSchema, getRuntimeInfo, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenAfterEnd, listenAfterEndOnce, listenBacktestProgress, listenBeforeStart, listenBeforeStartOnce, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toPlainString, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCandles, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|
|
37806
|
+
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AfterEndContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, type BeforeStartContract, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, Cron, type CronCallback, type CronEntry, type CronHandle, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPersistStrategyInstance, 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 IRuntimeInfo, type IRuntimeRange, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, PersistStrategyAdapter, PersistStrategyInstance, 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, type RuntimeData, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyData, type StrategyEvent, type StrategyStatisticsModel, type StrategyStatus, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TPersistStrategyInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, beginContext, beginTime, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitCreateSignal, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getPriceScale, getRawCandles, getRiskSchema, getRuntimeInfo, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getStrategyStatus, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenAfterEnd, listenAfterEndOnce, listenBacktestProgress, listenBeforeStart, listenBeforeStartOnce, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toPlainString, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCandles, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|