backtest-kit 9.8.2 → 9.8.4
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 +1898 -1893
- package/build/index.cjs +474 -154
- package/build/index.mjs +471 -155
- package/package.json +86 -86
- package/types.d.ts +429 -149
package/types.d.ts
CHANGED
|
@@ -178,6 +178,19 @@ declare class TimeMetaService {
|
|
|
178
178
|
* Instances are cached until clear() is called.
|
|
179
179
|
*/
|
|
180
180
|
private getSource;
|
|
181
|
+
/**
|
|
182
|
+
* Checks if a timestamp exists for the given symbol and context.
|
|
183
|
+
*
|
|
184
|
+
* @param symbol - Trading pair symbol (e.g., "BTCUSDT")
|
|
185
|
+
* @param context - Strategy, exchange, and frame identifiers
|
|
186
|
+
* @param backtest - True if backtest mode, false if live mode
|
|
187
|
+
* @returns True if a timestamp is available, false otherwise
|
|
188
|
+
*/
|
|
189
|
+
hasTimestamp: (symbol: string, context: {
|
|
190
|
+
strategyName: string;
|
|
191
|
+
exchangeName: string;
|
|
192
|
+
frameName: string;
|
|
193
|
+
}, backtest: boolean) => boolean;
|
|
181
194
|
/**
|
|
182
195
|
* Returns the current candle timestamp (in milliseconds) for the given symbol and context.
|
|
183
196
|
*
|
|
@@ -8179,6 +8192,174 @@ interface SignalInfoContract {
|
|
|
8179
8192
|
timestamp: number;
|
|
8180
8193
|
}
|
|
8181
8194
|
|
|
8195
|
+
/**
|
|
8196
|
+
* Contract for the beforeStart lifecycle event of strategy execution.
|
|
8197
|
+
*
|
|
8198
|
+
* Emitted by the engine immediately before it begins iterating the strategy
|
|
8199
|
+
* for a given symbol — after validation and context setup, but before the
|
|
8200
|
+
* first candle/tick is processed. Used by subscribers to perform
|
|
8201
|
+
* initialization that should happen exactly once per run: opening log files,
|
|
8202
|
+
* resetting per-run accumulators, sending a "run started" notification,
|
|
8203
|
+
* snapshotting initial state, etc.
|
|
8204
|
+
*
|
|
8205
|
+
* Guarantees:
|
|
8206
|
+
* - Fires exactly once per `run()` invocation, before any signal is yielded.
|
|
8207
|
+
* - Always paired with an `AfterEndContract` event for the same run, even if
|
|
8208
|
+
* the iterator is interrupted, throws, or is cancelled externally. If
|
|
8209
|
+
* beforeStart fires, afterEnd is guaranteed to fire afterwards.
|
|
8210
|
+
* - Listener errors are caught and routed to the global errorEmitter; they
|
|
8211
|
+
* never abort the run.
|
|
8212
|
+
*
|
|
8213
|
+
* Mode differences:
|
|
8214
|
+
* - In backtest mode, `when` is the planned start of the frame (from
|
|
8215
|
+
* FrameSchemaService.startDate, aligned to 1-minute boundary). It is the
|
|
8216
|
+
* intended beginning of the historical replay, not wall-clock time.
|
|
8217
|
+
* - In live mode, `when` is the current wall-clock time aligned to the
|
|
8218
|
+
* 1-minute boundary.
|
|
8219
|
+
*
|
|
8220
|
+
* @see AfterEndContract — the paired completion event.
|
|
8221
|
+
*/
|
|
8222
|
+
interface BeforeStartContract {
|
|
8223
|
+
/**
|
|
8224
|
+
* Trading symbol the run is for (e.g., "BTCUSDT", "ETHUSDT").
|
|
8225
|
+
* Same value that was passed to `Backtest.run` / `Live.run`.
|
|
8226
|
+
*/
|
|
8227
|
+
symbol: string;
|
|
8228
|
+
/**
|
|
8229
|
+
* Name of the strategy being executed. Use this to demultiplex events when
|
|
8230
|
+
* subscribing globally to runs across multiple strategies on the same
|
|
8231
|
+
* symbol.
|
|
8232
|
+
*/
|
|
8233
|
+
strategyName: StrategyName;
|
|
8234
|
+
/**
|
|
8235
|
+
* Name of the exchange providing market data for this run.
|
|
8236
|
+
*/
|
|
8237
|
+
exchangeName: ExchangeName;
|
|
8238
|
+
/**
|
|
8239
|
+
* Name of the frame (timeframe / date range) for the run. Empty string in
|
|
8240
|
+
* live mode, where frames are not used.
|
|
8241
|
+
*/
|
|
8242
|
+
frameName: FrameName;
|
|
8243
|
+
/**
|
|
8244
|
+
* `true` if this event was emitted from a backtest run, `false` if from a
|
|
8245
|
+
* live trading run. Use this to branch listener logic without inspecting
|
|
8246
|
+
* other fields.
|
|
8247
|
+
*/
|
|
8248
|
+
backtest: boolean;
|
|
8249
|
+
/**
|
|
8250
|
+
* Average symbol price observed at the moment the event was emitted,
|
|
8251
|
+
* fetched from `ExchangeConnectionService.getAveragePrice(symbol)`.
|
|
8252
|
+
* Provided as a convenience so subscribers don't need to query the
|
|
8253
|
+
* exchange themselves.
|
|
8254
|
+
*/
|
|
8255
|
+
currentPrice: number;
|
|
8256
|
+
/**
|
|
8257
|
+
* Event time as a `Date` instance.
|
|
8258
|
+
*
|
|
8259
|
+
* In backtest: the planned start of the frame (aligned to 1-minute
|
|
8260
|
+
* boundary). Represents intended start time, not the moment of emission.
|
|
8261
|
+
*
|
|
8262
|
+
* In live: wall-clock now, aligned to 1-minute boundary.
|
|
8263
|
+
*
|
|
8264
|
+
* Always equal to `new Date(timestamp)`.
|
|
8265
|
+
*/
|
|
8266
|
+
when: Date;
|
|
8267
|
+
/**
|
|
8268
|
+
* Same value as `when`, expressed as milliseconds since the Unix epoch.
|
|
8269
|
+
* Provided so subscribers can avoid calling `.getTime()` and to keep the
|
|
8270
|
+
* payload trivially serialisable (e.g., for forwarding over IPC or
|
|
8271
|
+
* writing to a log).
|
|
8272
|
+
*/
|
|
8273
|
+
timestamp: number;
|
|
8274
|
+
}
|
|
8275
|
+
|
|
8276
|
+
/**
|
|
8277
|
+
* Contract for the afterEnd lifecycle event of strategy execution.
|
|
8278
|
+
*
|
|
8279
|
+
* Emitted by the engine after the strategy iterator has finished — whether
|
|
8280
|
+
* by reaching the end of the frame, being stopped via `stopStrategy`,
|
|
8281
|
+
* throwing an error, or being cancelled by the consumer (e.g., breaking out
|
|
8282
|
+
* of `for await`). Used by subscribers to perform teardown that should
|
|
8283
|
+
* happen exactly once per run: flushing buffers, closing files, computing
|
|
8284
|
+
* final aggregates, sending a "run completed" notification, etc.
|
|
8285
|
+
*
|
|
8286
|
+
* Guarantees:
|
|
8287
|
+
* - Fires exactly once per `run()` invocation, paired with the matching
|
|
8288
|
+
* `BeforeStartContract` event. The pairing holds for every termination
|
|
8289
|
+
* path including exceptions and external cancellation (delivered via the
|
|
8290
|
+
* generator's `try/finally` block).
|
|
8291
|
+
* - Listener errors are caught and routed to the global errorEmitter; they
|
|
8292
|
+
* never propagate to the original caller.
|
|
8293
|
+
*
|
|
8294
|
+
* Mode differences:
|
|
8295
|
+
* - In backtest mode, `when` is the cursor position from `TimeMetaService`
|
|
8296
|
+
* at the moment of completion — i.e., the historical time of the last
|
|
8297
|
+
* processed candle. If the run was interrupted before any candle was
|
|
8298
|
+
* processed (e.g., empty frame, immediate cancellation), `when` falls
|
|
8299
|
+
* back to the frame's planned start date so it equals
|
|
8300
|
+
* `BeforeStartContract.when` for the same run. This means
|
|
8301
|
+
* `afterEnd.when - beforeStart.when` is always the real processed
|
|
8302
|
+
* duration, never an inflated planned one.
|
|
8303
|
+
* - In live mode, `when` is the current wall-clock time aligned to the
|
|
8304
|
+
* 1-minute boundary at the moment of emission.
|
|
8305
|
+
*
|
|
8306
|
+
* @see BeforeStartContract — the paired initialization event.
|
|
8307
|
+
*/
|
|
8308
|
+
interface AfterEndContract {
|
|
8309
|
+
/**
|
|
8310
|
+
* Trading symbol the run was for (e.g., "BTCUSDT", "ETHUSDT").
|
|
8311
|
+
* Matches the symbol from the paired `BeforeStartContract`.
|
|
8312
|
+
*/
|
|
8313
|
+
symbol: string;
|
|
8314
|
+
/**
|
|
8315
|
+
* Name of the strategy that was executed. Use this to demultiplex events
|
|
8316
|
+
* when subscribing globally to runs across multiple strategies on the
|
|
8317
|
+
* same symbol.
|
|
8318
|
+
*/
|
|
8319
|
+
strategyName: StrategyName;
|
|
8320
|
+
/**
|
|
8321
|
+
* Name of the exchange that provided market data for this run.
|
|
8322
|
+
*/
|
|
8323
|
+
exchangeName: ExchangeName;
|
|
8324
|
+
/**
|
|
8325
|
+
* Name of the frame (timeframe / date range) the run used. Empty string
|
|
8326
|
+
* in live mode, where frames are not used.
|
|
8327
|
+
*/
|
|
8328
|
+
frameName: FrameName;
|
|
8329
|
+
/**
|
|
8330
|
+
* `true` if this event was emitted from a backtest run, `false` if from a
|
|
8331
|
+
* live trading run. Use this to branch listener logic without inspecting
|
|
8332
|
+
* other fields.
|
|
8333
|
+
*/
|
|
8334
|
+
backtest: boolean;
|
|
8335
|
+
/**
|
|
8336
|
+
* Average symbol price observed at the moment the event was emitted,
|
|
8337
|
+
* fetched from `ExchangeConnectionService.getAveragePrice(symbol)`.
|
|
8338
|
+
* Provided as a convenience so subscribers don't need to query the
|
|
8339
|
+
* exchange themselves.
|
|
8340
|
+
*/
|
|
8341
|
+
currentPrice: number;
|
|
8342
|
+
/**
|
|
8343
|
+
* Event time as a `Date` instance.
|
|
8344
|
+
*
|
|
8345
|
+
* In backtest: cursor position from `TimeMetaService` at completion (the
|
|
8346
|
+
* time of the last processed candle), with fallback to the frame's
|
|
8347
|
+
* planned start date if no candle was processed.
|
|
8348
|
+
*
|
|
8349
|
+
* In live: wall-clock now, aligned to 1-minute boundary.
|
|
8350
|
+
*
|
|
8351
|
+
* Always equal to `new Date(timestamp)`.
|
|
8352
|
+
*/
|
|
8353
|
+
when: Date;
|
|
8354
|
+
/**
|
|
8355
|
+
* Same value as `when`, expressed as milliseconds since the Unix epoch.
|
|
8356
|
+
* Provided so subscribers can avoid calling `.getTime()` and to keep the
|
|
8357
|
+
* payload trivially serialisable (e.g., for forwarding over IPC or
|
|
8358
|
+
* writing to a log).
|
|
8359
|
+
*/
|
|
8360
|
+
timestamp: number;
|
|
8361
|
+
}
|
|
8362
|
+
|
|
8182
8363
|
/**
|
|
8183
8364
|
* Subscribes to all signal events with queued async processing.
|
|
8184
8365
|
*
|
|
@@ -9269,6 +9450,42 @@ declare function listenSignalNotify(fn: (event: SignalInfoContract) => void): ()
|
|
|
9269
9450
|
* @return Unsubscribe function to cancel the listener before it fires
|
|
9270
9451
|
*/
|
|
9271
9452
|
declare function listenSignalNotifyOnce(filterFn: (event: SignalInfoContract) => boolean, fn: (event: SignalInfoContract) => void): () => void;
|
|
9453
|
+
/**
|
|
9454
|
+
* Subscribes to before start events with queued async processing.
|
|
9455
|
+
* Emits when the engine is about to start a new strategy execution for a symbol.
|
|
9456
|
+
* Events are processed sequentially in order received, even if callback is async.
|
|
9457
|
+
* Uses queued wrapper to prevent concurrent execution of the callback.
|
|
9458
|
+
* @param fn - Callback function to handle before start events
|
|
9459
|
+
* @return Unsubscribe function to stop listening to events
|
|
9460
|
+
*/
|
|
9461
|
+
declare function listenBeforeStart(fn: (event: BeforeStartContract) => void): () => void;
|
|
9462
|
+
/**
|
|
9463
|
+
* Subscribes to filtered before start events with one-time execution.
|
|
9464
|
+
* Listens for events matching the filter predicate, then executes callback once
|
|
9465
|
+
* and automatically unsubscribes.
|
|
9466
|
+
* @param filterFn - Predicate to filter which events trigger the callback
|
|
9467
|
+
* @param fn - Callback function to handle the filtered event (called only once)
|
|
9468
|
+
* @return Unsubscribe function to cancel the listener before it fires
|
|
9469
|
+
*/
|
|
9470
|
+
declare function listenBeforeStartOnce(filterFn: (event: BeforeStartContract) => boolean, fn: (event: BeforeStartContract) => void): () => void;
|
|
9471
|
+
/**
|
|
9472
|
+
* Subscribes to after end events with queued async processing.
|
|
9473
|
+
* Emits when the engine has completed processing a strategy execution for a symbol.
|
|
9474
|
+
* Events are processed sequentially in order received, even if callback is async.
|
|
9475
|
+
* Uses queued wrapper to prevent concurrent execution of the callback.
|
|
9476
|
+
* @param fn - Callback function to handle after end events
|
|
9477
|
+
* @return Unsubscribe function to stop listening to events
|
|
9478
|
+
*/
|
|
9479
|
+
declare function listenAfterEnd(fn: (event: AfterEndContract) => void): () => void;
|
|
9480
|
+
/**
|
|
9481
|
+
* Subscribes to filtered after end events with one-time execution.
|
|
9482
|
+
* Listens for events matching the filter predicate, then executes callback once
|
|
9483
|
+
* and automatically unsubscribes.
|
|
9484
|
+
* @param filterFn - Predicate to filter which events trigger the callback
|
|
9485
|
+
* @param fn - Callback function to handle the filtered event (called only once)
|
|
9486
|
+
* @return Unsubscribe function to cancel the listener before it fires
|
|
9487
|
+
*/
|
|
9488
|
+
declare function listenAfterEndOnce(filterFn: (event: AfterEndContract) => boolean, fn: (event: AfterEndContract) => void): () => void;
|
|
9272
9489
|
|
|
9273
9490
|
/**
|
|
9274
9491
|
* Checks if trade context is active (execution and method contexts).
|
|
@@ -9374,80 +9591,6 @@ declare function formatPrice(symbol: string, price: number): Promise<string>;
|
|
|
9374
9591
|
* ```
|
|
9375
9592
|
*/
|
|
9376
9593
|
declare function formatQuantity(symbol: string, quantity: number): Promise<string>;
|
|
9377
|
-
/**
|
|
9378
|
-
* Gets the current date from execution context.
|
|
9379
|
-
*
|
|
9380
|
-
* In backtest mode: returns the current timeframe date being processed
|
|
9381
|
-
* In live mode: returns current real-time date
|
|
9382
|
-
*
|
|
9383
|
-
* @returns Promise resolving to current execution context date
|
|
9384
|
-
*
|
|
9385
|
-
* @example
|
|
9386
|
-
* ```typescript
|
|
9387
|
-
* const date = await getDate();
|
|
9388
|
-
* console.log(date); // 2024-01-01T12:00:00.000Z
|
|
9389
|
-
* ```
|
|
9390
|
-
*/
|
|
9391
|
-
declare function getDate(): Promise<Date>;
|
|
9392
|
-
/**
|
|
9393
|
-
* Gets the current timestamp from execution context.
|
|
9394
|
-
*
|
|
9395
|
-
* In backtest mode: returns the current timeframe timestamp being processed
|
|
9396
|
-
* In live mode: returns current real-time timestamp
|
|
9397
|
-
*
|
|
9398
|
-
* @returns Promise resolving to current execution context timestamp in milliseconds
|
|
9399
|
-
* @example
|
|
9400
|
-
* ```typescript
|
|
9401
|
-
* const timestamp = await getTimestamp();
|
|
9402
|
-
* console.log(timestamp); // 1700000000000
|
|
9403
|
-
* ```
|
|
9404
|
-
*/
|
|
9405
|
-
declare function getTimestamp(): Promise<number>;
|
|
9406
|
-
/**
|
|
9407
|
-
* Gets the current execution mode.
|
|
9408
|
-
*
|
|
9409
|
-
* @returns Promise resolving to "backtest" or "live"
|
|
9410
|
-
*
|
|
9411
|
-
* @example
|
|
9412
|
-
* ```typescript
|
|
9413
|
-
* const mode = await getMode();
|
|
9414
|
-
* if (mode === "backtest") {
|
|
9415
|
-
* console.log("Running in backtest mode");
|
|
9416
|
-
* } else {
|
|
9417
|
-
* console.log("Running in live mode");
|
|
9418
|
-
* }
|
|
9419
|
-
* ```
|
|
9420
|
-
*/
|
|
9421
|
-
declare function getMode(): Promise<"backtest" | "live">;
|
|
9422
|
-
/**
|
|
9423
|
-
* Gets the current trading symbol from execution context.
|
|
9424
|
-
*
|
|
9425
|
-
* @returns Promise resolving to the current trading symbol (e.g., "BTCUSDT")
|
|
9426
|
-
* @throws Error if execution context is not active
|
|
9427
|
-
*
|
|
9428
|
-
* @example
|
|
9429
|
-
* ```typescript
|
|
9430
|
-
* const symbol = await getSymbol();
|
|
9431
|
-
* console.log(symbol); // "BTCUSDT"
|
|
9432
|
-
* ```
|
|
9433
|
-
*/
|
|
9434
|
-
declare function getSymbol(): Promise<string>;
|
|
9435
|
-
/**
|
|
9436
|
-
* Gets the current method context.
|
|
9437
|
-
*
|
|
9438
|
-
* Returns the context object from the method context service, which contains
|
|
9439
|
-
* information about the current method execution environment.
|
|
9440
|
-
*
|
|
9441
|
-
* @returns Promise resolving to the current method context object
|
|
9442
|
-
* @throws Error if method context is not active
|
|
9443
|
-
*
|
|
9444
|
-
* @example
|
|
9445
|
-
* ```typescript
|
|
9446
|
-
* const context = await getContext();
|
|
9447
|
-
* console.log(context); // { ...method context data... }
|
|
9448
|
-
* ```
|
|
9449
|
-
*/
|
|
9450
|
-
declare function getContext(): Promise<IMethodContext>;
|
|
9451
9594
|
/**
|
|
9452
9595
|
* Fetches order book for a trading pair from the registered exchange.
|
|
9453
9596
|
*
|
|
@@ -9538,6 +9681,81 @@ declare function getNextCandles(symbol: string, interval: CandleInterval, limit:
|
|
|
9538
9681
|
*/
|
|
9539
9682
|
declare function getAggregatedTrades(symbol: string, limit?: number): Promise<IAggregatedTradeData[]>;
|
|
9540
9683
|
|
|
9684
|
+
/**
|
|
9685
|
+
* Gets the current date from execution context.
|
|
9686
|
+
*
|
|
9687
|
+
* In backtest mode: returns the current timeframe date being processed
|
|
9688
|
+
* In live mode: returns current real-time date
|
|
9689
|
+
*
|
|
9690
|
+
* @returns Promise resolving to current execution context date
|
|
9691
|
+
*
|
|
9692
|
+
* @example
|
|
9693
|
+
* ```typescript
|
|
9694
|
+
* const date = await getDate();
|
|
9695
|
+
* console.log(date); // 2024-01-01T12:00:00.000Z
|
|
9696
|
+
* ```
|
|
9697
|
+
*/
|
|
9698
|
+
declare function getDate(): Promise<Date>;
|
|
9699
|
+
/**
|
|
9700
|
+
* Gets the current timestamp from execution context.
|
|
9701
|
+
*
|
|
9702
|
+
* In backtest mode: returns the current timeframe timestamp being processed
|
|
9703
|
+
* In live mode: returns current real-time timestamp
|
|
9704
|
+
*
|
|
9705
|
+
* @returns Promise resolving to current execution context timestamp in milliseconds
|
|
9706
|
+
* @example
|
|
9707
|
+
* ```typescript
|
|
9708
|
+
* const timestamp = await getTimestamp();
|
|
9709
|
+
* console.log(timestamp); // 1700000000000
|
|
9710
|
+
* ```
|
|
9711
|
+
*/
|
|
9712
|
+
declare function getTimestamp(): Promise<number>;
|
|
9713
|
+
/**
|
|
9714
|
+
* Gets the current execution mode.
|
|
9715
|
+
*
|
|
9716
|
+
* @returns Promise resolving to "backtest" or "live"
|
|
9717
|
+
*
|
|
9718
|
+
* @example
|
|
9719
|
+
* ```typescript
|
|
9720
|
+
* const mode = await getMode();
|
|
9721
|
+
* if (mode === "backtest") {
|
|
9722
|
+
* console.log("Running in backtest mode");
|
|
9723
|
+
* } else {
|
|
9724
|
+
* console.log("Running in live mode");
|
|
9725
|
+
* }
|
|
9726
|
+
* ```
|
|
9727
|
+
*/
|
|
9728
|
+
declare function getMode(): Promise<"backtest" | "live">;
|
|
9729
|
+
/**
|
|
9730
|
+
* Gets the current trading symbol from execution context.
|
|
9731
|
+
*
|
|
9732
|
+
* @returns Promise resolving to the current trading symbol (e.g., "BTCUSDT")
|
|
9733
|
+
* @throws Error if execution context is not active
|
|
9734
|
+
*
|
|
9735
|
+
* @example
|
|
9736
|
+
* ```typescript
|
|
9737
|
+
* const symbol = await getSymbol();
|
|
9738
|
+
* console.log(symbol); // "BTCUSDT"
|
|
9739
|
+
* ```
|
|
9740
|
+
*/
|
|
9741
|
+
declare function getSymbol(): Promise<string>;
|
|
9742
|
+
/**
|
|
9743
|
+
* Gets the current method context.
|
|
9744
|
+
*
|
|
9745
|
+
* Returns the context object from the method context service, which contains
|
|
9746
|
+
* information about the current method execution environment.
|
|
9747
|
+
*
|
|
9748
|
+
* @returns Promise resolving to the current method context object
|
|
9749
|
+
* @throws Error if method context is not active
|
|
9750
|
+
*
|
|
9751
|
+
* @example
|
|
9752
|
+
* ```typescript
|
|
9753
|
+
* const context = await getContext();
|
|
9754
|
+
* console.log(context); // { ...method context data... }
|
|
9755
|
+
* ```
|
|
9756
|
+
*/
|
|
9757
|
+
declare function getContext(): Promise<IMethodContext>;
|
|
9758
|
+
|
|
9541
9759
|
type Dispatch$1<Value extends object = object> = (value: Value) => Value | Promise<Value>;
|
|
9542
9760
|
/**
|
|
9543
9761
|
* Returns the latest signal (pending or closed) for the current strategy context.
|
|
@@ -28430,9 +28648,21 @@ declare const maxDrawdownSubject: Subject<MaxDrawdownContract>;
|
|
|
28430
28648
|
* Emits when a strategy calls commitSignalInfo() to broadcast a custom annotation.
|
|
28431
28649
|
*/
|
|
28432
28650
|
declare const signalNotifySubject: Subject<SignalInfoContract>;
|
|
28651
|
+
/**
|
|
28652
|
+
* Before start emitter for strategy initialization events.
|
|
28653
|
+
* Emits when the engine is about to start a new strategy execution.
|
|
28654
|
+
*/
|
|
28655
|
+
declare const beforeStartSubject: Subject<BeforeStartContract>;
|
|
28656
|
+
/**
|
|
28657
|
+
* After end emitter for strategy completion events.
|
|
28658
|
+
* Emits when the engine has completed processing a signal.
|
|
28659
|
+
*/
|
|
28660
|
+
declare const afterEndSubject: Subject<AfterEndContract>;
|
|
28433
28661
|
|
|
28434
28662
|
declare const emitters_activePingSubject: typeof activePingSubject;
|
|
28663
|
+
declare const emitters_afterEndSubject: typeof afterEndSubject;
|
|
28435
28664
|
declare const emitters_backtestScheduleOpenSubject: typeof backtestScheduleOpenSubject;
|
|
28665
|
+
declare const emitters_beforeStartSubject: typeof beforeStartSubject;
|
|
28436
28666
|
declare const emitters_breakevenSubject: typeof breakevenSubject;
|
|
28437
28667
|
declare const emitters_doneBacktestSubject: typeof doneBacktestSubject;
|
|
28438
28668
|
declare const emitters_doneLiveSubject: typeof doneLiveSubject;
|
|
@@ -28461,7 +28691,7 @@ declare const emitters_walkerCompleteSubject: typeof walkerCompleteSubject;
|
|
|
28461
28691
|
declare const emitters_walkerEmitter: typeof walkerEmitter;
|
|
28462
28692
|
declare const emitters_walkerStopSubject: typeof walkerStopSubject;
|
|
28463
28693
|
declare namespace emitters {
|
|
28464
|
-
export { emitters_activePingSubject as activePingSubject, emitters_backtestScheduleOpenSubject as backtestScheduleOpenSubject, emitters_breakevenSubject as breakevenSubject, emitters_doneBacktestSubject as doneBacktestSubject, emitters_doneLiveSubject as doneLiveSubject, emitters_doneWalkerSubject as doneWalkerSubject, emitters_errorEmitter as errorEmitter, emitters_exitEmitter as exitEmitter, emitters_highestProfitSubject as highestProfitSubject, emitters_idlePingSubject as idlePingSubject, emitters_maxDrawdownSubject as maxDrawdownSubject, emitters_partialLossSubject as partialLossSubject, emitters_partialProfitSubject as partialProfitSubject, emitters_performanceEmitter as performanceEmitter, emitters_progressBacktestEmitter as progressBacktestEmitter, emitters_progressWalkerEmitter as progressWalkerEmitter, emitters_riskSubject as riskSubject, emitters_schedulePingSubject as schedulePingSubject, emitters_shutdownEmitter as shutdownEmitter, emitters_signalBacktestEmitter as signalBacktestEmitter, emitters_signalEmitter as signalEmitter, emitters_signalLiveEmitter as signalLiveEmitter, emitters_signalNotifySubject as signalNotifySubject, emitters_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
|
|
28694
|
+
export { emitters_activePingSubject as activePingSubject, emitters_afterEndSubject as afterEndSubject, emitters_backtestScheduleOpenSubject as backtestScheduleOpenSubject, emitters_beforeStartSubject as beforeStartSubject, emitters_breakevenSubject as breakevenSubject, emitters_doneBacktestSubject as doneBacktestSubject, emitters_doneLiveSubject as doneLiveSubject, emitters_doneWalkerSubject as doneWalkerSubject, emitters_errorEmitter as errorEmitter, emitters_exitEmitter as exitEmitter, emitters_highestProfitSubject as highestProfitSubject, emitters_idlePingSubject as idlePingSubject, emitters_maxDrawdownSubject as maxDrawdownSubject, emitters_partialLossSubject as partialLossSubject, emitters_partialProfitSubject as partialProfitSubject, emitters_performanceEmitter as performanceEmitter, emitters_progressBacktestEmitter as progressBacktestEmitter, emitters_progressWalkerEmitter as progressWalkerEmitter, emitters_riskSubject as riskSubject, emitters_schedulePingSubject as schedulePingSubject, emitters_shutdownEmitter as shutdownEmitter, emitters_signalBacktestEmitter as signalBacktestEmitter, emitters_signalEmitter as signalEmitter, emitters_signalLiveEmitter as signalLiveEmitter, emitters_signalNotifySubject as signalNotifySubject, emitters_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
|
|
28465
28695
|
}
|
|
28466
28696
|
|
|
28467
28697
|
/**
|
|
@@ -33429,6 +33659,69 @@ declare class BacktestLogicPrivateService {
|
|
|
33429
33659
|
run(symbol: string): AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, any>;
|
|
33430
33660
|
}
|
|
33431
33661
|
|
|
33662
|
+
/**
|
|
33663
|
+
* Service for managing frame schema registry.
|
|
33664
|
+
*
|
|
33665
|
+
* Uses ToolRegistry from functools-kit for type-safe schema storage.
|
|
33666
|
+
* Frames are registered via addFrame() and retrieved by name.
|
|
33667
|
+
*/
|
|
33668
|
+
declare class FrameSchemaService {
|
|
33669
|
+
readonly loggerService: {
|
|
33670
|
+
readonly methodContextService: {
|
|
33671
|
+
readonly context: IMethodContext;
|
|
33672
|
+
};
|
|
33673
|
+
readonly executionContextService: {
|
|
33674
|
+
readonly context: IExecutionContext;
|
|
33675
|
+
};
|
|
33676
|
+
_commonLogger: ILogger;
|
|
33677
|
+
readonly _methodContext: {};
|
|
33678
|
+
readonly _executionContext: {};
|
|
33679
|
+
log: (topic: string, ...args: any[]) => Promise<void>;
|
|
33680
|
+
debug: (topic: string, ...args: any[]) => Promise<void>;
|
|
33681
|
+
info: (topic: string, ...args: any[]) => Promise<void>;
|
|
33682
|
+
warn: (topic: string, ...args: any[]) => Promise<void>;
|
|
33683
|
+
setLogger: (logger: ILogger) => void;
|
|
33684
|
+
};
|
|
33685
|
+
private _registry;
|
|
33686
|
+
/**
|
|
33687
|
+
* Registers a new frame schema.
|
|
33688
|
+
*
|
|
33689
|
+
* @param key - Unique frame name
|
|
33690
|
+
* @param value - Frame schema configuration
|
|
33691
|
+
* @throws Error if frame name already exists
|
|
33692
|
+
*/
|
|
33693
|
+
register(key: FrameName, value: IFrameSchema): void;
|
|
33694
|
+
/**
|
|
33695
|
+
* Validates frame schema structure for required properties.
|
|
33696
|
+
*
|
|
33697
|
+
* Performs shallow validation to ensure all required properties exist
|
|
33698
|
+
* and have correct types before registration in the registry.
|
|
33699
|
+
*
|
|
33700
|
+
* @param frameSchema - Frame schema to validate
|
|
33701
|
+
* @throws Error if frameName is missing or not a string
|
|
33702
|
+
* @throws Error if interval is missing or not a valid FrameInterval
|
|
33703
|
+
* @throws Error if startDate is missing or not a Date
|
|
33704
|
+
* @throws Error if endDate is missing or not a Date
|
|
33705
|
+
*/
|
|
33706
|
+
private validateShallow;
|
|
33707
|
+
/**
|
|
33708
|
+
* Overrides an existing frame schema with partial updates.
|
|
33709
|
+
*
|
|
33710
|
+
* @param key - Frame name to override
|
|
33711
|
+
* @param value - Partial schema updates
|
|
33712
|
+
* @throws Error if frame name doesn't exist
|
|
33713
|
+
*/
|
|
33714
|
+
override(key: FrameName, value: Partial<IFrameSchema>): IFrameSchema;
|
|
33715
|
+
/**
|
|
33716
|
+
* Retrieves a frame schema by name.
|
|
33717
|
+
*
|
|
33718
|
+
* @param key - Frame name
|
|
33719
|
+
* @returns Frame schema configuration
|
|
33720
|
+
* @throws Error if frame name doesn't exist
|
|
33721
|
+
*/
|
|
33722
|
+
get(key: FrameName): IFrameSchema;
|
|
33723
|
+
}
|
|
33724
|
+
|
|
33432
33725
|
/**
|
|
33433
33726
|
* Type definition for public BacktestLogic service.
|
|
33434
33727
|
* Omits private dependencies from BacktestLogicPrivateService.
|
|
@@ -33473,8 +33766,26 @@ type TBacktestLogicPrivateService = {
|
|
|
33473
33766
|
* ```
|
|
33474
33767
|
*/
|
|
33475
33768
|
declare class BacktestLogicPublicService implements TBacktestLogicPrivateService {
|
|
33476
|
-
|
|
33477
|
-
|
|
33769
|
+
readonly loggerService: {
|
|
33770
|
+
readonly methodContextService: {
|
|
33771
|
+
readonly context: IMethodContext;
|
|
33772
|
+
};
|
|
33773
|
+
readonly executionContextService: {
|
|
33774
|
+
readonly context: IExecutionContext;
|
|
33775
|
+
};
|
|
33776
|
+
_commonLogger: ILogger;
|
|
33777
|
+
readonly _methodContext: {};
|
|
33778
|
+
readonly _executionContext: {};
|
|
33779
|
+
log: (topic: string, ...args: any[]) => Promise<void>;
|
|
33780
|
+
debug: (topic: string, ...args: any[]) => Promise<void>;
|
|
33781
|
+
info: (topic: string, ...args: any[]) => Promise<void>;
|
|
33782
|
+
warn: (topic: string, ...args: any[]) => Promise<void>;
|
|
33783
|
+
setLogger: (logger: ILogger) => void;
|
|
33784
|
+
};
|
|
33785
|
+
readonly backtestLogicPrivateService: BacktestLogicPrivateService;
|
|
33786
|
+
readonly timeMetaService: TimeMetaService;
|
|
33787
|
+
readonly frameSchemaService: FrameSchemaService;
|
|
33788
|
+
readonly exchangeConnectionService: ExchangeConnectionService;
|
|
33478
33789
|
/**
|
|
33479
33790
|
* Runs backtest for a symbol with context propagation.
|
|
33480
33791
|
*
|
|
@@ -33485,11 +33796,11 @@ declare class BacktestLogicPublicService implements TBacktestLogicPrivateService
|
|
|
33485
33796
|
* @param context - Execution context with strategy, exchange, and frame names
|
|
33486
33797
|
* @returns Async generator yielding closed signals with PNL
|
|
33487
33798
|
*/
|
|
33488
|
-
run
|
|
33799
|
+
run(symbol: string, context: {
|
|
33489
33800
|
strategyName: StrategyName;
|
|
33490
33801
|
exchangeName: ExchangeName;
|
|
33491
33802
|
frameName: FrameName;
|
|
33492
|
-
})
|
|
33803
|
+
}): AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, any>;
|
|
33493
33804
|
}
|
|
33494
33805
|
|
|
33495
33806
|
/**
|
|
@@ -33780,69 +34091,6 @@ declare class ExchangeSchemaService {
|
|
|
33780
34091
|
get: (key: ExchangeName) => IExchangeSchema;
|
|
33781
34092
|
}
|
|
33782
34093
|
|
|
33783
|
-
/**
|
|
33784
|
-
* Service for managing frame schema registry.
|
|
33785
|
-
*
|
|
33786
|
-
* Uses ToolRegistry from functools-kit for type-safe schema storage.
|
|
33787
|
-
* Frames are registered via addFrame() and retrieved by name.
|
|
33788
|
-
*/
|
|
33789
|
-
declare class FrameSchemaService {
|
|
33790
|
-
readonly loggerService: {
|
|
33791
|
-
readonly methodContextService: {
|
|
33792
|
-
readonly context: IMethodContext;
|
|
33793
|
-
};
|
|
33794
|
-
readonly executionContextService: {
|
|
33795
|
-
readonly context: IExecutionContext;
|
|
33796
|
-
};
|
|
33797
|
-
_commonLogger: ILogger;
|
|
33798
|
-
readonly _methodContext: {};
|
|
33799
|
-
readonly _executionContext: {};
|
|
33800
|
-
log: (topic: string, ...args: any[]) => Promise<void>;
|
|
33801
|
-
debug: (topic: string, ...args: any[]) => Promise<void>;
|
|
33802
|
-
info: (topic: string, ...args: any[]) => Promise<void>;
|
|
33803
|
-
warn: (topic: string, ...args: any[]) => Promise<void>;
|
|
33804
|
-
setLogger: (logger: ILogger) => void;
|
|
33805
|
-
};
|
|
33806
|
-
private _registry;
|
|
33807
|
-
/**
|
|
33808
|
-
* Registers a new frame schema.
|
|
33809
|
-
*
|
|
33810
|
-
* @param key - Unique frame name
|
|
33811
|
-
* @param value - Frame schema configuration
|
|
33812
|
-
* @throws Error if frame name already exists
|
|
33813
|
-
*/
|
|
33814
|
-
register(key: FrameName, value: IFrameSchema): void;
|
|
33815
|
-
/**
|
|
33816
|
-
* Validates frame schema structure for required properties.
|
|
33817
|
-
*
|
|
33818
|
-
* Performs shallow validation to ensure all required properties exist
|
|
33819
|
-
* and have correct types before registration in the registry.
|
|
33820
|
-
*
|
|
33821
|
-
* @param frameSchema - Frame schema to validate
|
|
33822
|
-
* @throws Error if frameName is missing or not a string
|
|
33823
|
-
* @throws Error if interval is missing or not a valid FrameInterval
|
|
33824
|
-
* @throws Error if startDate is missing or not a Date
|
|
33825
|
-
* @throws Error if endDate is missing or not a Date
|
|
33826
|
-
*/
|
|
33827
|
-
private validateShallow;
|
|
33828
|
-
/**
|
|
33829
|
-
* Overrides an existing frame schema with partial updates.
|
|
33830
|
-
*
|
|
33831
|
-
* @param key - Frame name to override
|
|
33832
|
-
* @param value - Partial schema updates
|
|
33833
|
-
* @throws Error if frame name doesn't exist
|
|
33834
|
-
*/
|
|
33835
|
-
override(key: FrameName, value: Partial<IFrameSchema>): IFrameSchema;
|
|
33836
|
-
/**
|
|
33837
|
-
* Retrieves a frame schema by name.
|
|
33838
|
-
*
|
|
33839
|
-
* @param key - Frame name
|
|
33840
|
-
* @returns Frame schema configuration
|
|
33841
|
-
* @throws Error if frame name doesn't exist
|
|
33842
|
-
*/
|
|
33843
|
-
get(key: FrameName): IFrameSchema;
|
|
33844
|
-
}
|
|
33845
|
-
|
|
33846
34094
|
/**
|
|
33847
34095
|
* Service for managing sizing schema registry.
|
|
33848
34096
|
*
|
|
@@ -34100,8 +34348,24 @@ type TLiveLogicPrivateService = {
|
|
|
34100
34348
|
* ```
|
|
34101
34349
|
*/
|
|
34102
34350
|
declare class LiveLogicPublicService implements TLiveLogicPrivateService {
|
|
34103
|
-
|
|
34104
|
-
|
|
34351
|
+
readonly loggerService: {
|
|
34352
|
+
readonly methodContextService: {
|
|
34353
|
+
readonly context: IMethodContext;
|
|
34354
|
+
};
|
|
34355
|
+
readonly executionContextService: {
|
|
34356
|
+
readonly context: IExecutionContext;
|
|
34357
|
+
};
|
|
34358
|
+
_commonLogger: ILogger;
|
|
34359
|
+
readonly _methodContext: {};
|
|
34360
|
+
readonly _executionContext: {};
|
|
34361
|
+
log: (topic: string, ...args: any[]) => Promise<void>;
|
|
34362
|
+
debug: (topic: string, ...args: any[]) => Promise<void>;
|
|
34363
|
+
info: (topic: string, ...args: any[]) => Promise<void>;
|
|
34364
|
+
warn: (topic: string, ...args: any[]) => Promise<void>;
|
|
34365
|
+
setLogger: (logger: ILogger) => void;
|
|
34366
|
+
};
|
|
34367
|
+
readonly liveLogicPrivateService: LiveLogicPrivateService;
|
|
34368
|
+
readonly exchangeConnectionService: ExchangeConnectionService;
|
|
34105
34369
|
/**
|
|
34106
34370
|
* Runs live trading for a symbol with context propagation.
|
|
34107
34371
|
*
|
|
@@ -34113,18 +34377,23 @@ declare class LiveLogicPublicService implements TLiveLogicPrivateService {
|
|
|
34113
34377
|
* @param context - Execution context with strategy and exchange names
|
|
34114
34378
|
* @returns Infinite async generator yielding opened and closed signals
|
|
34115
34379
|
*/
|
|
34116
|
-
run
|
|
34380
|
+
run(symbol: string, context: {
|
|
34117
34381
|
strategyName: StrategyName;
|
|
34118
34382
|
exchangeName: ExchangeName;
|
|
34119
|
-
})
|
|
34383
|
+
}): AsyncGenerator<IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
34120
34384
|
}
|
|
34121
34385
|
|
|
34386
|
+
type Keys$1 = Omit<LiveLogicPublicService, keyof {
|
|
34387
|
+
loggerService: never;
|
|
34388
|
+
liveLogicPrivateService: never;
|
|
34389
|
+
exchangeConnectionService: never;
|
|
34390
|
+
}>;
|
|
34122
34391
|
/**
|
|
34123
34392
|
* Type definition for LiveLogicPublicService.
|
|
34124
34393
|
* Maps all keys of LiveLogicPublicService to any type.
|
|
34125
34394
|
*/
|
|
34126
34395
|
type TLiveLogicPublicService = {
|
|
34127
|
-
[key in keyof
|
|
34396
|
+
[key in keyof Keys$1]: any;
|
|
34128
34397
|
};
|
|
34129
34398
|
/**
|
|
34130
34399
|
* Global service providing access to live trading functionality.
|
|
@@ -34155,12 +34424,23 @@ declare class LiveCommandService implements TLiveLogicPublicService {
|
|
|
34155
34424
|
}) => AsyncGenerator<IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
34156
34425
|
}
|
|
34157
34426
|
|
|
34427
|
+
/**
|
|
34428
|
+
* Type definition for keys of BacktestLogicPublicService.
|
|
34429
|
+
* Omits private dependencies. Used for creating a public API surface.
|
|
34430
|
+
*/
|
|
34431
|
+
type Keys = Omit<BacktestLogicPublicService, keyof {
|
|
34432
|
+
exchangeConnectionService: never;
|
|
34433
|
+
backtestLogicPrivateService: never;
|
|
34434
|
+
frameSchemaService: never;
|
|
34435
|
+
timeMetaService: never;
|
|
34436
|
+
loggerService: never;
|
|
34437
|
+
}>;
|
|
34158
34438
|
/**
|
|
34159
34439
|
* Type definition for BacktestLogicPublicService.
|
|
34160
34440
|
* Maps all keys of BacktestLogicPublicService to any type.
|
|
34161
34441
|
*/
|
|
34162
34442
|
type TBacktestLogicPublicService = {
|
|
34163
|
-
[key in keyof
|
|
34443
|
+
[key in keyof Keys]: any;
|
|
34164
34444
|
};
|
|
34165
34445
|
/**
|
|
34166
34446
|
* Global service providing access to backtest functionality.
|
|
@@ -36079,4 +36359,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
36079
36359
|
remainingCostBasis: number;
|
|
36080
36360
|
};
|
|
36081
36361
|
|
|
36082
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type 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 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, 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, 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, getRawCandles, getRiskSchema, 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, listenBacktestProgress, 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, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|
|
36362
|
+
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, 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 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, 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, 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, getRawCandles, getRiskSchema, 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, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|