backtest-kit 2.2.21 → 2.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +16 -0
- package/build/index.mjs +16 -0
- package/package.json +1 -1
- package/types.d.ts +32 -0
package/build/index.cjs
CHANGED
|
@@ -33861,6 +33861,8 @@ class NotificationInstance {
|
|
|
33861
33861
|
priceOpen: data.signal.priceOpen,
|
|
33862
33862
|
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33863
33863
|
priceStopLoss: data.signal.priceStopLoss,
|
|
33864
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33865
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33864
33866
|
note: data.signal.note,
|
|
33865
33867
|
scheduledAt: data.signal.scheduledAt,
|
|
33866
33868
|
pendingAt: data.signal.pendingAt,
|
|
@@ -33882,6 +33884,10 @@ class NotificationInstance {
|
|
|
33882
33884
|
position: data.signal.position,
|
|
33883
33885
|
priceOpen: data.signal.priceOpen,
|
|
33884
33886
|
priceClose: data.currentPrice,
|
|
33887
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33888
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33889
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33890
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33885
33891
|
pnlPercentage: data.pnl.pnlPercentage,
|
|
33886
33892
|
closeReason: data.closeReason,
|
|
33887
33893
|
duration: durationMin,
|
|
@@ -33903,6 +33909,10 @@ class NotificationInstance {
|
|
|
33903
33909
|
signalId: data.signal.id,
|
|
33904
33910
|
position: data.signal.position,
|
|
33905
33911
|
priceOpen: data.signal.priceOpen,
|
|
33912
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33913
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33914
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33915
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33906
33916
|
scheduledAt: data.signal.scheduledAt,
|
|
33907
33917
|
currentPrice: data.currentPrice,
|
|
33908
33918
|
createdAt: data.createdAt,
|
|
@@ -33921,9 +33931,15 @@ class NotificationInstance {
|
|
|
33921
33931
|
exchangeName: data.exchangeName,
|
|
33922
33932
|
signalId: data.signal.id,
|
|
33923
33933
|
position: data.signal.position,
|
|
33934
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33935
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33936
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33937
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33924
33938
|
cancelReason: data.reason,
|
|
33925
33939
|
cancelId: data.cancelId,
|
|
33926
33940
|
duration: durationMin,
|
|
33941
|
+
scheduledAt: data.signal.scheduledAt,
|
|
33942
|
+
pendingAt: data.signal.pendingAt,
|
|
33927
33943
|
createdAt: data.createdAt,
|
|
33928
33944
|
});
|
|
33929
33945
|
}
|
package/build/index.mjs
CHANGED
|
@@ -33841,6 +33841,8 @@ class NotificationInstance {
|
|
|
33841
33841
|
priceOpen: data.signal.priceOpen,
|
|
33842
33842
|
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33843
33843
|
priceStopLoss: data.signal.priceStopLoss,
|
|
33844
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33845
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33844
33846
|
note: data.signal.note,
|
|
33845
33847
|
scheduledAt: data.signal.scheduledAt,
|
|
33846
33848
|
pendingAt: data.signal.pendingAt,
|
|
@@ -33862,6 +33864,10 @@ class NotificationInstance {
|
|
|
33862
33864
|
position: data.signal.position,
|
|
33863
33865
|
priceOpen: data.signal.priceOpen,
|
|
33864
33866
|
priceClose: data.currentPrice,
|
|
33867
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33868
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33869
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33870
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33865
33871
|
pnlPercentage: data.pnl.pnlPercentage,
|
|
33866
33872
|
closeReason: data.closeReason,
|
|
33867
33873
|
duration: durationMin,
|
|
@@ -33883,6 +33889,10 @@ class NotificationInstance {
|
|
|
33883
33889
|
signalId: data.signal.id,
|
|
33884
33890
|
position: data.signal.position,
|
|
33885
33891
|
priceOpen: data.signal.priceOpen,
|
|
33892
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33893
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33894
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33895
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33886
33896
|
scheduledAt: data.signal.scheduledAt,
|
|
33887
33897
|
currentPrice: data.currentPrice,
|
|
33888
33898
|
createdAt: data.createdAt,
|
|
@@ -33901,9 +33911,15 @@ class NotificationInstance {
|
|
|
33901
33911
|
exchangeName: data.exchangeName,
|
|
33902
33912
|
signalId: data.signal.id,
|
|
33903
33913
|
position: data.signal.position,
|
|
33914
|
+
priceTakeProfit: data.signal.priceTakeProfit,
|
|
33915
|
+
priceStopLoss: data.signal.priceStopLoss,
|
|
33916
|
+
originalPriceTakeProfit: data.signal.originalPriceTakeProfit,
|
|
33917
|
+
originalPriceStopLoss: data.signal.originalPriceStopLoss,
|
|
33904
33918
|
cancelReason: data.reason,
|
|
33905
33919
|
cancelId: data.cancelId,
|
|
33906
33920
|
duration: durationMin,
|
|
33921
|
+
scheduledAt: data.signal.scheduledAt,
|
|
33922
|
+
pendingAt: data.signal.pendingAt,
|
|
33907
33923
|
createdAt: data.createdAt,
|
|
33908
33924
|
});
|
|
33909
33925
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -6632,6 +6632,10 @@ interface SignalOpenedNotification {
|
|
|
6632
6632
|
priceTakeProfit: number;
|
|
6633
6633
|
/** Stop loss exit price */
|
|
6634
6634
|
priceStopLoss: number;
|
|
6635
|
+
/** Original take profit price before any trailing adjustments */
|
|
6636
|
+
originalPriceTakeProfit: number;
|
|
6637
|
+
/** Original stop loss price before any trailing adjustments */
|
|
6638
|
+
originalPriceStopLoss: number;
|
|
6635
6639
|
/** Optional human-readable description of signal reason */
|
|
6636
6640
|
note?: string;
|
|
6637
6641
|
/** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
|
|
@@ -6668,6 +6672,14 @@ interface SignalClosedNotification {
|
|
|
6668
6672
|
priceOpen: number;
|
|
6669
6673
|
/** Exit price when position was closed */
|
|
6670
6674
|
priceClose: number;
|
|
6675
|
+
/** Take profit target price */
|
|
6676
|
+
priceTakeProfit: number;
|
|
6677
|
+
/** Stop loss exit price */
|
|
6678
|
+
priceStopLoss: number;
|
|
6679
|
+
/** Original take profit price before any trailing adjustments */
|
|
6680
|
+
originalPriceTakeProfit: number;
|
|
6681
|
+
/** Original stop loss price before any trailing adjustments */
|
|
6682
|
+
originalPriceStopLoss: number;
|
|
6671
6683
|
/** Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%) */
|
|
6672
6684
|
pnlPercentage: number;
|
|
6673
6685
|
/** Why signal closed (time_expired | take_profit | stop_loss | closed) */
|
|
@@ -7090,6 +7102,14 @@ interface SignalScheduledNotification {
|
|
|
7090
7102
|
position: "long" | "short";
|
|
7091
7103
|
/** Target entry price for activation */
|
|
7092
7104
|
priceOpen: number;
|
|
7105
|
+
/** Take profit target price */
|
|
7106
|
+
priceTakeProfit: number;
|
|
7107
|
+
/** Stop loss exit price */
|
|
7108
|
+
priceStopLoss: number;
|
|
7109
|
+
/** Original take profit price before any trailing adjustments */
|
|
7110
|
+
originalPriceTakeProfit: number;
|
|
7111
|
+
/** Original stop loss price before any trailing adjustments */
|
|
7112
|
+
originalPriceStopLoss: number;
|
|
7093
7113
|
/** Unix timestamp in milliseconds when signal was scheduled */
|
|
7094
7114
|
scheduledAt: number;
|
|
7095
7115
|
/** Current market price when signal was scheduled */
|
|
@@ -7120,12 +7140,24 @@ interface SignalCancelledNotification {
|
|
|
7120
7140
|
signalId: string;
|
|
7121
7141
|
/** Trade direction: "long" (buy) or "short" (sell) */
|
|
7122
7142
|
position: "long" | "short";
|
|
7143
|
+
/** Take profit target price */
|
|
7144
|
+
priceTakeProfit: number;
|
|
7145
|
+
/** Stop loss exit price */
|
|
7146
|
+
priceStopLoss: number;
|
|
7147
|
+
/** Original take profit price before any trailing adjustments */
|
|
7148
|
+
originalPriceTakeProfit: number;
|
|
7149
|
+
/** Original stop loss price before any trailing adjustments */
|
|
7150
|
+
originalPriceStopLoss: number;
|
|
7123
7151
|
/** Why signal was cancelled (timeout | price_reject | user) */
|
|
7124
7152
|
cancelReason: string;
|
|
7125
7153
|
/** Optional cancellation identifier (provided when user calls cancel()) */
|
|
7126
7154
|
cancelId: string;
|
|
7127
7155
|
/** Duration in minutes from scheduledAt to cancellation */
|
|
7128
7156
|
duration: number;
|
|
7157
|
+
/** Signal creation timestamp in milliseconds (when signal was first created/scheduled) */
|
|
7158
|
+
scheduledAt: number;
|
|
7159
|
+
/** Pending timestamp in milliseconds (when position became pending/active at priceOpen) */
|
|
7160
|
+
pendingAt: number;
|
|
7129
7161
|
/** Unix timestamp in milliseconds when the tick result was created (from candle timestamp in backtest or execution context when in live) */
|
|
7130
7162
|
createdAt: number;
|
|
7131
7163
|
}
|