backtest-kit 1.5.5 → 1.5.6
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 +4 -6
- package/build/index.mjs +4 -6
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -3179,17 +3179,15 @@ class ClientStrategy {
|
|
|
3179
3179
|
backtest,
|
|
3180
3180
|
});
|
|
3181
3181
|
this._isStopped = true;
|
|
3182
|
-
if
|
|
3182
|
+
// Clear scheduled signal if exists
|
|
3183
|
+
if (!this._scheduledSignal) {
|
|
3183
3184
|
return;
|
|
3184
3185
|
}
|
|
3185
|
-
this.
|
|
3186
|
-
if (this.params.callbacks?.onWrite) {
|
|
3187
|
-
this.params.callbacks.onWrite(symbol, this._pendingSignal, backtest);
|
|
3188
|
-
}
|
|
3186
|
+
this._scheduledSignal = null;
|
|
3189
3187
|
if (backtest) {
|
|
3190
3188
|
return;
|
|
3191
3189
|
}
|
|
3192
|
-
await PersistScheduleAdapter.writeScheduleData(this.
|
|
3190
|
+
await PersistScheduleAdapter.writeScheduleData(this._scheduledSignal, symbol, strategyName);
|
|
3193
3191
|
}
|
|
3194
3192
|
}
|
|
3195
3193
|
|
package/build/index.mjs
CHANGED
|
@@ -3177,17 +3177,15 @@ class ClientStrategy {
|
|
|
3177
3177
|
backtest,
|
|
3178
3178
|
});
|
|
3179
3179
|
this._isStopped = true;
|
|
3180
|
-
if
|
|
3180
|
+
// Clear scheduled signal if exists
|
|
3181
|
+
if (!this._scheduledSignal) {
|
|
3181
3182
|
return;
|
|
3182
3183
|
}
|
|
3183
|
-
this.
|
|
3184
|
-
if (this.params.callbacks?.onWrite) {
|
|
3185
|
-
this.params.callbacks.onWrite(symbol, this._pendingSignal, backtest);
|
|
3186
|
-
}
|
|
3184
|
+
this._scheduledSignal = null;
|
|
3187
3185
|
if (backtest) {
|
|
3188
3186
|
return;
|
|
3189
3187
|
}
|
|
3190
|
-
await PersistScheduleAdapter.writeScheduleData(this.
|
|
3188
|
+
await PersistScheduleAdapter.writeScheduleData(this._scheduledSignal, symbol, strategyName);
|
|
3191
3189
|
}
|
|
3192
3190
|
}
|
|
3193
3191
|
|