backtest-kit 7.1.0 → 7.3.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/types.d.ts CHANGED
@@ -1249,6 +1249,10 @@ interface SignalOpenContract extends SignalSyncBase {
1249
1249
  currentPrice: number;
1250
1250
  /** Total PNL of the closed position (including all entries and partials) */
1251
1251
  pnl: IStrategyPnL;
1252
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
1253
+ peakProfit: IStrategyPnL;
1254
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
1255
+ maxDrawdown: IStrategyPnL;
1252
1256
  /** Cost of the position at close (sum of all entry costs) */
1253
1257
  cost: number;
1254
1258
  /** Trade direction: "long" (buy) or "short" (sell) */
@@ -1300,6 +1304,10 @@ interface SignalCloseContract extends SignalSyncBase {
1300
1304
  currentPrice: number;
1301
1305
  /** Total PNL of the closed position (including all entries and partials) */
1302
1306
  pnl: IStrategyPnL;
1307
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
1308
+ peakProfit: IStrategyPnL;
1309
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
1310
+ maxDrawdown: IStrategyPnL;
1303
1311
  /** Trade direction: "long" (buy) or "short" (sell) */
1304
1312
  position: "long" | "short";
1305
1313
  /** Effective entry price at time of close (may differ from priceOpen after DCA averaging) */
@@ -1970,6 +1978,8 @@ interface SignalCommitBase {
1970
1978
  totalPartials: number;
1971
1979
  /** Original entry price at signal creation (unchanged by DCA averaging). */
1972
1980
  originalPriceOpen: number;
1981
+ /** Signal data at the moment of this event (snapshot of IPublicSignalRow) */
1982
+ signal: IPublicSignalRow;
1973
1983
  /** Optional human-readable description of signal reason */
1974
1984
  note?: string;
1975
1985
  }
@@ -1981,8 +1991,12 @@ interface CancelScheduledCommit extends SignalCommitBase {
1981
1991
  action: "cancel-scheduled";
1982
1992
  /** Optional identifier for the cancellation reason (user-provided) */
1983
1993
  cancelId?: string;
1984
- /** Unrealized PNL at the moment of cancellation */
1994
+ /** Total PNL of the closed position (including all entries and partials) */
1985
1995
  pnl: IStrategyPnL;
1996
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
1997
+ peakProfit: IStrategyPnL;
1998
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
1999
+ maxDrawdown: IStrategyPnL;
1986
2000
  }
1987
2001
  /**
1988
2002
  * Close pending signal event.
@@ -1992,8 +2006,12 @@ interface ClosePendingCommit extends SignalCommitBase {
1992
2006
  action: "close-pending";
1993
2007
  /** Optional identifier for the close reason (user-provided) */
1994
2008
  closeId?: string;
1995
- /** PNL at the moment of close */
2009
+ /** Total PNL of the closed position (including all entries and partials) */
1996
2010
  pnl: IStrategyPnL;
2011
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2012
+ peakProfit: IStrategyPnL;
2013
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2014
+ maxDrawdown: IStrategyPnL;
1997
2015
  }
1998
2016
  /**
1999
2017
  * Partial profit event.
@@ -2005,8 +2023,12 @@ interface PartialProfitCommit extends SignalCommitBase {
2005
2023
  percentToClose: number;
2006
2024
  /** Current market price at time of action */
2007
2025
  currentPrice: number;
2008
- /** Unrealized PNL at the moment of partial profit */
2026
+ /** Total PNL of the closed position (including all entries and partials) */
2009
2027
  pnl: IStrategyPnL;
2028
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2029
+ peakProfit: IStrategyPnL;
2030
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2031
+ maxDrawdown: IStrategyPnL;
2010
2032
  /** Trade direction: "long" (buy) or "short" (sell) */
2011
2033
  position: "long" | "short";
2012
2034
  /** Entry price for the position */
@@ -2034,8 +2056,12 @@ interface PartialLossCommit extends SignalCommitBase {
2034
2056
  percentToClose: number;
2035
2057
  /** Current market price at time of action */
2036
2058
  currentPrice: number;
2037
- /** Unrealized PNL at the moment of partial loss */
2059
+ /** Total PNL of the closed position (including all entries and partials) */
2038
2060
  pnl: IStrategyPnL;
2061
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2062
+ peakProfit: IStrategyPnL;
2063
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2064
+ maxDrawdown: IStrategyPnL;
2039
2065
  /** Trade direction: "long" (buy) or "short" (sell) */
2040
2066
  position: "long" | "short";
2041
2067
  /** Entry price for the position */
@@ -2063,8 +2089,12 @@ interface TrailingStopCommit extends SignalCommitBase {
2063
2089
  percentShift: number;
2064
2090
  /** Current market price at time of trailing adjustment */
2065
2091
  currentPrice: number;
2066
- /** Unrealized PNL at the moment of trailing stop adjustment */
2092
+ /** Total PNL of the closed position (including all entries and partials) */
2067
2093
  pnl: IStrategyPnL;
2094
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2095
+ peakProfit: IStrategyPnL;
2096
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2097
+ maxDrawdown: IStrategyPnL;
2068
2098
  /** Trade direction: "long" (buy) or "short" (sell) */
2069
2099
  position: "long" | "short";
2070
2100
  /** Entry price for the position */
@@ -2092,8 +2122,12 @@ interface TrailingTakeCommit extends SignalCommitBase {
2092
2122
  percentShift: number;
2093
2123
  /** Current market price at time of trailing adjustment */
2094
2124
  currentPrice: number;
2095
- /** Unrealized PNL at the moment of trailing take adjustment */
2125
+ /** Total PNL of the closed position (including all entries and partials) */
2096
2126
  pnl: IStrategyPnL;
2127
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2128
+ peakProfit: IStrategyPnL;
2129
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2130
+ maxDrawdown: IStrategyPnL;
2097
2131
  /** Trade direction: "long" (buy) or "short" (sell) */
2098
2132
  position: "long" | "short";
2099
2133
  /** Entry price for the position */
@@ -2119,8 +2153,12 @@ interface BreakevenCommit extends SignalCommitBase {
2119
2153
  action: "breakeven";
2120
2154
  /** Current market price at time of breakeven adjustment */
2121
2155
  currentPrice: number;
2122
- /** Unrealized PNL at the moment of breakeven adjustment */
2156
+ /** Total PNL of the closed position (including all entries and partials) */
2123
2157
  pnl: IStrategyPnL;
2158
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2159
+ peakProfit: IStrategyPnL;
2160
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2161
+ maxDrawdown: IStrategyPnL;
2124
2162
  /** Trade direction: "long" (buy) or "short" (sell) */
2125
2163
  position: "long" | "short";
2126
2164
  /** Entry price for the position */
@@ -2153,6 +2191,10 @@ interface AverageBuyCommit extends SignalCommitBase {
2153
2191
  effectivePriceOpen: number;
2154
2192
  /** Unrealized PNL at the moment of average-buy (calculated after new entry added) */
2155
2193
  pnl: IStrategyPnL;
2194
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2195
+ peakProfit: IStrategyPnL;
2196
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2197
+ maxDrawdown: IStrategyPnL;
2156
2198
  /** Trade direction: "long" (buy) or "short" (sell) */
2157
2199
  position: "long" | "short";
2158
2200
  /** Original entry price (signal.priceOpen, unchanged by averaging) */
@@ -2180,8 +2222,12 @@ interface ActivateScheduledCommit extends SignalCommitBase {
2180
2222
  activateId?: string;
2181
2223
  /** Current market price at time of activation */
2182
2224
  currentPrice: number;
2183
- /** PNL at the moment of activation (calculated at priceOpen) */
2225
+ /** Total PNL of the closed position (including all entries and partials) */
2184
2226
  pnl: IStrategyPnL;
2227
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
2228
+ peakProfit: IStrategyPnL;
2229
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
2230
+ maxDrawdown: IStrategyPnL;
2185
2231
  /** Trade direction: "long" (buy) or "short" (sell) */
2186
2232
  position: "long" | "short";
2187
2233
  /** Entry price for the position */
@@ -2367,9 +2413,7 @@ interface ISignalRow extends ISignalDto {
2367
2413
  _peak: {
2368
2414
  price: number;
2369
2415
  timestamp: number;
2370
- pnlPercentage: number;
2371
- pnlCost: number;
2372
- };
2416
+ } & IStrategyPnL;
2373
2417
  /**
2374
2418
  * Worst price seen in loss direction during the life of this position.
2375
2419
  * Initialized at position open with priceOpen/pendingAt (pnl = 0).
@@ -2380,9 +2424,7 @@ interface ISignalRow extends ISignalDto {
2380
2424
  _fall: {
2381
2425
  price: number;
2382
2426
  timestamp: number;
2383
- pnlPercentage: number;
2384
- pnlCost: number;
2385
- };
2427
+ } & IStrategyPnL;
2386
2428
  /** Unix timestamp in milliseconds when this signal was created/scheduled in backtest context or when getSignal was called in live context (before validation) */
2387
2429
  timestamp: number;
2388
2430
  }
@@ -2450,6 +2492,16 @@ interface IPublicSignalRow extends ISignalRow {
2450
2492
  * Calculated using toProfitLossDto with the currentPrice at the moment of emission.
2451
2493
  */
2452
2494
  pnl: IStrategyPnL;
2495
+ /**
2496
+ * Peak profit achieved during the life of this position up to the moment this public signal was created.
2497
+ * Calculated using the highest favorable price reached (for long: max price above entry, for short: min price below entry) and the original entry price.
2498
+ */
2499
+ peakProfit: IStrategyPnL;
2500
+ /**
2501
+ * Maximum drawdown experienced during the life of this position up to the moment this public signal was created.
2502
+ * Calculated using the worst unfavorable price reached (for long: min price below entry, for short: max price above entry) and the original entry price.
2503
+ */
2504
+ maxDrawdown: IStrategyPnL;
2453
2505
  }
2454
2506
  /**
2455
2507
  * Base storage signal row fields shared by all status variants.
@@ -9798,8 +9850,12 @@ interface SignalOpenedNotification {
9798
9850
  totalPartials: number;
9799
9851
  /** Cost of the initial position entry in USD (from signal.cost) */
9800
9852
  cost: number;
9801
- /** Unrealized PNL at the moment of signal open (from signal.pnl) */
9853
+ /** Total PNL of the closed position (including all entries and partials) */
9802
9854
  pnl: IStrategyPnL;
9855
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
9856
+ peakProfit: IStrategyPnL;
9857
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
9858
+ maxDrawdown: IStrategyPnL;
9803
9859
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
9804
9860
  pnlPercentage: number;
9805
9861
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -9810,6 +9866,26 @@ interface SignalOpenedNotification {
9810
9866
  pnlCost: number;
9811
9867
  /** Total invested capital in USD */
9812
9868
  pnlEntries: number;
9869
+ /** Peak price reached in profit direction during the life of this position */
9870
+ peakProfitPriceOpen: number;
9871
+ /** Exit price for PNL calculation at the moment of peak profit */
9872
+ peakProfitPriceClose: number;
9873
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
9874
+ peakProfitCost: number;
9875
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
9876
+ peakProfitPercentage: number;
9877
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
9878
+ peakProfitEntries: number;
9879
+ /** Maximum drawdown price reached in loss direction during the life of this position */
9880
+ maxDrawdownPriceOpen: number;
9881
+ /** Exit price for PNL calculation at the moment of max drawdown */
9882
+ maxDrawdownPriceClose: number;
9883
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
9884
+ maxDrawdownCost: number;
9885
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
9886
+ maxDrawdownPercentage: number;
9887
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
9888
+ maxDrawdownEntries: number;
9813
9889
  /** Optional human-readable description of signal reason */
9814
9890
  note?: string;
9815
9891
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -9862,8 +9938,12 @@ interface SignalClosedNotification {
9862
9938
  totalPartials: number;
9863
9939
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
9864
9940
  pnlPercentage: number;
9865
- /** Final PNL at signal close (from data.pnl) */
9941
+ /** Total PNL of the closed position (including all entries and partials) */
9866
9942
  pnl: IStrategyPnL;
9943
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
9944
+ peakProfit: IStrategyPnL;
9945
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
9946
+ maxDrawdown: IStrategyPnL;
9867
9947
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
9868
9948
  pnlPriceOpen: number;
9869
9949
  /** Exit price from PNL calculation (adjusted with slippage and fees) */
@@ -9872,6 +9952,26 @@ interface SignalClosedNotification {
9872
9952
  pnlCost: number;
9873
9953
  /** Total invested capital in USD */
9874
9954
  pnlEntries: number;
9955
+ /** Peak price reached in profit direction during the life of this position */
9956
+ peakProfitPriceOpen: number;
9957
+ /** Exit price for PNL calculation at the moment of peak profit */
9958
+ peakProfitPriceClose: number;
9959
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
9960
+ peakProfitCost: number;
9961
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
9962
+ peakProfitPercentage: number;
9963
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
9964
+ peakProfitEntries: number;
9965
+ /** Maximum drawdown price reached in loss direction during the life of this position */
9966
+ maxDrawdownPriceOpen: number;
9967
+ /** Exit price for PNL calculation at the moment of max drawdown */
9968
+ maxDrawdownPriceClose: number;
9969
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
9970
+ maxDrawdownCost: number;
9971
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
9972
+ maxDrawdownPercentage: number;
9973
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
9974
+ maxDrawdownEntries: number;
9875
9975
  /** Why signal closed (time_expired | take_profit | stop_loss | closed) */
9876
9976
  closeReason: string;
9877
9977
  /** Duration of position in minutes (from pendingAt to closeTimestamp) */
@@ -9928,8 +10028,12 @@ interface PartialProfitAvailableNotification {
9928
10028
  totalEntries: number;
9929
10029
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
9930
10030
  totalPartials: number;
9931
- /** Unrealized PNL at the moment this level was reached (from data.pnl) */
10031
+ /** Total PNL of the closed position (including all entries and partials) */
9932
10032
  pnl: IStrategyPnL;
10033
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10034
+ peakProfit: IStrategyPnL;
10035
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10036
+ maxDrawdown: IStrategyPnL;
9933
10037
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
9934
10038
  pnlPercentage: number;
9935
10039
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -9940,6 +10044,26 @@ interface PartialProfitAvailableNotification {
9940
10044
  pnlCost: number;
9941
10045
  /** Total invested capital in USD */
9942
10046
  pnlEntries: number;
10047
+ /** Peak price reached in profit direction during the life of this position */
10048
+ peakProfitPriceOpen: number;
10049
+ /** Exit price for PNL calculation at the moment of peak profit */
10050
+ peakProfitPriceClose: number;
10051
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10052
+ peakProfitCost: number;
10053
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10054
+ peakProfitPercentage: number;
10055
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10056
+ peakProfitEntries: number;
10057
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10058
+ maxDrawdownPriceOpen: number;
10059
+ /** Exit price for PNL calculation at the moment of max drawdown */
10060
+ maxDrawdownPriceClose: number;
10061
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10062
+ maxDrawdownCost: number;
10063
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10064
+ maxDrawdownPercentage: number;
10065
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10066
+ maxDrawdownEntries: number;
9943
10067
  /** Optional human-readable description of signal reason */
9944
10068
  note?: string;
9945
10069
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -9992,8 +10116,12 @@ interface PartialLossAvailableNotification {
9992
10116
  totalEntries: number;
9993
10117
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
9994
10118
  totalPartials: number;
9995
- /** Unrealized PNL at the moment this level was reached (from data.pnl) */
10119
+ /** Total PNL of the closed position (including all entries and partials) */
9996
10120
  pnl: IStrategyPnL;
10121
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10122
+ peakProfit: IStrategyPnL;
10123
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10124
+ maxDrawdown: IStrategyPnL;
9997
10125
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
9998
10126
  pnlPercentage: number;
9999
10127
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10004,6 +10132,26 @@ interface PartialLossAvailableNotification {
10004
10132
  pnlCost: number;
10005
10133
  /** Total invested capital in USD */
10006
10134
  pnlEntries: number;
10135
+ /** Peak price reached in profit direction during the life of this position */
10136
+ peakProfitPriceOpen: number;
10137
+ /** Exit price for PNL calculation at the moment of peak profit */
10138
+ peakProfitPriceClose: number;
10139
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10140
+ peakProfitCost: number;
10141
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10142
+ peakProfitPercentage: number;
10143
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10144
+ peakProfitEntries: number;
10145
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10146
+ maxDrawdownPriceOpen: number;
10147
+ /** Exit price for PNL calculation at the moment of max drawdown */
10148
+ maxDrawdownPriceClose: number;
10149
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10150
+ maxDrawdownCost: number;
10151
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10152
+ maxDrawdownPercentage: number;
10153
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10154
+ maxDrawdownEntries: number;
10007
10155
  /** Optional human-readable description of signal reason */
10008
10156
  note?: string;
10009
10157
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10054,8 +10202,12 @@ interface BreakevenAvailableNotification {
10054
10202
  totalEntries: number;
10055
10203
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10056
10204
  totalPartials: number;
10057
- /** Unrealized PNL at the moment breakeven became available (from data.pnl) */
10205
+ /** Total PNL of the closed position (including all entries and partials) */
10058
10206
  pnl: IStrategyPnL;
10207
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10208
+ peakProfit: IStrategyPnL;
10209
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10210
+ maxDrawdown: IStrategyPnL;
10059
10211
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10060
10212
  pnlPercentage: number;
10061
10213
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10066,6 +10218,26 @@ interface BreakevenAvailableNotification {
10066
10218
  pnlCost: number;
10067
10219
  /** Total invested capital in USD */
10068
10220
  pnlEntries: number;
10221
+ /** Peak price reached in profit direction during the life of this position */
10222
+ peakProfitPriceOpen: number;
10223
+ /** Exit price for PNL calculation at the moment of peak profit */
10224
+ peakProfitPriceClose: number;
10225
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10226
+ peakProfitCost: number;
10227
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10228
+ peakProfitPercentage: number;
10229
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10230
+ peakProfitEntries: number;
10231
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10232
+ maxDrawdownPriceOpen: number;
10233
+ /** Exit price for PNL calculation at the moment of max drawdown */
10234
+ maxDrawdownPriceClose: number;
10235
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10236
+ maxDrawdownCost: number;
10237
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10238
+ maxDrawdownPercentage: number;
10239
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10240
+ maxDrawdownEntries: number;
10069
10241
  /** Optional human-readable description of signal reason */
10070
10242
  note?: string;
10071
10243
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10118,8 +10290,12 @@ interface PartialProfitCommitNotification {
10118
10290
  totalEntries: number;
10119
10291
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10120
10292
  totalPartials: number;
10121
- /** PNL at the moment of partial profit commit (from data.pnl) */
10293
+ /** Total PNL of the closed position (including all entries and partials) */
10122
10294
  pnl: IStrategyPnL;
10295
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10296
+ peakProfit: IStrategyPnL;
10297
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10298
+ maxDrawdown: IStrategyPnL;
10123
10299
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10124
10300
  pnlPercentage: number;
10125
10301
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10130,6 +10306,26 @@ interface PartialProfitCommitNotification {
10130
10306
  pnlCost: number;
10131
10307
  /** Total invested capital in USD */
10132
10308
  pnlEntries: number;
10309
+ /** Peak price reached in profit direction during the life of this position */
10310
+ peakProfitPriceOpen: number;
10311
+ /** Exit price for PNL calculation at the moment of peak profit */
10312
+ peakProfitPriceClose: number;
10313
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10314
+ peakProfitCost: number;
10315
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10316
+ peakProfitPercentage: number;
10317
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10318
+ peakProfitEntries: number;
10319
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10320
+ maxDrawdownPriceOpen: number;
10321
+ /** Exit price for PNL calculation at the moment of max drawdown */
10322
+ maxDrawdownPriceClose: number;
10323
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10324
+ maxDrawdownCost: number;
10325
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10326
+ maxDrawdownPercentage: number;
10327
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10328
+ maxDrawdownEntries: number;
10133
10329
  /** Optional human-readable description of signal reason */
10134
10330
  note?: string;
10135
10331
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10182,8 +10378,12 @@ interface PartialLossCommitNotification {
10182
10378
  totalEntries: number;
10183
10379
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10184
10380
  totalPartials: number;
10185
- /** PNL at the moment of partial loss commit (from data.pnl) */
10381
+ /** Total PNL of the closed position (including all entries and partials) */
10186
10382
  pnl: IStrategyPnL;
10383
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10384
+ peakProfit: IStrategyPnL;
10385
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10386
+ maxDrawdown: IStrategyPnL;
10187
10387
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10188
10388
  pnlPercentage: number;
10189
10389
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10194,6 +10394,26 @@ interface PartialLossCommitNotification {
10194
10394
  pnlCost: number;
10195
10395
  /** Total invested capital in USD */
10196
10396
  pnlEntries: number;
10397
+ /** Peak price reached in profit direction during the life of this position */
10398
+ peakProfitPriceOpen: number;
10399
+ /** Exit price for PNL calculation at the moment of peak profit */
10400
+ peakProfitPriceClose: number;
10401
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10402
+ peakProfitCost: number;
10403
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10404
+ peakProfitPercentage: number;
10405
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10406
+ peakProfitEntries: number;
10407
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10408
+ maxDrawdownPriceOpen: number;
10409
+ /** Exit price for PNL calculation at the moment of max drawdown */
10410
+ maxDrawdownPriceClose: number;
10411
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10412
+ maxDrawdownCost: number;
10413
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10414
+ maxDrawdownPercentage: number;
10415
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10416
+ maxDrawdownEntries: number;
10197
10417
  /** Optional human-readable description of signal reason */
10198
10418
  note?: string;
10199
10419
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10244,8 +10464,12 @@ interface BreakevenCommitNotification {
10244
10464
  totalEntries: number;
10245
10465
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10246
10466
  totalPartials: number;
10247
- /** PNL at the moment of breakeven commit (from data.pnl) */
10467
+ /** Total PNL of the closed position (including all entries and partials) */
10248
10468
  pnl: IStrategyPnL;
10469
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10470
+ peakProfit: IStrategyPnL;
10471
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10472
+ maxDrawdown: IStrategyPnL;
10249
10473
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10250
10474
  pnlPercentage: number;
10251
10475
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10256,6 +10480,26 @@ interface BreakevenCommitNotification {
10256
10480
  pnlCost: number;
10257
10481
  /** Total invested capital in USD */
10258
10482
  pnlEntries: number;
10483
+ /** Peak price reached in profit direction during the life of this position */
10484
+ peakProfitPriceOpen: number;
10485
+ /** Exit price for PNL calculation at the moment of peak profit */
10486
+ peakProfitPriceClose: number;
10487
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10488
+ peakProfitCost: number;
10489
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10490
+ peakProfitPercentage: number;
10491
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10492
+ peakProfitEntries: number;
10493
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10494
+ maxDrawdownPriceOpen: number;
10495
+ /** Exit price for PNL calculation at the moment of max drawdown */
10496
+ maxDrawdownPriceClose: number;
10497
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10498
+ maxDrawdownCost: number;
10499
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10500
+ maxDrawdownPercentage: number;
10501
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10502
+ maxDrawdownEntries: number;
10259
10503
  /** Optional human-readable description of signal reason */
10260
10504
  note?: string;
10261
10505
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10310,8 +10554,12 @@ interface AverageBuyCommitNotification {
10310
10554
  originalPriceStopLoss: number;
10311
10555
  /** Original entry price at signal creation (unchanged by DCA averaging) */
10312
10556
  originalPriceOpen: number;
10313
- /** PNL at the moment of average-buy commit (from data.pnl) */
10557
+ /** Total PNL of the closed position (including all entries and partials) */
10314
10558
  pnl: IStrategyPnL;
10559
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10560
+ peakProfit: IStrategyPnL;
10561
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10562
+ maxDrawdown: IStrategyPnL;
10315
10563
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10316
10564
  pnlPercentage: number;
10317
10565
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10322,6 +10570,26 @@ interface AverageBuyCommitNotification {
10322
10570
  pnlCost: number;
10323
10571
  /** Total invested capital in USD */
10324
10572
  pnlEntries: number;
10573
+ /** Peak price reached in profit direction during the life of this position */
10574
+ peakProfitPriceOpen: number;
10575
+ /** Exit price for PNL calculation at the moment of peak profit */
10576
+ peakProfitPriceClose: number;
10577
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10578
+ peakProfitCost: number;
10579
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10580
+ peakProfitPercentage: number;
10581
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10582
+ peakProfitEntries: number;
10583
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10584
+ maxDrawdownPriceOpen: number;
10585
+ /** Exit price for PNL calculation at the moment of max drawdown */
10586
+ maxDrawdownPriceClose: number;
10587
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10588
+ maxDrawdownCost: number;
10589
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10590
+ maxDrawdownPercentage: number;
10591
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10592
+ maxDrawdownEntries: number;
10325
10593
  /** Optional human-readable description of signal reason */
10326
10594
  note?: string;
10327
10595
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10372,8 +10640,12 @@ interface ActivateScheduledCommitNotification {
10372
10640
  totalEntries: number;
10373
10641
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10374
10642
  totalPartials: number;
10375
- /** PNL at the moment of activate-scheduled commit (from data.pnl) */
10643
+ /** Total PNL of the closed position (including all entries and partials) */
10376
10644
  pnl: IStrategyPnL;
10645
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10646
+ peakProfit: IStrategyPnL;
10647
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10648
+ maxDrawdown: IStrategyPnL;
10377
10649
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10378
10650
  pnlPercentage: number;
10379
10651
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10384,6 +10656,26 @@ interface ActivateScheduledCommitNotification {
10384
10656
  pnlCost: number;
10385
10657
  /** Total invested capital in USD */
10386
10658
  pnlEntries: number;
10659
+ /** Peak price reached in profit direction during the life of this position */
10660
+ peakProfitPriceOpen: number;
10661
+ /** Exit price for PNL calculation at the moment of peak profit */
10662
+ peakProfitPriceClose: number;
10663
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10664
+ peakProfitCost: number;
10665
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10666
+ peakProfitPercentage: number;
10667
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10668
+ peakProfitEntries: number;
10669
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10670
+ maxDrawdownPriceOpen: number;
10671
+ /** Exit price for PNL calculation at the moment of max drawdown */
10672
+ maxDrawdownPriceClose: number;
10673
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10674
+ maxDrawdownCost: number;
10675
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10676
+ maxDrawdownPercentage: number;
10677
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10678
+ maxDrawdownEntries: number;
10387
10679
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
10388
10680
  scheduledAt: number;
10389
10681
  /** Pending timestamp in milliseconds (when position became pending/active at priceOpen) */
@@ -10438,8 +10730,12 @@ interface TrailingStopCommitNotification {
10438
10730
  totalEntries: number;
10439
10731
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10440
10732
  totalPartials: number;
10441
- /** PNL at the moment of trailing-stop commit (from data.pnl) */
10733
+ /** Total PNL of the closed position (including all entries and partials) */
10442
10734
  pnl: IStrategyPnL;
10735
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10736
+ peakProfit: IStrategyPnL;
10737
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10738
+ maxDrawdown: IStrategyPnL;
10443
10739
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10444
10740
  pnlPercentage: number;
10445
10741
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10450,6 +10746,26 @@ interface TrailingStopCommitNotification {
10450
10746
  pnlCost: number;
10451
10747
  /** Total invested capital in USD */
10452
10748
  pnlEntries: number;
10749
+ /** Peak price reached in profit direction during the life of this position */
10750
+ peakProfitPriceOpen: number;
10751
+ /** Exit price for PNL calculation at the moment of peak profit */
10752
+ peakProfitPriceClose: number;
10753
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10754
+ peakProfitCost: number;
10755
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10756
+ peakProfitPercentage: number;
10757
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10758
+ peakProfitEntries: number;
10759
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10760
+ maxDrawdownPriceOpen: number;
10761
+ /** Exit price for PNL calculation at the moment of max drawdown */
10762
+ maxDrawdownPriceClose: number;
10763
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10764
+ maxDrawdownCost: number;
10765
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10766
+ maxDrawdownPercentage: number;
10767
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10768
+ maxDrawdownEntries: number;
10453
10769
  /** Optional human-readable description of signal reason */
10454
10770
  note?: string;
10455
10771
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10502,8 +10818,12 @@ interface TrailingTakeCommitNotification {
10502
10818
  totalEntries: number;
10503
10819
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10504
10820
  totalPartials: number;
10505
- /** PNL at the moment of trailing-take commit (from data.pnl) */
10821
+ /** Total PNL of the closed position (including all entries and partials) */
10506
10822
  pnl: IStrategyPnL;
10823
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10824
+ peakProfit: IStrategyPnL;
10825
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10826
+ maxDrawdown: IStrategyPnL;
10507
10827
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10508
10828
  pnlPercentage: number;
10509
10829
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10514,6 +10834,26 @@ interface TrailingTakeCommitNotification {
10514
10834
  pnlCost: number;
10515
10835
  /** Total invested capital in USD */
10516
10836
  pnlEntries: number;
10837
+ /** Peak price reached in profit direction during the life of this position */
10838
+ peakProfitPriceOpen: number;
10839
+ /** Exit price for PNL calculation at the moment of peak profit */
10840
+ peakProfitPriceClose: number;
10841
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10842
+ peakProfitCost: number;
10843
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10844
+ peakProfitPercentage: number;
10845
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10846
+ peakProfitEntries: number;
10847
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10848
+ maxDrawdownPriceOpen: number;
10849
+ /** Exit price for PNL calculation at the moment of max drawdown */
10850
+ maxDrawdownPriceClose: number;
10851
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10852
+ maxDrawdownCost: number;
10853
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10854
+ maxDrawdownPercentage: number;
10855
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10856
+ maxDrawdownEntries: number;
10517
10857
  /** Optional human-readable description of signal reason */
10518
10858
  note?: string;
10519
10859
  /** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
@@ -10546,8 +10886,12 @@ interface SignalSyncOpenNotification {
10546
10886
  signalId: string;
10547
10887
  /** Current market price at activation */
10548
10888
  currentPrice: number;
10549
- /** PNL at the moment of opening */
10889
+ /** Total PNL of the closed position (including all entries and partials) */
10550
10890
  pnl: IStrategyPnL;
10891
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10892
+ peakProfit: IStrategyPnL;
10893
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10894
+ maxDrawdown: IStrategyPnL;
10551
10895
  /** Profit/loss as percentage */
10552
10896
  pnlPercentage: number;
10553
10897
  /** Entry price from PNL calculation */
@@ -10558,6 +10902,26 @@ interface SignalSyncOpenNotification {
10558
10902
  pnlCost: number;
10559
10903
  /** Total invested capital in USD */
10560
10904
  pnlEntries: number;
10905
+ /** Peak price reached in profit direction during the life of this position */
10906
+ peakProfitPriceOpen: number;
10907
+ /** Exit price for PNL calculation at the moment of peak profit */
10908
+ peakProfitPriceClose: number;
10909
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10910
+ peakProfitCost: number;
10911
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
10912
+ peakProfitPercentage: number;
10913
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
10914
+ peakProfitEntries: number;
10915
+ /** Maximum drawdown price reached in loss direction during the life of this position */
10916
+ maxDrawdownPriceOpen: number;
10917
+ /** Exit price for PNL calculation at the moment of max drawdown */
10918
+ maxDrawdownPriceClose: number;
10919
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
10920
+ maxDrawdownCost: number;
10921
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
10922
+ maxDrawdownPercentage: number;
10923
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
10924
+ maxDrawdownEntries: number;
10561
10925
  /** Cost of the position entry in USD */
10562
10926
  cost: number;
10563
10927
  /** Trade direction: "long" (buy) or "short" (sell) */
@@ -10610,8 +10974,12 @@ interface SignalSyncCloseNotification {
10610
10974
  signalId: string;
10611
10975
  /** Current market price at close */
10612
10976
  currentPrice: number;
10613
- /** Final PNL at signal close */
10977
+ /** Total PNL of the closed position (including all entries and partials) */
10614
10978
  pnl: IStrategyPnL;
10979
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
10980
+ peakProfit: IStrategyPnL;
10981
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
10982
+ maxDrawdown: IStrategyPnL;
10615
10983
  /** Profit/loss as percentage */
10616
10984
  pnlPercentage: number;
10617
10985
  /** Entry price from PNL calculation */
@@ -10622,6 +10990,26 @@ interface SignalSyncCloseNotification {
10622
10990
  pnlCost: number;
10623
10991
  /** Total invested capital in USD */
10624
10992
  pnlEntries: number;
10993
+ /** Peak price reached in profit direction during the life of this position */
10994
+ peakProfitPriceOpen: number;
10995
+ /** Exit price for PNL calculation at the moment of peak profit */
10996
+ peakProfitPriceClose: number;
10997
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
10998
+ peakProfitCost: number;
10999
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
11000
+ peakProfitPercentage: number;
11001
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
11002
+ peakProfitEntries: number;
11003
+ /** Maximum drawdown price reached in loss direction during the life of this position */
11004
+ maxDrawdownPriceOpen: number;
11005
+ /** Exit price for PNL calculation at the moment of max drawdown */
11006
+ maxDrawdownPriceClose: number;
11007
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
11008
+ maxDrawdownCost: number;
11009
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
11010
+ maxDrawdownPercentage: number;
11011
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
11012
+ maxDrawdownEntries: number;
10625
11013
  /** Trade direction: "long" (buy) or "short" (sell) */
10626
11014
  position: "long" | "short";
10627
11015
  /** Effective entry price at close */
@@ -10736,8 +11124,12 @@ interface SignalScheduledNotification {
10736
11124
  totalPartials: number;
10737
11125
  /** Cost of the initial position entry in USD (from signal.cost) */
10738
11126
  cost: number;
10739
- /** Unrealized PNL at the moment of signal scheduled (from signal.pnl) */
11127
+ /** Total PNL of the closed position (including all entries and partials) */
10740
11128
  pnl: IStrategyPnL;
11129
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11130
+ peakProfit: IStrategyPnL;
11131
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11132
+ maxDrawdown: IStrategyPnL;
10741
11133
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10742
11134
  pnlPercentage: number;
10743
11135
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10748,6 +11140,26 @@ interface SignalScheduledNotification {
10748
11140
  pnlCost: number;
10749
11141
  /** Total invested capital in USD */
10750
11142
  pnlEntries: number;
11143
+ /** Peak price reached in profit direction during the life of this position */
11144
+ peakProfitPriceOpen: number;
11145
+ /** Exit price for PNL calculation at the moment of peak profit */
11146
+ peakProfitPriceClose: number;
11147
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
11148
+ peakProfitCost: number;
11149
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
11150
+ peakProfitPercentage: number;
11151
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
11152
+ peakProfitEntries: number;
11153
+ /** Maximum drawdown price reached in loss direction during the life of this position */
11154
+ maxDrawdownPriceOpen: number;
11155
+ /** Exit price for PNL calculation at the moment of max drawdown */
11156
+ maxDrawdownPriceClose: number;
11157
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
11158
+ maxDrawdownCost: number;
11159
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
11160
+ maxDrawdownPercentage: number;
11161
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
11162
+ maxDrawdownEntries: number;
10751
11163
  /** Unix timestamp in milliseconds when signal was scheduled */
10752
11164
  scheduledAt: number;
10753
11165
  /** Current market price when signal was scheduled */
@@ -10888,8 +11300,12 @@ interface CancelScheduledCommitNotification {
10888
11300
  totalPartials: number;
10889
11301
  /** Original entry price at signal creation (unchanged by DCA averaging) */
10890
11302
  originalPriceOpen: number;
10891
- /** PNL at the moment of cancellation (from data.pnl) */
11303
+ /** Total PNL of the closed position (including all entries and partials) */
10892
11304
  pnl: IStrategyPnL;
11305
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11306
+ peakProfit: IStrategyPnL;
11307
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11308
+ maxDrawdown: IStrategyPnL;
10893
11309
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10894
11310
  pnlPercentage: number;
10895
11311
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10900,6 +11316,26 @@ interface CancelScheduledCommitNotification {
10900
11316
  pnlCost: number;
10901
11317
  /** Total invested capital in USD */
10902
11318
  pnlEntries: number;
11319
+ /** Peak price reached in profit direction during the life of this position */
11320
+ peakProfitPriceOpen: number;
11321
+ /** Exit price for PNL calculation at the moment of peak profit */
11322
+ peakProfitPriceClose: number;
11323
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
11324
+ peakProfitCost: number;
11325
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
11326
+ peakProfitPercentage: number;
11327
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
11328
+ peakProfitEntries: number;
11329
+ /** Maximum drawdown price reached in loss direction during the life of this position */
11330
+ maxDrawdownPriceOpen: number;
11331
+ /** Exit price for PNL calculation at the moment of max drawdown */
11332
+ maxDrawdownPriceClose: number;
11333
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
11334
+ maxDrawdownCost: number;
11335
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
11336
+ maxDrawdownPercentage: number;
11337
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
11338
+ maxDrawdownEntries: number;
10903
11339
  /** Optional human-readable description of signal reason */
10904
11340
  note?: string;
10905
11341
  /** Unix timestamp in milliseconds when the notification was created */
@@ -10934,8 +11370,12 @@ interface ClosePendingCommitNotification {
10934
11370
  totalPartials: number;
10935
11371
  /** Original entry price at signal creation (unchanged by DCA averaging) */
10936
11372
  originalPriceOpen: number;
10937
- /** PNL at the moment of close (from data.pnl) */
11373
+ /** Total PNL of the closed position (including all entries and partials) */
10938
11374
  pnl: IStrategyPnL;
11375
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11376
+ peakProfit: IStrategyPnL;
11377
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11378
+ maxDrawdown: IStrategyPnL;
10939
11379
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10940
11380
  pnlPercentage: number;
10941
11381
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -10946,6 +11386,26 @@ interface ClosePendingCommitNotification {
10946
11386
  pnlCost: number;
10947
11387
  /** Total invested capital in USD */
10948
11388
  pnlEntries: number;
11389
+ /** Peak price reached in profit direction during the life of this position */
11390
+ peakProfitPriceOpen: number;
11391
+ /** Exit price for PNL calculation at the moment of peak profit */
11392
+ peakProfitPriceClose: number;
11393
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
11394
+ peakProfitCost: number;
11395
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
11396
+ peakProfitPercentage: number;
11397
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
11398
+ peakProfitEntries: number;
11399
+ /** Maximum drawdown price reached in loss direction during the life of this position */
11400
+ maxDrawdownPriceOpen: number;
11401
+ /** Exit price for PNL calculation at the moment of max drawdown */
11402
+ maxDrawdownPriceClose: number;
11403
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
11404
+ maxDrawdownCost: number;
11405
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
11406
+ maxDrawdownPercentage: number;
11407
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
11408
+ maxDrawdownEntries: number;
10949
11409
  /** Optional human-readable description of signal reason */
10950
11410
  note?: string;
10951
11411
  /** Unix timestamp in milliseconds when the notification was created */
@@ -10992,8 +11452,12 @@ interface SignalInfoNotification {
10992
11452
  totalEntries: number;
10993
11453
  /** Total number of partial closes executed (_partial.length). 0 = no partial closes done. */
10994
11454
  totalPartials: number;
10995
- /** Unrealized PNL at the moment the info event was emitted (from data.pnl) */
11455
+ /** Total PNL of the closed position (including all entries and partials) */
10996
11456
  pnl: IStrategyPnL;
11457
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11458
+ peakProfit: IStrategyPnL;
11459
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11460
+ maxDrawdown: IStrategyPnL;
10997
11461
  /** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
10998
11462
  pnlPercentage: number;
10999
11463
  /** Entry price from PNL calculation (effective price adjusted with slippage and fees) */
@@ -11004,6 +11468,26 @@ interface SignalInfoNotification {
11004
11468
  pnlCost: number;
11005
11469
  /** Total invested capital in USD */
11006
11470
  pnlEntries: number;
11471
+ /** Peak price reached in profit direction during the life of this position */
11472
+ peakProfitPriceOpen: number;
11473
+ /** Exit price for PNL calculation at the moment of peak profit */
11474
+ peakProfitPriceClose: number;
11475
+ /** Absolute profit/loss in USD at the moment the position reached its peak profit during the life of this position */
11476
+ peakProfitCost: number;
11477
+ /** Profit/loss as percentage at the moment the position reached its peak profit during the life of this position */
11478
+ peakProfitPercentage: number;
11479
+ /** Number of entries executed at the moment the position reached its peak profit during the life of this position */
11480
+ peakProfitEntries: number;
11481
+ /** Maximum drawdown price reached in loss direction during the life of this position */
11482
+ maxDrawdownPriceOpen: number;
11483
+ /** Exit price for PNL calculation at the moment of max drawdown */
11484
+ maxDrawdownPriceClose: number;
11485
+ /** Absolute profit/loss in USD at the moment the position reached its maximum drawdown during the life of this position */
11486
+ maxDrawdownCost: number;
11487
+ /** Profit/loss as percentage at the moment the position reached its maximum drawdown during the life of this position */
11488
+ maxDrawdownPercentage: number;
11489
+ /** Number of entries executed at the moment the position reached its maximum drawdown during the life of this position */
11490
+ maxDrawdownEntries: number;
11007
11491
  /** User-defined informational note provided by the strategy */
11008
11492
  note: string;
11009
11493
  /** Optional user-defined identifier for correlating this notification with external systems */
@@ -11463,8 +11947,12 @@ interface HighestProfitEvent {
11463
11947
  signalId: string;
11464
11948
  /** Position direction */
11465
11949
  position: IPublicSignalRow["position"];
11466
- /** Unrealized PNL at the time the record was set */
11950
+ /** Total PNL of the closed position (including all entries and partials) */
11467
11951
  pnl: IStrategyPnL;
11952
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11953
+ peakProfit: IStrategyPnL;
11954
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11955
+ maxDrawdown: IStrategyPnL;
11468
11956
  /** Record price reached in the profit direction */
11469
11957
  currentPrice: number;
11470
11958
  /** Effective entry price at the time of the update */
@@ -11500,8 +11988,12 @@ interface MaxDrawdownEvent {
11500
11988
  signalId: string;
11501
11989
  /** Position direction */
11502
11990
  position: IPublicSignalRow["position"];
11503
- /** Unrealized PNL at the time the record was set */
11991
+ /** Total PNL of the closed position (including all entries and partials) */
11504
11992
  pnl: IStrategyPnL;
11993
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
11994
+ peakProfit: IStrategyPnL;
11995
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
11996
+ maxDrawdown: IStrategyPnL;
11505
11997
  /** Record price reached in the loss direction */
11506
11998
  currentPrice: number;
11507
11999
  /** Effective entry price at the time of the update */
@@ -11880,7 +12372,7 @@ declare class PersistBase<EntityName extends string = string> implements IPersis
11880
12372
  * @returns Full file path to entity JSON file
11881
12373
  */
11882
12374
  _getFilePath(entityId: EntityId): string;
11883
- [BASE_WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable;
12375
+ [BASE_WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable<() => Promise<void>>;
11884
12376
  waitForInit(initial: boolean): Promise<void>;
11885
12377
  readValue<T extends IEntity = IEntity>(entityId: EntityId): Promise<T>;
11886
12378
  hasValue(entityId: EntityId): Promise<boolean>;
@@ -13183,7 +13675,7 @@ declare class MarkdownFileBase implements TMarkdownBase {
13183
13675
  * Protected by singleshot to ensure one-time execution.
13184
13676
  * Sets up error handler that emits to exitEmitter.
13185
13677
  */
13186
- [WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable;
13678
+ [WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable<() => Promise<void>>;
13187
13679
  /**
13188
13680
  * Timeout-protected write function with backpressure handling.
13189
13681
  * Waits for drain event if write buffer is full.
@@ -13437,7 +13929,7 @@ declare class ReportBase implements TReportBase {
13437
13929
  * Protected by singleshot to ensure one-time execution.
13438
13930
  * Sets up error handler that emits to exitEmitter.
13439
13931
  */
13440
- [WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable;
13932
+ [WAIT_FOR_INIT_SYMBOL]: (() => Promise<void>) & functools_kit.ISingleshotClearable<() => Promise<void>>;
13441
13933
  /**
13442
13934
  * Timeout-protected write function with backpressure handling.
13443
13935
  * Waits for drain event if write buffer is full.
@@ -14104,7 +14596,7 @@ declare class BacktestMarkdownService {
14104
14596
  * unsubscribe();
14105
14597
  * ```
14106
14598
  */
14107
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
14599
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
14108
14600
  /**
14109
14601
  * Unsubscribes from backtest signal emitter to stop receiving tick events.
14110
14602
  * Calls the unsubscribe function returned by subscribe().
@@ -15512,7 +16004,7 @@ declare class LiveMarkdownService {
15512
16004
  * unsubscribe();
15513
16005
  * ```
15514
16006
  */
15515
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
16007
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
15516
16008
  /**
15517
16009
  * Unsubscribes from live signal emitter to stop receiving tick events.
15518
16010
  * Calls the unsubscribe function returned by subscribe().
@@ -16956,7 +17448,7 @@ declare class ScheduleMarkdownService {
16956
17448
  * unsubscribe();
16957
17449
  * ```
16958
17450
  */
16959
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
17451
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
16960
17452
  /**
16961
17453
  * Unsubscribes from signal emitter to stop receiving scheduled signal events.
16962
17454
  * Calls the unsubscribe function returned by subscribe().
@@ -17256,7 +17748,7 @@ declare class PerformanceMarkdownService {
17256
17748
  * unsubscribe();
17257
17749
  * ```
17258
17750
  */
17259
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
17751
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
17260
17752
  /**
17261
17753
  * Unsubscribes from performance emitter to stop receiving events.
17262
17754
  * Calls the unsubscribe function returned by subscribe().
@@ -17572,7 +18064,7 @@ declare class WalkerMarkdownService {
17572
18064
  * unsubscribe();
17573
18065
  * ```
17574
18066
  */
17575
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
18067
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
17576
18068
  /**
17577
18069
  * Unsubscribes from walker emitter to stop receiving events.
17578
18070
  * Calls the unsubscribe function returned by subscribe().
@@ -17947,7 +18439,7 @@ declare class HeatMarkdownService {
17947
18439
  * unsubscribe();
17948
18440
  * ```
17949
18441
  */
17950
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
18442
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
17951
18443
  /**
17952
18444
  * Unsubscribes from signal emitter to stop receiving tick events.
17953
18445
  * Calls the unsubscribe function returned by subscribe().
@@ -18469,7 +18961,7 @@ declare class PartialMarkdownService {
18469
18961
  * unsubscribe();
18470
18962
  * ```
18471
18963
  */
18472
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
18964
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
18473
18965
  /**
18474
18966
  * Unsubscribes from partial profit/loss signal emitters to stop receiving events.
18475
18967
  * Calls the unsubscribe function returned by subscribe().
@@ -18797,7 +19289,7 @@ declare class HighestProfitMarkdownService {
18797
19289
  * unsubscribe();
18798
19290
  * ```
18799
19291
  */
18800
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
19292
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
18801
19293
  /**
18802
19294
  * Detaches from `highestProfitSubject` and clears all accumulated data.
18803
19295
  *
@@ -18994,7 +19486,7 @@ declare class MaxDrawdownMarkdownService {
18994
19486
  * @returns Unsubscribe function; calling it tears down the subscription and
18995
19487
  * clears all accumulated data
18996
19488
  */
18997
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
19489
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
18998
19490
  /**
18999
19491
  * Detaches from `maxDrawdownSubject` and clears all accumulated data.
19000
19492
  *
@@ -19831,7 +20323,7 @@ declare class RiskMarkdownService {
19831
20323
  * unsubscribe();
19832
20324
  * ```
19833
20325
  */
19834
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
20326
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
19835
20327
  /**
19836
20328
  * Unsubscribes from risk rejection emitter to stop receiving events.
19837
20329
  * Calls the unsubscribe function returned by subscribe().
@@ -20162,8 +20654,12 @@ interface SyncEvent {
20162
20654
  totalEntries: number;
20163
20655
  /** Total number of partial closes executed */
20164
20656
  totalPartials: number;
20165
- /** PNL at the moment of this event */
20657
+ /** Total PNL of the closed position (including all entries and partials) */
20166
20658
  pnl: IStrategyPnL;
20659
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
20660
+ peakProfit: IStrategyPnL;
20661
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
20662
+ maxDrawdown: IStrategyPnL;
20167
20663
  /** Why the signal was closed (signal-close only) */
20168
20664
  closeReason?: StrategyCloseReason;
20169
20665
  /** Whether this event is from backtest mode */
@@ -20244,7 +20740,7 @@ declare class SyncMarkdownService {
20244
20740
  * unsubscribe();
20245
20741
  * ```
20246
20742
  */
20247
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
20743
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
20248
20744
  /**
20249
20745
  * Detaches from `syncSubject` and clears all accumulated data.
20250
20746
  *
@@ -20725,7 +21221,7 @@ declare class StorageAdapter {
20725
21221
  *
20726
21222
  * @returns Cleanup function that unsubscribes from all emitters
20727
21223
  */
20728
- enable: (() => () => void) & functools_kit.ISingleshotClearable;
21224
+ enable: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
20729
21225
  /**
20730
21226
  * Disables signal storage by unsubscribing from all emitters.
20731
21227
  * Safe to call multiple times.
@@ -20946,7 +21442,7 @@ declare class RecentAdapter {
20946
21442
  *
20947
21443
  * @returns Cleanup function that unsubscribes from all emitters
20948
21444
  */
20949
- enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable;
21445
+ enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable<() => (...args: any[]) => any>;
20950
21446
  /**
20951
21447
  * Disables recent signal storage by unsubscribing from all emitters.
20952
21448
  * Safe to call multiple times.
@@ -21399,7 +21895,7 @@ declare class NotificationAdapter {
21399
21895
  *
21400
21896
  * @returns Cleanup function that unsubscribes from all emitters
21401
21897
  */
21402
- enable: (({ signal, info, partial_profit, partial_loss, breakeven, strategy_commit, signal_sync, risk, common_error, critical_error, validation_error, }?: INotificationTarget) => () => void) & functools_kit.ISingleshotClearable;
21898
+ enable: (({ signal, info, partial_profit, partial_loss, breakeven, strategy_commit, signal_sync, risk, common_error, critical_error, validation_error, }?: INotificationTarget) => () => void) & functools_kit.ISingleshotClearable<({ signal, info, partial_profit, partial_loss, breakeven, strategy_commit, signal_sync, risk, common_error, critical_error, validation_error, }?: INotificationTarget) => () => void>;
21403
21899
  /**
21404
21900
  * Disables notification storage by unsubscribing from all emitters.
21405
21901
  * Safe to call multiple times.
@@ -21545,7 +22041,7 @@ declare class MemoryAdapter implements TMemoryInstance {
21545
22041
  * Idempotent — subsequent calls return the same subscription handle.
21546
22042
  * Must be called before any memory method is used.
21547
22043
  */
21548
- enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable;
22044
+ enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable<() => (...args: any[]) => any>;
21549
22045
  /**
21550
22046
  * Deactivates the adapter by unsubscribing from signal lifecycle events.
21551
22047
  * No-op if enable() was never called.
@@ -21745,7 +22241,7 @@ declare class DumpAdapter {
21745
22241
  * Idempotent — subsequent calls return the same subscription handle.
21746
22242
  * Must be called before any dump method is used.
21747
22243
  */
21748
- enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable;
22244
+ enable: (() => (...args: any[]) => any) & functools_kit.ISingleshotClearable<() => (...args: any[]) => any>;
21749
22245
  /**
21750
22246
  * Deactivates the adapter by unsubscribing from signal lifecycle events.
21751
22247
  * No-op if enable() was never called.
@@ -22395,7 +22891,7 @@ declare class BreakevenMarkdownService {
22395
22891
  * unsubscribe();
22396
22892
  * ```
22397
22893
  */
22398
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
22894
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
22399
22895
  /**
22400
22896
  * Unsubscribes from breakeven signal emitter to stop receiving events.
22401
22897
  * Calls the unsubscribe function returned by subscribe().
@@ -23019,7 +23515,7 @@ declare class StrategyMarkdownService {
23019
23515
  *
23020
23516
  * @returns Cleanup function that clears the subscription and all accumulated data
23021
23517
  */
23022
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
23518
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
23023
23519
  /**
23024
23520
  * Stops event collection and clears all accumulated data.
23025
23521
  *
@@ -23643,6 +24139,12 @@ type BrokerSignalOpenPayload = {
23643
24139
  priceTakeProfit: number;
23644
24140
  /** Original stop-loss price from the signal */
23645
24141
  priceStopLoss: number;
24142
+ /** Market price at the moment of activation (VWAP or candle average) */
24143
+ pnl: IStrategyPnL;
24144
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
24145
+ peakProfit: IStrategyPnL;
24146
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
24147
+ maxDrawdown: IStrategyPnL;
23646
24148
  /** Strategy/exchange/frame routing context */
23647
24149
  context: {
23648
24150
  strategyName: StrategyName;
@@ -23684,6 +24186,8 @@ type BrokerSignalClosePayload = {
23684
24186
  position: "long" | "short";
23685
24187
  /** Market price at the moment of close */
23686
24188
  currentPrice: number;
24189
+ /** Effective entry price at time of close (may differ from priceOpen after DCA averaging) */
24190
+ priceOpen: number;
23687
24191
  /** Original take-profit price from the signal */
23688
24192
  priceTakeProfit: number;
23689
24193
  /** Original stop-loss price from the signal */
@@ -23694,6 +24198,10 @@ type BrokerSignalClosePayload = {
23694
24198
  totalPartials: number;
23695
24199
  /** Realized PnL breakdown for the closed position */
23696
24200
  pnl: IStrategyPnL;
24201
+ /** Peak profit achieved during the life of this position up to the moment this public signal was created */
24202
+ peakProfit: IStrategyPnL;
24203
+ /** Maximum drawdown experienced during the life of this position up to the moment this public signal was created */
24204
+ maxDrawdown: IStrategyPnL;
23697
24205
  /** Strategy/exchange/frame routing context */
23698
24206
  context: {
23699
24207
  strategyName: StrategyName;
@@ -24281,7 +24789,7 @@ declare class BrokerAdapter {
24281
24789
  * dispose(); // or Broker.disable()
24282
24790
  * ```
24283
24791
  */
24284
- enable: (() => () => void) & functools_kit.ISingleshotClearable;
24792
+ enable: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
24285
24793
  /**
24286
24794
  * Deactivates the broker: unsubscribes from syncSubject and resets the singleshot guard.
24287
24795
  *
@@ -27659,7 +28167,7 @@ declare class ClientFrame implements IFrame {
27659
28167
  * @returns Promise resolving to array of Date objects
27660
28168
  * @throws Error if interval is invalid
27661
28169
  */
27662
- getTimeframe: ((symbol: string) => Promise<Date[]>) & functools_kit.ISingleshotClearable;
28170
+ getTimeframe: ((symbol: string) => Promise<Date[]>) & functools_kit.ISingleshotClearable<(symbol: string) => Promise<Date[]>>;
27663
28171
  }
27664
28172
 
27665
28173
  /**
@@ -28082,7 +28590,7 @@ declare class ClientAction implements IAction {
28082
28590
  * Initializes handler instance using singleshot pattern.
28083
28591
  * Ensures initialization happens exactly once.
28084
28592
  */
28085
- waitForInit: (() => Promise<void>) & functools_kit.ISingleshotClearable;
28593
+ waitForInit: (() => Promise<void>) & functools_kit.ISingleshotClearable<() => Promise<void>>;
28086
28594
  /**
28087
28595
  * Handles signal events from all modes (live + backtest).
28088
28596
  */
@@ -28132,7 +28640,7 @@ declare class ClientAction implements IAction {
28132
28640
  * Cleans up resources and subscriptions when action handler is no longer needed.
28133
28641
  * Uses singleshot pattern to ensure cleanup happens exactly once.
28134
28642
  */
28135
- dispose: (() => Promise<void>) & functools_kit.ISingleshotClearable;
28643
+ dispose: (() => Promise<void>) & functools_kit.ISingleshotClearable<() => Promise<void>>;
28136
28644
  }
28137
28645
 
28138
28646
  /**
@@ -31338,7 +31846,7 @@ declare class BacktestReportService {
31338
31846
  * unsubscribe();
31339
31847
  * ```
31340
31848
  */
31341
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
31849
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31342
31850
  /**
31343
31851
  * Unsubscribes from backtest signal emitter to stop receiving tick events.
31344
31852
  * Calls the unsubscribe function returned by subscribe().
@@ -31410,7 +31918,7 @@ declare class LiveReportService {
31410
31918
  * unsubscribe();
31411
31919
  * ```
31412
31920
  */
31413
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
31921
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31414
31922
  /**
31415
31923
  * Unsubscribes from live signal emitter to stop receiving tick events.
31416
31924
  * Calls the unsubscribe function returned by subscribe().
@@ -31483,7 +31991,7 @@ declare class ScheduleReportService {
31483
31991
  * unsubscribe();
31484
31992
  * ```
31485
31993
  */
31486
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
31994
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31487
31995
  /**
31488
31996
  * Unsubscribes from signal emitter to stop receiving events.
31489
31997
  * Calls the unsubscribe function returned by subscribe().
@@ -31554,7 +32062,7 @@ declare class PerformanceReportService {
31554
32062
  * unsubscribe();
31555
32063
  * ```
31556
32064
  */
31557
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32065
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31558
32066
  /**
31559
32067
  * Unsubscribes from performance emitter to stop receiving events.
31560
32068
  * Calls the unsubscribe function returned by subscribe().
@@ -31626,7 +32134,7 @@ declare class WalkerReportService {
31626
32134
  * unsubscribe();
31627
32135
  * ```
31628
32136
  */
31629
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32137
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31630
32138
  /**
31631
32139
  * Unsubscribes from walker emitter to stop receiving events.
31632
32140
  * Calls the unsubscribe function returned by subscribe().
@@ -31698,7 +32206,7 @@ declare class HeatReportService {
31698
32206
  * unsubscribe();
31699
32207
  * ```
31700
32208
  */
31701
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32209
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31702
32210
  /**
31703
32211
  * Unsubscribes from signal emitter to stop receiving events.
31704
32212
  * Calls the unsubscribe function returned by subscribe().
@@ -31778,7 +32286,7 @@ declare class PartialReportService {
31778
32286
  * unsubscribe();
31779
32287
  * ```
31780
32288
  */
31781
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32289
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31782
32290
  /**
31783
32291
  * Unsubscribes from partial profit/loss emitters to stop receiving events.
31784
32292
  * Calls the unsubscribe function returned by subscribe().
@@ -31849,7 +32357,7 @@ declare class BreakevenReportService {
31849
32357
  * unsubscribe();
31850
32358
  * ```
31851
32359
  */
31852
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32360
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31853
32361
  /**
31854
32362
  * Unsubscribes from breakeven signal emitter to stop receiving events.
31855
32363
  * Calls the unsubscribe function returned by subscribe().
@@ -31920,7 +32428,7 @@ declare class RiskReportService {
31920
32428
  * unsubscribe();
31921
32429
  * ```
31922
32430
  */
31923
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32431
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
31924
32432
  /**
31925
32433
  * Unsubscribes from risk rejection emitter to stop receiving events.
31926
32434
  * Calls the unsubscribe function returned by subscribe().
@@ -31979,7 +32487,7 @@ declare class StrategyReportService {
31979
32487
  strategyName: StrategyName;
31980
32488
  exchangeName: ExchangeName;
31981
32489
  frameName: FrameName;
31982
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, cancelId?: string, note?: string) => Promise<void>;
32490
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, cancelId?: string, note?: string) => Promise<void>;
31983
32491
  /**
31984
32492
  * Logs a close-pending event when a pending signal is closed.
31985
32493
  */
@@ -31987,7 +32495,7 @@ declare class StrategyReportService {
31987
32495
  strategyName: StrategyName;
31988
32496
  exchangeName: ExchangeName;
31989
32497
  frameName: FrameName;
31990
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, closeId?: string, note?: string) => Promise<void>;
32498
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, closeId?: string, note?: string) => Promise<void>;
31991
32499
  /**
31992
32500
  * Logs a partial-profit event when a portion of the position is closed at profit.
31993
32501
  */
@@ -31995,7 +32503,7 @@ declare class StrategyReportService {
31995
32503
  strategyName: StrategyName;
31996
32504
  exchangeName: ExchangeName;
31997
32505
  frameName: FrameName;
31998
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32506
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
31999
32507
  /**
32000
32508
  * Logs a partial-loss event when a portion of the position is closed at loss.
32001
32509
  */
@@ -32003,7 +32511,7 @@ declare class StrategyReportService {
32003
32511
  strategyName: StrategyName;
32004
32512
  exchangeName: ExchangeName;
32005
32513
  frameName: FrameName;
32006
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32514
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32007
32515
  /**
32008
32516
  * Logs a trailing-stop event when the stop-loss is adjusted.
32009
32517
  */
@@ -32011,7 +32519,7 @@ declare class StrategyReportService {
32011
32519
  strategyName: StrategyName;
32012
32520
  exchangeName: ExchangeName;
32013
32521
  frameName: FrameName;
32014
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32522
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32015
32523
  /**
32016
32524
  * Logs a trailing-take event when the take-profit is adjusted.
32017
32525
  */
@@ -32019,7 +32527,7 @@ declare class StrategyReportService {
32019
32527
  strategyName: StrategyName;
32020
32528
  exchangeName: ExchangeName;
32021
32529
  frameName: FrameName;
32022
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32530
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32023
32531
  /**
32024
32532
  * Logs a breakeven event when the stop-loss is moved to entry price.
32025
32533
  */
@@ -32027,7 +32535,7 @@ declare class StrategyReportService {
32027
32535
  strategyName: StrategyName;
32028
32536
  exchangeName: ExchangeName;
32029
32537
  frameName: FrameName;
32030
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32538
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number) => Promise<void>;
32031
32539
  /**
32032
32540
  * Logs an activate-scheduled event when a scheduled signal is activated early.
32033
32541
  */
@@ -32035,7 +32543,7 @@ declare class StrategyReportService {
32035
32543
  strategyName: StrategyName;
32036
32544
  exchangeName: ExchangeName;
32037
32545
  frameName: FrameName;
32038
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number, activateId?: string, note?: string) => Promise<void>;
32546
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, totalEntries: number, originalPriceOpen: number, activateId?: string, note?: string) => Promise<void>;
32039
32547
  /**
32040
32548
  * Logs an average-buy (DCA) event when a new averaging entry is added to an open position.
32041
32549
  */
@@ -32043,7 +32551,7 @@ declare class StrategyReportService {
32043
32551
  strategyName: StrategyName;
32044
32552
  exchangeName: ExchangeName;
32045
32553
  frameName: FrameName;
32046
- }, timestamp: number, signalId: string, pnl: IStrategyPnL, totalPartials: number, cost: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, originalPriceOpen: number) => Promise<void>;
32554
+ }, timestamp: number, signalId: string, pnl: IStrategyPnL, peakProfit: IStrategyPnL, maxDrawdown: IStrategyPnL, totalPartials: number, cost: number, position: "long" | "short", priceOpen: number, priceTakeProfit: number, priceStopLoss: number, originalPriceTakeProfit: number, originalPriceStopLoss: number, scheduledAt: number, pendingAt: number, originalPriceOpen: number) => Promise<void>;
32047
32555
  /**
32048
32556
  * Initializes the service for event logging.
32049
32557
  *
@@ -32052,7 +32560,7 @@ declare class StrategyReportService {
32052
32560
  *
32053
32561
  * @returns Cleanup function that clears the subscription when called
32054
32562
  */
32055
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32563
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
32056
32564
  /**
32057
32565
  * Stops event logging and cleans up the subscription.
32058
32566
  *
@@ -32118,7 +32626,7 @@ declare class SyncReportService {
32118
32626
  * unsubscribe();
32119
32627
  * ```
32120
32628
  */
32121
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32629
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
32122
32630
  /**
32123
32631
  * Unsubscribes from syncSubject to stop receiving sync events.
32124
32632
  * Calls the unsubscribe function returned by subscribe().
@@ -32179,7 +32687,7 @@ declare class HighestProfitReportService {
32179
32687
  * unsubscribe();
32180
32688
  * ```
32181
32689
  */
32182
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32690
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
32183
32691
  /**
32184
32692
  * Detaches from `highestProfitSubject`, stopping further JSONL writes.
32185
32693
  *
@@ -32233,7 +32741,7 @@ declare class MaxDrawdownReportService {
32233
32741
  *
32234
32742
  * @returns Unsubscribe function; calling it tears down the subscription
32235
32743
  */
32236
- subscribe: (() => () => void) & functools_kit.ISingleshotClearable;
32744
+ subscribe: (() => () => void) & functools_kit.ISingleshotClearable<() => () => void>;
32237
32745
  /**
32238
32746
  * Detaches from `maxDrawdownSubject`, stopping further JSONL writes.
32239
32747
  *
@@ -32436,4 +32944,4 @@ declare const getTotalClosed: (signal: Signal) => {
32436
32944
  remainingCostBasis: number;
32437
32945
  };
32438
32946
 
32439
- 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 IdlePingContract, 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, 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, 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, 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, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
32947
+ 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 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 IdlePingContract, 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, 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, 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, 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, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };