backtest-kit 12.8.0 → 13.1.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/LICENSE +21 -21
- package/README.md +1997 -1997
- package/build/index.cjs +862 -189
- package/build/index.mjs +859 -190
- package/package.json +86 -86
- package/types.d.ts +435 -2
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
|
|
@@ -2755,6 +2784,26 @@ interface IScheduledSignalCancelRow extends IScheduledSignalRow {
|
|
|
2755
2784
|
/** Note from user payload (only for user-initiated cancellations) */
|
|
2756
2785
|
cancelNote?: string;
|
|
2757
2786
|
}
|
|
2787
|
+
/**
|
|
2788
|
+
* Signal row with close ID.
|
|
2789
|
+
* Extends ISignalRow to include optional closeId for user-initiated closes.
|
|
2790
|
+
*/
|
|
2791
|
+
interface ISignalCloseRow extends ISignalRow {
|
|
2792
|
+
/** Close ID (only for user-initiated closes) */
|
|
2793
|
+
closeId?: string;
|
|
2794
|
+
/** Note from user payload (only for user-initiated closes) */
|
|
2795
|
+
closeNote?: string;
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Scheduled signal row with activation ID.
|
|
2799
|
+
* Extends IScheduledSignalRow to include optional activateId for user-initiated activations.
|
|
2800
|
+
*/
|
|
2801
|
+
interface IScheduledSignalActivateRow extends IScheduledSignalRow {
|
|
2802
|
+
/** Activation ID (only for user-initiated activations) */
|
|
2803
|
+
activateId?: string;
|
|
2804
|
+
/** Note from user payload (only for user-initiated activations) */
|
|
2805
|
+
activateNote?: string;
|
|
2806
|
+
}
|
|
2758
2807
|
/**
|
|
2759
2808
|
* Base interface for queued commit events.
|
|
2760
2809
|
* Used to defer commit emission until proper execution context is available.
|
|
@@ -2899,7 +2948,7 @@ interface IStrategySchema {
|
|
|
2899
2948
|
* If priceOpen is provided - becomes scheduled signal waiting for price to reach entry point.
|
|
2900
2949
|
* If priceOpen is omitted - opens immediately at current price.
|
|
2901
2950
|
*/
|
|
2902
|
-
getSignal
|
|
2951
|
+
getSignal?: (symbol: string, when: Date, currentPrice: number) => Promise<ISignalDto | null>;
|
|
2903
2952
|
/** Optional lifecycle event callbacks (onOpen, onClose) */
|
|
2904
2953
|
callbacks?: Partial<IStrategyCallbacks>;
|
|
2905
2954
|
/** Optional risk profile identifier for risk management */
|
|
@@ -3408,6 +3457,29 @@ interface IStrategy {
|
|
|
3408
3457
|
* ```
|
|
3409
3458
|
*/
|
|
3410
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>;
|
|
3411
3483
|
/**
|
|
3412
3484
|
* Executes partial close at profit level (moving toward TP).
|
|
3413
3485
|
*
|
|
@@ -6427,6 +6499,47 @@ declare function hasNoScheduledSignal(symbol: string): Promise<boolean>;
|
|
|
6427
6499
|
* ```
|
|
6428
6500
|
*/
|
|
6429
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 createSignal("BTCUSDT", { position: "long", priceTakeProfit: 110, priceStopLoss: 90 });
|
|
6522
|
+
* ```
|
|
6523
|
+
*/
|
|
6524
|
+
declare function createSignal(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>;
|
|
6430
6543
|
|
|
6431
6544
|
/**
|
|
6432
6545
|
* Stops the strategy from generating new signals.
|
|
@@ -14096,6 +14209,203 @@ declare class PersistScheduleUtils {
|
|
|
14096
14209
|
* ```
|
|
14097
14210
|
*/
|
|
14098
14211
|
declare const PersistScheduleAdapter: PersistScheduleUtils;
|
|
14212
|
+
/**
|
|
14213
|
+
* Type for persisted deferred strategy state.
|
|
14214
|
+
* Snapshot of the in-flight commit queue and deferred user actions that have not yet
|
|
14215
|
+
* been forwarded to the broker. Restored on waitForInit after a live crash so the
|
|
14216
|
+
* pending broker operations are not silently lost.
|
|
14217
|
+
*/
|
|
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;
|
|
14232
|
+
/** Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained */
|
|
14233
|
+
commitQueue: ICommitRow[];
|
|
14234
|
+
/** Deferred user-initiated close (closePending), or null if none pending */
|
|
14235
|
+
closedSignal: ISignalCloseRow | null;
|
|
14236
|
+
/** Deferred user-initiated scheduled cancel (cancelScheduled), or null if none pending */
|
|
14237
|
+
cancelledSignal: IScheduledSignalCancelRow | null;
|
|
14238
|
+
/** Deferred user-initiated scheduled activate (activateScheduled), or null if none pending */
|
|
14239
|
+
activatedSignal: IScheduledSignalActivateRow | null;
|
|
14240
|
+
};
|
|
14241
|
+
/**
|
|
14242
|
+
* Per-context deferred strategy state persistence instance interface.
|
|
14243
|
+
* Scoped to a specific (symbol, strategyName, exchangeName) triple.
|
|
14244
|
+
*
|
|
14245
|
+
* Custom adapters should implement this interface to override the default
|
|
14246
|
+
* file-based deferred strategy state persistence behavior.
|
|
14247
|
+
*/
|
|
14248
|
+
interface IPersistStrategyInstance {
|
|
14249
|
+
/**
|
|
14250
|
+
* Initialize storage for this strategy state context.
|
|
14251
|
+
*
|
|
14252
|
+
* @param initial - Whether this is the first initialization
|
|
14253
|
+
* @returns Promise that resolves when initialization is complete
|
|
14254
|
+
*/
|
|
14255
|
+
waitForInit(initial: boolean): Promise<void>;
|
|
14256
|
+
/**
|
|
14257
|
+
* Read persisted deferred strategy state for this context.
|
|
14258
|
+
*
|
|
14259
|
+
* @returns Promise resolving to strategy state snapshot or null if none persisted
|
|
14260
|
+
*/
|
|
14261
|
+
readStrategyData(): Promise<StrategyData | null>;
|
|
14262
|
+
/**
|
|
14263
|
+
* Write deferred strategy state for this context (null to clear).
|
|
14264
|
+
*
|
|
14265
|
+
* @param row - Strategy state snapshot to persist, or null to clear
|
|
14266
|
+
* @returns Promise that resolves when write is complete
|
|
14267
|
+
*/
|
|
14268
|
+
writeStrategyData(row: StrategyData | null): Promise<void>;
|
|
14269
|
+
}
|
|
14270
|
+
/**
|
|
14271
|
+
* Default file-based implementation of IPersistStrategyInstance.
|
|
14272
|
+
*
|
|
14273
|
+
* Features:
|
|
14274
|
+
* - Wraps PersistBase for atomic JSON writes
|
|
14275
|
+
* - Uses fixed entity ID "strategy" within a per-context PersistBase
|
|
14276
|
+
* - Crash-safe via atomic writes
|
|
14277
|
+
*
|
|
14278
|
+
* @example
|
|
14279
|
+
* ```typescript
|
|
14280
|
+
* const instance = new PersistStrategyInstance("BTCUSDT", "my-strategy", "binance");
|
|
14281
|
+
* await instance.waitForInit(true);
|
|
14282
|
+
* await instance.writeStrategyData(snapshot);
|
|
14283
|
+
* const restored = await instance.readStrategyData();
|
|
14284
|
+
* ```
|
|
14285
|
+
*/
|
|
14286
|
+
declare class PersistStrategyInstance implements IPersistStrategyInstance {
|
|
14287
|
+
readonly symbol: string;
|
|
14288
|
+
readonly strategyName: StrategyName;
|
|
14289
|
+
readonly exchangeName: ExchangeName;
|
|
14290
|
+
/** Fixed entity key for storing the strategy state snapshot */
|
|
14291
|
+
private static readonly STORAGE_KEY;
|
|
14292
|
+
/** Underlying file-based storage scoped to this context */
|
|
14293
|
+
private readonly _storage;
|
|
14294
|
+
/**
|
|
14295
|
+
* Creates new deferred strategy state persistence instance.
|
|
14296
|
+
*
|
|
14297
|
+
* @param symbol - Trading pair symbol
|
|
14298
|
+
* @param strategyName - Strategy identifier
|
|
14299
|
+
* @param exchangeName - Exchange identifier
|
|
14300
|
+
*/
|
|
14301
|
+
constructor(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName);
|
|
14302
|
+
/**
|
|
14303
|
+
* Initializes the underlying PersistBase storage.
|
|
14304
|
+
*
|
|
14305
|
+
* @param initial - Whether this is the first initialization
|
|
14306
|
+
* @returns Promise that resolves when initialization is complete
|
|
14307
|
+
*/
|
|
14308
|
+
waitForInit(initial: boolean): Promise<void>;
|
|
14309
|
+
/**
|
|
14310
|
+
* Reads the persisted strategy state snapshot using the fixed STORAGE_KEY.
|
|
14311
|
+
*
|
|
14312
|
+
* @returns Promise resolving to strategy state snapshot or null if not found
|
|
14313
|
+
*/
|
|
14314
|
+
readStrategyData(): Promise<StrategyData | null>;
|
|
14315
|
+
/**
|
|
14316
|
+
* Writes the strategy state snapshot (or null to clear) using the fixed STORAGE_KEY.
|
|
14317
|
+
*
|
|
14318
|
+
* @param row - Strategy state snapshot to persist, or null to clear
|
|
14319
|
+
* @returns Promise that resolves when write is complete
|
|
14320
|
+
*/
|
|
14321
|
+
writeStrategyData(row: StrategyData | null): Promise<void>;
|
|
14322
|
+
}
|
|
14323
|
+
/**
|
|
14324
|
+
* Constructor type for IPersistStrategyInstance.
|
|
14325
|
+
* Used by PersistStrategyUtils.usePersistStrategyAdapter() to register custom adapters.
|
|
14326
|
+
*/
|
|
14327
|
+
type TPersistStrategyInstanceCtor = new (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => IPersistStrategyInstance;
|
|
14328
|
+
/**
|
|
14329
|
+
* Utility class for managing deferred strategy state persistence.
|
|
14330
|
+
*
|
|
14331
|
+
* Features:
|
|
14332
|
+
* - Memoized storage instances per strategy
|
|
14333
|
+
* - Custom adapter support
|
|
14334
|
+
* - Atomic read/write operations for the deferred state snapshot
|
|
14335
|
+
* - Crash-safe in-flight broker operation state management
|
|
14336
|
+
*
|
|
14337
|
+
* Used by ClientStrategy for live mode persistence of the commit queue and deferred
|
|
14338
|
+
* user actions (_commitQueue, _closedSignal, _cancelledSignal, _activatedSignal).
|
|
14339
|
+
*/
|
|
14340
|
+
declare class PersistStrategyUtils {
|
|
14341
|
+
/**
|
|
14342
|
+
* Constructor used to create per-context strategy state instances.
|
|
14343
|
+
* Replaceable via usePersistStrategyAdapter() / useJson() / useDummy().
|
|
14344
|
+
*/
|
|
14345
|
+
private PersistStrategyInstanceCtor;
|
|
14346
|
+
/**
|
|
14347
|
+
* Memoized factory creating one IPersistStrategyInstance per (symbol, strategy, exchange) triple.
|
|
14348
|
+
*/
|
|
14349
|
+
private getStrategyStorage;
|
|
14350
|
+
/**
|
|
14351
|
+
* Registers a custom IPersistStrategyInstance constructor.
|
|
14352
|
+
* Clears the memoization cache so subsequent calls use the new adapter.
|
|
14353
|
+
*
|
|
14354
|
+
* @param Ctor - Custom IPersistStrategyInstance constructor
|
|
14355
|
+
*/
|
|
14356
|
+
usePersistStrategyAdapter(Ctor: TPersistStrategyInstanceCtor): void;
|
|
14357
|
+
/**
|
|
14358
|
+
* Reads persisted deferred strategy state for the given context.
|
|
14359
|
+
* Lazily initializes the instance on first access.
|
|
14360
|
+
*
|
|
14361
|
+
* @param symbol - Trading pair symbol
|
|
14362
|
+
* @param strategyName - Strategy identifier
|
|
14363
|
+
* @param exchangeName - Exchange identifier
|
|
14364
|
+
* @returns Promise resolving to strategy state snapshot or null if none persisted
|
|
14365
|
+
*/
|
|
14366
|
+
readStrategyData: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => Promise<StrategyData | null>;
|
|
14367
|
+
/**
|
|
14368
|
+
* Writes deferred strategy state (or null to clear) for the given context.
|
|
14369
|
+
* Lazily initializes the instance on first access.
|
|
14370
|
+
*
|
|
14371
|
+
* @param strategyRow - Strategy state snapshot to persist, or null to clear
|
|
14372
|
+
* @param symbol - Trading pair symbol
|
|
14373
|
+
* @param strategyName - Strategy identifier
|
|
14374
|
+
* @param exchangeName - Exchange identifier
|
|
14375
|
+
* @returns Promise that resolves when write is complete
|
|
14376
|
+
*/
|
|
14377
|
+
writeStrategyData: (strategyRow: StrategyData | null, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => Promise<void>;
|
|
14378
|
+
/**
|
|
14379
|
+
* Clears the memoized instance cache.
|
|
14380
|
+
* Call when process.cwd() changes between strategy iterations.
|
|
14381
|
+
*/
|
|
14382
|
+
clear(): void;
|
|
14383
|
+
/**
|
|
14384
|
+
* Switches to the default file-based PersistStrategyInstance.
|
|
14385
|
+
*/
|
|
14386
|
+
useJson(): void;
|
|
14387
|
+
/**
|
|
14388
|
+
* Switches to PersistStrategyDummyInstance (all operations are no-ops).
|
|
14389
|
+
*/
|
|
14390
|
+
useDummy(): void;
|
|
14391
|
+
}
|
|
14392
|
+
/**
|
|
14393
|
+
* Global singleton instance of PersistStrategyUtils.
|
|
14394
|
+
* Used by ClientStrategy for deferred strategy state persistence.
|
|
14395
|
+
*
|
|
14396
|
+
* @example
|
|
14397
|
+
* ```typescript
|
|
14398
|
+
* // Custom adapter
|
|
14399
|
+
* PersistStrategyAdapter.usePersistStrategyAdapter(RedisPersist);
|
|
14400
|
+
*
|
|
14401
|
+
* // Read strategy state
|
|
14402
|
+
* const state = await PersistStrategyAdapter.readStrategyData("BTCUSDT", "my-strategy", "binance");
|
|
14403
|
+
*
|
|
14404
|
+
* // Write strategy state
|
|
14405
|
+
* await PersistStrategyAdapter.writeStrategyData(state, "BTCUSDT", "my-strategy", "binance");
|
|
14406
|
+
* ```
|
|
14407
|
+
*/
|
|
14408
|
+
declare const PersistStrategyAdapter: PersistStrategyUtils;
|
|
14099
14409
|
/**
|
|
14100
14410
|
* Type for persisted partial data.
|
|
14101
14411
|
* Stores profit and loss levels as arrays for JSON serialization.
|
|
@@ -18538,6 +18848,36 @@ declare class BacktestUtils {
|
|
|
18538
18848
|
exchangeName: ExchangeName;
|
|
18539
18849
|
frameName: FrameName;
|
|
18540
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
|
+
createSignal: (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>;
|
|
18541
18881
|
/**
|
|
18542
18882
|
* Executes partial close at profit level (moving toward TP).
|
|
18543
18883
|
*
|
|
@@ -20019,6 +20359,34 @@ declare class LiveUtils {
|
|
|
20019
20359
|
strategyName: StrategyName;
|
|
20020
20360
|
exchangeName: ExchangeName;
|
|
20021
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
|
+
createSignal: (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>;
|
|
20022
20390
|
/**
|
|
20023
20391
|
* Executes partial close at profit level (moving toward TP).
|
|
20024
20392
|
*
|
|
@@ -32051,6 +32419,38 @@ declare class StrategyConnectionService implements TStrategy$1 {
|
|
|
32051
32419
|
exchangeName: ExchangeName;
|
|
32052
32420
|
frameName: FrameName;
|
|
32053
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>;
|
|
32054
32454
|
/**
|
|
32055
32455
|
* Checks whether `partialProfit` would succeed without executing it.
|
|
32056
32456
|
* Delegates to `ClientStrategy.validatePartialProfit()` — no throws, pure boolean result.
|
|
@@ -33630,6 +34030,39 @@ declare class StrategyCoreService implements TStrategy {
|
|
|
33630
34030
|
exchangeName: ExchangeName;
|
|
33631
34031
|
frameName: FrameName;
|
|
33632
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>;
|
|
33633
34066
|
/**
|
|
33634
34067
|
* Disposes the ClientStrategy instance for the given context.
|
|
33635
34068
|
*
|
|
@@ -37370,4 +37803,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
37370
37803
|
*/
|
|
37371
37804
|
declare const getPriceScale: (value: number) => number;
|
|
37372
37805
|
|
|
37373
|
-
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 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, 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 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 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, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignal, 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 };
|