backtest-kit 6.13.0 → 6.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +558 -105
- package/build/index.mjs +556 -106
- package/package.json +2 -2
- package/types.d.ts +356 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backtest-kit",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
4
4
|
"description": "A TypeScript library for trading system backtest",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"di-kit": "^1.1.1",
|
|
78
78
|
"di-scoped": "^1.0.21",
|
|
79
79
|
"di-singleton": "^1.0.5",
|
|
80
|
-
"functools-kit": "^2.0
|
|
80
|
+
"functools-kit": "^2.2.0",
|
|
81
81
|
"get-moment-stamp": "^1.1.2"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
package/types.d.ts
CHANGED
|
@@ -4748,6 +4748,79 @@ interface IPositionOverlapLadder {
|
|
|
4748
4748
|
lowerPercent: number;
|
|
4749
4749
|
}
|
|
4750
4750
|
|
|
4751
|
+
/**
|
|
4752
|
+
* Optional payload for signal info notifications.
|
|
4753
|
+
* Both fields are optional — omitting notificationNote falls back to the signal's own note.
|
|
4754
|
+
*/
|
|
4755
|
+
type SignalNotificationPayload = {
|
|
4756
|
+
/** Optional user-defined identifier for correlating the notification with external systems (e.g. Telegram message ID) */
|
|
4757
|
+
notificationId: string;
|
|
4758
|
+
/** Human-readable note to attach to the notification. Falls back to signal.note if omitted. */
|
|
4759
|
+
notificationNote: string;
|
|
4760
|
+
};
|
|
4761
|
+
/**
|
|
4762
|
+
* Helper service for emitting signal info notifications.
|
|
4763
|
+
*
|
|
4764
|
+
* Handles validation (memoized per context) and emission of `signal.info` events
|
|
4765
|
+
* via `signalNotifySubject`. Used internally by the framework action pipeline —
|
|
4766
|
+
* end users interact with this via `commitSignalNotify()` in `onActivePing` callbacks.
|
|
4767
|
+
*/
|
|
4768
|
+
declare class NotificationHelperService {
|
|
4769
|
+
private readonly loggerService;
|
|
4770
|
+
private readonly strategySchemaService;
|
|
4771
|
+
private readonly riskValidationService;
|
|
4772
|
+
private readonly strategyValidationService;
|
|
4773
|
+
private readonly exchangeValidationService;
|
|
4774
|
+
private readonly frameValidationService;
|
|
4775
|
+
private readonly actionValidationService;
|
|
4776
|
+
private readonly strategyCoreService;
|
|
4777
|
+
private readonly timeMetaService;
|
|
4778
|
+
/**
|
|
4779
|
+
* Validates strategy, exchange, frame, risk, and action schemas for the given context.
|
|
4780
|
+
*
|
|
4781
|
+
* Memoized per unique `"strategyName:exchangeName[:frameName]"` key — subsequent calls
|
|
4782
|
+
* with the same context are no-ops, so validation runs at most once per context.
|
|
4783
|
+
*
|
|
4784
|
+
* @param context - Routing context: strategyName, exchangeName, frameName
|
|
4785
|
+
* @throws {Error} If any registered schema fails validation
|
|
4786
|
+
*/
|
|
4787
|
+
validate: ((context: {
|
|
4788
|
+
strategyName: StrategyName;
|
|
4789
|
+
exchangeName: ExchangeName;
|
|
4790
|
+
frameName: FrameName;
|
|
4791
|
+
}) => Promise<void>) & functools_kit.IClearableMemoize<string> & functools_kit.IControlMemoize<string, Promise<void>>;
|
|
4792
|
+
/**
|
|
4793
|
+
* Emits a `signal.info` notification for the currently active pending signal.
|
|
4794
|
+
*
|
|
4795
|
+
* Validates all schemas (via memoized `validate`), resolves the pending signal
|
|
4796
|
+
* for the given symbol, then emits a `SignalInfoContract` via `signalNotifySubject`,
|
|
4797
|
+
* which is routed to all registered `listenSignalNotify` callbacks and persisted
|
|
4798
|
+
* by `NotificationAdapter`.
|
|
4799
|
+
*
|
|
4800
|
+
* @param payload - Optional notification fields (notificationId, notificationNote)
|
|
4801
|
+
* @param symbol - Trading pair symbol (e.g. "BTCUSDT")
|
|
4802
|
+
* @param currentPrice - Market price at the time of the call
|
|
4803
|
+
* @param context - Routing context: strategyName, exchangeName, frameName
|
|
4804
|
+
* @param backtest - true when called during a backtest run
|
|
4805
|
+
*
|
|
4806
|
+
* @throws {Error} If no active pending signal is found for the given symbol
|
|
4807
|
+
*
|
|
4808
|
+
* @example
|
|
4809
|
+
* ```typescript
|
|
4810
|
+
* // Inside onActivePing callback:
|
|
4811
|
+
* await commitSignalNotify("BTCUSDT", {
|
|
4812
|
+
* notificationNote: "RSI crossed 70, consider closing",
|
|
4813
|
+
* notificationId: "msg-123",
|
|
4814
|
+
* });
|
|
4815
|
+
* ```
|
|
4816
|
+
*/
|
|
4817
|
+
commitSignalNotify: (payload: Partial<SignalNotificationPayload>, symbol: string, currentPrice: number, context: {
|
|
4818
|
+
strategyName: StrategyName;
|
|
4819
|
+
exchangeName: ExchangeName;
|
|
4820
|
+
frameName: FrameName;
|
|
4821
|
+
}, backtest: boolean) => Promise<void>;
|
|
4822
|
+
}
|
|
4823
|
+
|
|
4751
4824
|
/**
|
|
4752
4825
|
* Cancels the scheduled signal without stopping the strategy.
|
|
4753
4826
|
*
|
|
@@ -5868,6 +5941,38 @@ declare function hasNoPendingSignal(symbol: string): Promise<boolean>;
|
|
|
5868
5941
|
* ```
|
|
5869
5942
|
*/
|
|
5870
5943
|
declare function hasNoScheduledSignal(symbol: string): Promise<boolean>;
|
|
5944
|
+
/**
|
|
5945
|
+
* Emits a `signal.info` notification for the currently active pending signal.
|
|
5946
|
+
*
|
|
5947
|
+
* Broadcasts a user-defined informational note without affecting position state.
|
|
5948
|
+
* Useful for annotating strategy decisions, triggering external alerts, or logging
|
|
5949
|
+
* mid-position events (e.g. RSI crossing a threshold, volume spike detected).
|
|
5950
|
+
*
|
|
5951
|
+
* Automatically reads backtest/live mode from execution context.
|
|
5952
|
+
* Automatically reads strategyName, exchangeName, frameName from method context.
|
|
5953
|
+
* Automatically fetches current price via getAveragePrice.
|
|
5954
|
+
*
|
|
5955
|
+
* @param symbol - Trading pair symbol (e.g. "BTCUSDT")
|
|
5956
|
+
* @param payload - Optional notification fields
|
|
5957
|
+
* @param payload.notificationNote - Human-readable note. Falls back to signal.note if omitted.
|
|
5958
|
+
* @param payload.notificationId - Optional correlation ID for external systems (e.g. Telegram message ID).
|
|
5959
|
+
*
|
|
5960
|
+
* @throws {Error} If called outside an execution context
|
|
5961
|
+
* @throws {Error} If called outside a method context
|
|
5962
|
+
* @throws {Error} If no active pending signal exists for the given symbol
|
|
5963
|
+
*
|
|
5964
|
+
* @example
|
|
5965
|
+
* ```typescript
|
|
5966
|
+
* import { commitSignalNotify } from "backtest-kit";
|
|
5967
|
+
*
|
|
5968
|
+
* // Inside onActivePing callback:
|
|
5969
|
+
* await commitSignalNotify("BTCUSDT", {
|
|
5970
|
+
* notificationNote: "RSI crossed 70, consider closing",
|
|
5971
|
+
* notificationId: "msg-123",
|
|
5972
|
+
* });
|
|
5973
|
+
* ```
|
|
5974
|
+
*/
|
|
5975
|
+
declare function commitSignalNotify(symbol: string, payload?: Partial<SignalNotificationPayload>): Promise<void>;
|
|
5871
5976
|
|
|
5872
5977
|
/**
|
|
5873
5978
|
* Stops the strategy from generating new signals.
|
|
@@ -7581,6 +7686,89 @@ interface MaxDrawdownContract {
|
|
|
7581
7686
|
backtest: boolean;
|
|
7582
7687
|
}
|
|
7583
7688
|
|
|
7689
|
+
/**
|
|
7690
|
+
* Contract for signal info notification events.
|
|
7691
|
+
*
|
|
7692
|
+
* Emitted by signalNotifySubject when a strategy calls commitSignalInfo() to broadcast
|
|
7693
|
+
* a user-defined informational message for an open position.
|
|
7694
|
+
* Used for custom strategy annotations, debug output, and external notification routing.
|
|
7695
|
+
*
|
|
7696
|
+
* Consumers:
|
|
7697
|
+
* - User callbacks via listenSignalNotify() / listenSignalNotifyOnce()
|
|
7698
|
+
*
|
|
7699
|
+
* @example
|
|
7700
|
+
* ```typescript
|
|
7701
|
+
* import { listenSignalNotify } from "backtest-kit";
|
|
7702
|
+
*
|
|
7703
|
+
* // Listen to all signal info events
|
|
7704
|
+
* listenSignalNotify((event) => {
|
|
7705
|
+
* console.log(`[${event.backtest ? "Backtest" : "Live"}] Signal ${event.data.id}: ${event.note}`);
|
|
7706
|
+
* console.log(`Symbol: ${event.symbol}, Price: ${event.currentPrice}`);
|
|
7707
|
+
* });
|
|
7708
|
+
*
|
|
7709
|
+
* // Wait for the first info event on BTCUSDT
|
|
7710
|
+
* listenSignalNotifyOnce(
|
|
7711
|
+
* (event) => event.symbol === "BTCUSDT",
|
|
7712
|
+
* (event) => console.log("BTCUSDT info:", event.note)
|
|
7713
|
+
* );
|
|
7714
|
+
* ```
|
|
7715
|
+
*/
|
|
7716
|
+
interface SignalInfoContract {
|
|
7717
|
+
/**
|
|
7718
|
+
* Trading pair symbol (e.g., "BTCUSDT").
|
|
7719
|
+
* Identifies which market this info event belongs to.
|
|
7720
|
+
*/
|
|
7721
|
+
symbol: string;
|
|
7722
|
+
/**
|
|
7723
|
+
* Strategy name that generated this signal.
|
|
7724
|
+
* Identifies which strategy execution this info event belongs to.
|
|
7725
|
+
*/
|
|
7726
|
+
strategyName: StrategyName;
|
|
7727
|
+
/**
|
|
7728
|
+
* Exchange name where this signal is being executed.
|
|
7729
|
+
* Identifies which exchange this info event belongs to.
|
|
7730
|
+
*/
|
|
7731
|
+
exchangeName: ExchangeName;
|
|
7732
|
+
/**
|
|
7733
|
+
* Frame name where this signal is being executed.
|
|
7734
|
+
* Identifies which frame this info event belongs to (empty string for live mode).
|
|
7735
|
+
*/
|
|
7736
|
+
frameName: FrameName;
|
|
7737
|
+
/**
|
|
7738
|
+
* Complete signal row data with original prices.
|
|
7739
|
+
* Contains all signal information including originalPriceStopLoss, originalPriceTakeProfit, and partialExecuted.
|
|
7740
|
+
*/
|
|
7741
|
+
data: IPublicSignalRow;
|
|
7742
|
+
/**
|
|
7743
|
+
* Current market price at the moment the info event was emitted.
|
|
7744
|
+
*/
|
|
7745
|
+
currentPrice: number;
|
|
7746
|
+
/**
|
|
7747
|
+
* User-defined informational note attached to this event.
|
|
7748
|
+
* Provided by the strategy when calling commitSignalInfo().
|
|
7749
|
+
*/
|
|
7750
|
+
note: string;
|
|
7751
|
+
/**
|
|
7752
|
+
* Optional user-defined identifier for correlating this event with external systems.
|
|
7753
|
+
* Provided by the strategy when calling commitSignalInfo().
|
|
7754
|
+
*/
|
|
7755
|
+
notificationId?: string;
|
|
7756
|
+
/**
|
|
7757
|
+
* Execution mode flag.
|
|
7758
|
+
* - true: Event from backtest execution (historical candle data)
|
|
7759
|
+
* - false: Event from live trading (real-time tick)
|
|
7760
|
+
*/
|
|
7761
|
+
backtest: boolean;
|
|
7762
|
+
/**
|
|
7763
|
+
* Event timestamp in milliseconds since Unix epoch.
|
|
7764
|
+
*
|
|
7765
|
+
* Timing semantics:
|
|
7766
|
+
* - Live mode: when.getTime() at the moment the info event was emitted
|
|
7767
|
+
* - Backtest mode: candle.timestamp of the candle that triggered the event
|
|
7768
|
+
*/
|
|
7769
|
+
timestamp: number;
|
|
7770
|
+
}
|
|
7771
|
+
|
|
7584
7772
|
/**
|
|
7585
7773
|
* Subscribes to all signal events with queued async processing.
|
|
7586
7774
|
*
|
|
@@ -8636,6 +8824,24 @@ declare function listenMaxDrawdown(fn: (event: MaxDrawdownContract) => void): ()
|
|
|
8636
8824
|
* @return Unsubscribe function to cancel the listener before it fires
|
|
8637
8825
|
*/
|
|
8638
8826
|
declare function listenMaxDrawdownOnce(filterFn: (event: MaxDrawdownContract) => boolean, fn: (event: MaxDrawdownContract) => void): () => void;
|
|
8827
|
+
/**
|
|
8828
|
+
* Subscribes to signal info events with queued async processing.
|
|
8829
|
+
* Emits when a strategy calls commitSignalInfo() to broadcast a user-defined note for an open position.
|
|
8830
|
+
* Events are processed sequentially in order received, even if callback is async.
|
|
8831
|
+
* Uses queued wrapper to prevent concurrent execution of the callback.
|
|
8832
|
+
* @param fn - Callback function to handle signal info events
|
|
8833
|
+
* @return Unsubscribe function to stop listening to events
|
|
8834
|
+
*/
|
|
8835
|
+
declare function listenSignalNotify(fn: (event: SignalInfoContract) => void): () => void;
|
|
8836
|
+
/**
|
|
8837
|
+
* Subscribes to filtered signal info events with one-time execution.
|
|
8838
|
+
* Listens for events matching the filter predicate, then executes callback once
|
|
8839
|
+
* and automatically unsubscribes.
|
|
8840
|
+
* @param filterFn - Predicate to filter which events trigger the callback
|
|
8841
|
+
* @param fn - Callback function to handle the filtered event (called only once)
|
|
8842
|
+
* @return Unsubscribe function to cancel the listener before it fires
|
|
8843
|
+
*/
|
|
8844
|
+
declare function listenSignalNotifyOnce(filterFn: (event: SignalInfoContract) => boolean, fn: (event: SignalInfoContract) => void): () => void;
|
|
8639
8845
|
|
|
8640
8846
|
/**
|
|
8641
8847
|
* Checks if trade context is active (execution and method contexts).
|
|
@@ -10578,6 +10784,70 @@ interface ClosePendingCommitNotification {
|
|
|
10578
10784
|
/** Unix timestamp in milliseconds when the notification was created */
|
|
10579
10785
|
createdAt: number;
|
|
10580
10786
|
}
|
|
10787
|
+
/**
|
|
10788
|
+
* Signal info notification.
|
|
10789
|
+
* Emitted when a strategy broadcasts a user-defined informational note for an open position.
|
|
10790
|
+
*/
|
|
10791
|
+
interface SignalInfoNotification {
|
|
10792
|
+
/** Discriminator for type-safe union */
|
|
10793
|
+
type: "signal.info";
|
|
10794
|
+
/** Unique notification identifier */
|
|
10795
|
+
id: string;
|
|
10796
|
+
/** Unix timestamp in milliseconds when the info event was emitted */
|
|
10797
|
+
timestamp: number;
|
|
10798
|
+
/** Whether this notification is from backtest mode (true) or live mode (false) */
|
|
10799
|
+
backtest: boolean;
|
|
10800
|
+
/** Trading pair symbol (e.g., "BTCUSDT") */
|
|
10801
|
+
symbol: string;
|
|
10802
|
+
/** Strategy name that generated this signal */
|
|
10803
|
+
strategyName: StrategyName;
|
|
10804
|
+
/** Exchange name where signal was executed */
|
|
10805
|
+
exchangeName: ExchangeName;
|
|
10806
|
+
/** Unique signal identifier (UUID v4) */
|
|
10807
|
+
signalId: string;
|
|
10808
|
+
/** Current market price when the info event was emitted */
|
|
10809
|
+
currentPrice: number;
|
|
10810
|
+
/** Trade direction: "long" (buy) or "short" (sell) */
|
|
10811
|
+
position: "long" | "short";
|
|
10812
|
+
/** Entry price for the position */
|
|
10813
|
+
priceOpen: number;
|
|
10814
|
+
/** Effective take profit price (with trailing if set) */
|
|
10815
|
+
priceTakeProfit: number;
|
|
10816
|
+
/** Effective stop loss price (with trailing if set) */
|
|
10817
|
+
priceStopLoss: number;
|
|
10818
|
+
/** Original take profit price before any trailing adjustments */
|
|
10819
|
+
originalPriceTakeProfit: number;
|
|
10820
|
+
/** Original stop loss price before any trailing adjustments */
|
|
10821
|
+
originalPriceStopLoss: number;
|
|
10822
|
+
/** Original entry price at signal creation (unchanged by DCA averaging) */
|
|
10823
|
+
originalPriceOpen: number;
|
|
10824
|
+
/** Total number of DCA entries (_entry.length). 1 = no averaging. */
|
|
10825
|
+
totalEntries: number;
|
|
10826
|
+
/** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
|
|
10827
|
+
totalPartials: number;
|
|
10828
|
+
/** Unrealized PNL at the moment the info event was emitted (from data.pnl) */
|
|
10829
|
+
pnl: IStrategyPnL;
|
|
10830
|
+
/** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
|
|
10831
|
+
pnlPercentage: number;
|
|
10832
|
+
/** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
|
|
10833
|
+
pnlPriceOpen: number;
|
|
10834
|
+
/** Exit price from PNL calculation (adjusted with slippage and fees) */
|
|
10835
|
+
pnlPriceClose: number;
|
|
10836
|
+
/** Absolute profit/loss in USD */
|
|
10837
|
+
pnlCost: number;
|
|
10838
|
+
/** Total invested capital in USD */
|
|
10839
|
+
pnlEntries: number;
|
|
10840
|
+
/** User-defined informational note provided by the strategy */
|
|
10841
|
+
note: string;
|
|
10842
|
+
/** Optional user-defined identifier for correlating this notification with external systems */
|
|
10843
|
+
notificationId?: string;
|
|
10844
|
+
/** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
|
|
10845
|
+
scheduledAt: number;
|
|
10846
|
+
/** Pending timestamp in milliseconds (when position became pending/active at priceOpen) */
|
|
10847
|
+
pendingAt: number;
|
|
10848
|
+
/** Unix timestamp in milliseconds when the notification was created */
|
|
10849
|
+
createdAt: number;
|
|
10850
|
+
}
|
|
10581
10851
|
/**
|
|
10582
10852
|
* Root discriminated union of all notification types.
|
|
10583
10853
|
* Type discrimination is done via the `type` field.
|
|
@@ -10604,7 +10874,7 @@ interface ClosePendingCommitNotification {
|
|
|
10604
10874
|
* }
|
|
10605
10875
|
* ```
|
|
10606
10876
|
*/
|
|
10607
|
-
type NotificationModel = SignalOpenedNotification | SignalClosedNotification | PartialProfitAvailableNotification | PartialLossAvailableNotification | BreakevenAvailableNotification | PartialProfitCommitNotification | PartialLossCommitNotification | BreakevenCommitNotification | AverageBuyCommitNotification | ActivateScheduledCommitNotification | TrailingStopCommitNotification | TrailingTakeCommitNotification | CancelScheduledCommitNotification | ClosePendingCommitNotification | SignalSyncOpenNotification | SignalSyncCloseNotification | RiskRejectionNotification | SignalScheduledNotification | SignalCancelledNotification | InfoErrorNotification | CriticalErrorNotification | ValidationErrorNotification;
|
|
10877
|
+
type NotificationModel = SignalOpenedNotification | SignalClosedNotification | PartialProfitAvailableNotification | PartialLossAvailableNotification | BreakevenAvailableNotification | PartialProfitCommitNotification | PartialLossCommitNotification | BreakevenCommitNotification | AverageBuyCommitNotification | ActivateScheduledCommitNotification | TrailingStopCommitNotification | TrailingTakeCommitNotification | CancelScheduledCommitNotification | ClosePendingCommitNotification | SignalSyncOpenNotification | SignalSyncCloseNotification | RiskRejectionNotification | SignalScheduledNotification | SignalCancelledNotification | InfoErrorNotification | CriticalErrorNotification | ValidationErrorNotification | SignalInfoNotification;
|
|
10608
10878
|
|
|
10609
10879
|
/**
|
|
10610
10880
|
* Unified tick event data for report generation.
|
|
@@ -13286,6 +13556,33 @@ declare class MarkdownUtils {
|
|
|
13286
13556
|
* ```
|
|
13287
13557
|
*/
|
|
13288
13558
|
disable: ({ backtest: bt, breakeven, heat, live, partial, performance, risk, strategy, schedule, walker, sync, highest_profit, max_drawdown, }?: Partial<IMarkdownTarget>) => void;
|
|
13559
|
+
/**
|
|
13560
|
+
* Clears markdown report data selectively.
|
|
13561
|
+
*
|
|
13562
|
+
* Clears accumulated data for specified markdown services without unsubscribing.
|
|
13563
|
+
* Use this method to reset report data for specific services while keeping them active.
|
|
13564
|
+
*
|
|
13565
|
+
* Each cleared service will:
|
|
13566
|
+
* - Clear accumulated data for all reports
|
|
13567
|
+
* - Start fresh with new data for future events
|
|
13568
|
+
* - Not affect event subscriptions or report generation status
|
|
13569
|
+
*
|
|
13570
|
+
* @param config - Service configuration object specifying which services to clear. Defaults to clearing all services.
|
|
13571
|
+
* @param config.backtest - Clear backtest result report data
|
|
13572
|
+
* @param config.breakeven - Clear breakeven event tracking data
|
|
13573
|
+
* @param config.partial - Clear partial profit/loss event tracking data
|
|
13574
|
+
* @param config.heat - Clear portfolio heatmap analysis data
|
|
13575
|
+
* @param config.walker - Clear walker strategy comparison report data
|
|
13576
|
+
* @param config.performance - Clear performance bottleneck analysis data
|
|
13577
|
+
* @param config.risk - Clear risk rejection tracking data
|
|
13578
|
+
* @param config.schedule - Clear scheduled signal tracking data
|
|
13579
|
+
* @param config.live - Clear live trading event report data
|
|
13580
|
+
* @param config.strategy - Clear strategy report data
|
|
13581
|
+
* @param config.sync - Clear sync report data
|
|
13582
|
+
* @param config.highest_profit - Clear highest profit report data
|
|
13583
|
+
* @param config.max_drawdown - Clear max drawdown report data
|
|
13584
|
+
*/
|
|
13585
|
+
clear: ({ backtest: bt, breakeven, heat, live, partial, performance, risk, strategy, schedule, walker, sync, highest_profit, max_drawdown, }?: Partial<IMarkdownTarget>) => void;
|
|
13289
13586
|
}
|
|
13290
13587
|
/**
|
|
13291
13588
|
* Markdown adapter with pluggable storage backend and instance memoization.
|
|
@@ -13318,12 +13615,6 @@ declare class MarkdownAdapter extends MarkdownUtils {
|
|
|
13318
13615
|
* All dumps append to a single .jsonl file per markdown type.
|
|
13319
13616
|
*/
|
|
13320
13617
|
useJsonl(): void;
|
|
13321
|
-
/**
|
|
13322
|
-
* Clears the memoized storage cache.
|
|
13323
|
-
* Call this when process.cwd() changes between strategy iterations
|
|
13324
|
-
* so new storage instances are created with the updated base path.
|
|
13325
|
-
*/
|
|
13326
|
-
clear(): void;
|
|
13327
13618
|
/**
|
|
13328
13619
|
* Switches to a dummy markdown adapter that discards all writes.
|
|
13329
13620
|
* All future markdown writes will be no-ops.
|
|
@@ -14799,6 +15090,30 @@ declare class BacktestUtils {
|
|
|
14799
15090
|
exchangeName: ExchangeName;
|
|
14800
15091
|
frameName: FrameName;
|
|
14801
15092
|
}, cost?: number) => Promise<boolean>;
|
|
15093
|
+
/**
|
|
15094
|
+
* Emits a `signal.info` notification for the currently active pending signal.
|
|
15095
|
+
*
|
|
15096
|
+
* @param symbol - Trading pair symbol
|
|
15097
|
+
* @param currentPrice - Market price at the time of the call
|
|
15098
|
+
* @param context - Execution context with strategyName, exchangeName, frameName
|
|
15099
|
+
* @param payload - Optional notification fields (notificationNote, notificationId)
|
|
15100
|
+
*
|
|
15101
|
+
* @throws {Error} If no active pending signal exists for the given symbol
|
|
15102
|
+
*
|
|
15103
|
+
* @example
|
|
15104
|
+
* ```typescript
|
|
15105
|
+
* await Backtest.commitSignalNotify("BTCUSDT", 42000, {
|
|
15106
|
+
* strategyName: "my-strategy",
|
|
15107
|
+
* exchangeName: "binance",
|
|
15108
|
+
* frameName: "1h"
|
|
15109
|
+
* }, { notificationNote: "RSI crossed 70" });
|
|
15110
|
+
* ```
|
|
15111
|
+
*/
|
|
15112
|
+
commitSignalNotify: (symbol: string, currentPrice: number, context: {
|
|
15113
|
+
strategyName: StrategyName;
|
|
15114
|
+
exchangeName: ExchangeName;
|
|
15115
|
+
frameName: FrameName;
|
|
15116
|
+
}, payload?: Partial<SignalNotificationPayload>) => Promise<void>;
|
|
14802
15117
|
/**
|
|
14803
15118
|
* Gets statistical data from all closed signals for a symbol-strategy pair.
|
|
14804
15119
|
*
|
|
@@ -16211,6 +16526,28 @@ declare class LiveUtils {
|
|
|
16211
16526
|
strategyName: StrategyName;
|
|
16212
16527
|
exchangeName: ExchangeName;
|
|
16213
16528
|
}, cost?: number) => Promise<boolean>;
|
|
16529
|
+
/**
|
|
16530
|
+
* Emits a `signal.info` notification for the currently active pending signal.
|
|
16531
|
+
*
|
|
16532
|
+
* @param symbol - Trading pair symbol
|
|
16533
|
+
* @param currentPrice - Market price at the time of the call
|
|
16534
|
+
* @param context - Execution context with strategyName and exchangeName
|
|
16535
|
+
* @param payload - Optional notification fields (notificationNote, notificationId)
|
|
16536
|
+
*
|
|
16537
|
+
* @throws {Error} If no active pending signal exists for the given symbol
|
|
16538
|
+
*
|
|
16539
|
+
* @example
|
|
16540
|
+
* ```typescript
|
|
16541
|
+
* await Live.commitSignalNotify("BTCUSDT", 42000, {
|
|
16542
|
+
* strategyName: "my-strategy",
|
|
16543
|
+
* exchangeName: "binance",
|
|
16544
|
+
* }, { notificationNote: "RSI crossed 70" });
|
|
16545
|
+
* ```
|
|
16546
|
+
*/
|
|
16547
|
+
commitSignalNotify: (symbol: string, currentPrice: number, context: {
|
|
16548
|
+
strategyName: StrategyName;
|
|
16549
|
+
exchangeName: ExchangeName;
|
|
16550
|
+
}, payload?: Partial<SignalNotificationPayload>) => Promise<void>;
|
|
16214
16551
|
/**
|
|
16215
16552
|
* Gets statistical data from all live trading events for a symbol-strategy pair.
|
|
16216
16553
|
*
|
|
@@ -20371,6 +20708,7 @@ interface INotificationUtils {
|
|
|
20371
20708
|
* @param data - The strategy tick result data
|
|
20372
20709
|
*/
|
|
20373
20710
|
handleSignal(data: IStrategyTickResult): Promise<void>;
|
|
20711
|
+
handleSignalNotify(data: SignalInfoContract): Promise<void>;
|
|
20374
20712
|
/**
|
|
20375
20713
|
* Handles partial profit availability event.
|
|
20376
20714
|
* @param data - The partial profit contract data
|
|
@@ -20449,6 +20787,7 @@ declare class NotificationBacktestAdapter implements INotificationUtils {
|
|
|
20449
20787
|
* @param data - The strategy tick result data
|
|
20450
20788
|
*/
|
|
20451
20789
|
handleSignal: (data: IStrategyTickResult) => Promise<void>;
|
|
20790
|
+
handleSignalNotify: (data: SignalInfoContract) => Promise<void>;
|
|
20452
20791
|
/**
|
|
20453
20792
|
* Handles partial profit availability event.
|
|
20454
20793
|
* Proxies call to the underlying notification adapter.
|
|
@@ -20561,6 +20900,7 @@ declare class NotificationLiveAdapter implements INotificationUtils {
|
|
|
20561
20900
|
* @param data - The strategy tick result data
|
|
20562
20901
|
*/
|
|
20563
20902
|
handleSignal: (data: IStrategyTickResult) => Promise<void>;
|
|
20903
|
+
handleSignalNotify: (data: SignalInfoContract) => Promise<void>;
|
|
20564
20904
|
/**
|
|
20565
20905
|
* Handles partial profit availability event.
|
|
20566
20906
|
* Proxies call to the underlying notification adapter.
|
|
@@ -24051,6 +24391,11 @@ declare const highestProfitSubject: Subject<HighestProfitContract>;
|
|
|
24051
24391
|
* Allows users to track drawdown levels and implement custom risk management logic based on drawdown thresholds.
|
|
24052
24392
|
*/
|
|
24053
24393
|
declare const maxDrawdownSubject: Subject<MaxDrawdownContract>;
|
|
24394
|
+
/**
|
|
24395
|
+
* Signal info emitter for user-defined informational notes on open positions.
|
|
24396
|
+
* Emits when a strategy calls commitSignalInfo() to broadcast a custom annotation.
|
|
24397
|
+
*/
|
|
24398
|
+
declare const signalNotifySubject: Subject<SignalInfoContract>;
|
|
24054
24399
|
|
|
24055
24400
|
declare const emitters_activePingSubject: typeof activePingSubject;
|
|
24056
24401
|
declare const emitters_backtestScheduleOpenSubject: typeof backtestScheduleOpenSubject;
|
|
@@ -24073,6 +24418,7 @@ declare const emitters_shutdownEmitter: typeof shutdownEmitter;
|
|
|
24073
24418
|
declare const emitters_signalBacktestEmitter: typeof signalBacktestEmitter;
|
|
24074
24419
|
declare const emitters_signalEmitter: typeof signalEmitter;
|
|
24075
24420
|
declare const emitters_signalLiveEmitter: typeof signalLiveEmitter;
|
|
24421
|
+
declare const emitters_signalNotifySubject: typeof signalNotifySubject;
|
|
24076
24422
|
declare const emitters_strategyCommitSubject: typeof strategyCommitSubject;
|
|
24077
24423
|
declare const emitters_syncSubject: typeof syncSubject;
|
|
24078
24424
|
declare const emitters_validationSubject: typeof validationSubject;
|
|
@@ -24080,7 +24426,7 @@ declare const emitters_walkerCompleteSubject: typeof walkerCompleteSubject;
|
|
|
24080
24426
|
declare const emitters_walkerEmitter: typeof walkerEmitter;
|
|
24081
24427
|
declare const emitters_walkerStopSubject: typeof walkerStopSubject;
|
|
24082
24428
|
declare namespace emitters {
|
|
24083
|
-
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_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_strategyCommitSubject as strategyCommitSubject, emitters_syncSubject as syncSubject, emitters_validationSubject as validationSubject, emitters_walkerCompleteSubject as walkerCompleteSubject, emitters_walkerEmitter as walkerEmitter, emitters_walkerStopSubject as walkerStopSubject };
|
|
24429
|
+
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_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 };
|
|
24084
24430
|
}
|
|
24085
24431
|
|
|
24086
24432
|
/**
|
|
@@ -31388,6 +31734,7 @@ declare class MaxDrawdownReportService {
|
|
|
31388
31734
|
}
|
|
31389
31735
|
|
|
31390
31736
|
declare const backtest: {
|
|
31737
|
+
notificationHelperService: NotificationHelperService;
|
|
31391
31738
|
exchangeValidationService: ExchangeValidationService;
|
|
31392
31739
|
strategyValidationService: StrategyValidationService;
|
|
31393
31740
|
frameValidationService: FrameValidationService;
|
|
@@ -31579,4 +31926,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
31579
31926
|
remainingCostBasis: number;
|
|
31580
31927
|
};
|
|
31581
31928
|
|
|
31582
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, type MemoryData, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getRawCandles, getRiskSchema, getScheduledSignal, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
|
|
31929
|
+
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, type MemoryData, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getRawCandles, getRiskSchema, getScheduledSignal, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, 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, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
|