backtest-kit 2.2.9 → 2.2.10
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 +2 -0
- package/build/index.mjs +2 -0
- package/package.json +1 -1
- package/types.d.ts +7 -7
package/build/index.cjs
CHANGED
|
@@ -12107,6 +12107,7 @@ class BacktestLogicPrivateService {
|
|
|
12107
12107
|
if (result.action === "scheduled") {
|
|
12108
12108
|
const signalStartTime = performance.now();
|
|
12109
12109
|
const signal = result.signal;
|
|
12110
|
+
yield result;
|
|
12110
12111
|
this.loggerService.info("backtestLogicPrivateService scheduled signal detected", {
|
|
12111
12112
|
symbol,
|
|
12112
12113
|
signalId: signal.id,
|
|
@@ -12250,6 +12251,7 @@ class BacktestLogicPrivateService {
|
|
|
12250
12251
|
if (result.action === "opened") {
|
|
12251
12252
|
const signalStartTime = performance.now();
|
|
12252
12253
|
const signal = result.signal;
|
|
12254
|
+
yield result;
|
|
12253
12255
|
this.loggerService.info("backtestLogicPrivateService signal opened", {
|
|
12254
12256
|
symbol,
|
|
12255
12257
|
signalId: signal.id,
|
package/build/index.mjs
CHANGED
|
@@ -12087,6 +12087,7 @@ class BacktestLogicPrivateService {
|
|
|
12087
12087
|
if (result.action === "scheduled") {
|
|
12088
12088
|
const signalStartTime = performance.now();
|
|
12089
12089
|
const signal = result.signal;
|
|
12090
|
+
yield result;
|
|
12090
12091
|
this.loggerService.info("backtestLogicPrivateService scheduled signal detected", {
|
|
12091
12092
|
symbol,
|
|
12092
12093
|
signalId: signal.id,
|
|
@@ -12230,6 +12231,7 @@ class BacktestLogicPrivateService {
|
|
|
12230
12231
|
if (result.action === "opened") {
|
|
12231
12232
|
const signalStartTime = performance.now();
|
|
12232
12233
|
const signal = result.signal;
|
|
12234
|
+
yield result;
|
|
12233
12235
|
this.loggerService.info("backtestLogicPrivateService signal opened", {
|
|
12234
12236
|
symbol,
|
|
12235
12237
|
signalId: signal.id,
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1439,7 +1439,7 @@ type IStrategyTickResult = IStrategyTickResultIdle | IStrategyTickResultSchedule
|
|
|
1439
1439
|
/**
|
|
1440
1440
|
* Backtest returns closed result (TP/SL or time_expired) or cancelled result (scheduled signal never activated).
|
|
1441
1441
|
*/
|
|
1442
|
-
type IStrategyBacktestResult = IStrategyTickResultClosed | IStrategyTickResultCancelled;
|
|
1442
|
+
type IStrategyBacktestResult = IStrategyTickResultOpened | IStrategyTickResultScheduled | IStrategyTickResultClosed | IStrategyTickResultCancelled;
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Strategy interface implemented by ClientStrategy.
|
|
1445
1445
|
* Defines core strategy execution methods.
|
|
@@ -8899,7 +8899,7 @@ declare class BacktestUtils {
|
|
|
8899
8899
|
strategyName: StrategyName;
|
|
8900
8900
|
exchangeName: ExchangeName;
|
|
8901
8901
|
frameName: FrameName;
|
|
8902
|
-
}) => AsyncGenerator<IStrategyTickResultOpened |
|
|
8902
|
+
}) => AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
8903
8903
|
/**
|
|
8904
8904
|
* Runs backtest in background without yielding results.
|
|
8905
8905
|
*
|
|
@@ -13305,7 +13305,7 @@ declare class StrategyCoreService implements TStrategy$1 {
|
|
|
13305
13305
|
strategyName: StrategyName;
|
|
13306
13306
|
exchangeName: ExchangeName;
|
|
13307
13307
|
frameName: FrameName;
|
|
13308
|
-
}) => Promise<
|
|
13308
|
+
}) => Promise<IStrategyTickResultClosed | IStrategyTickResultCancelled>;
|
|
13309
13309
|
/**
|
|
13310
13310
|
* Stops the strategy from generating new signals.
|
|
13311
13311
|
*
|
|
@@ -15954,7 +15954,7 @@ declare class StrategyConnectionService implements TStrategy {
|
|
|
15954
15954
|
strategyName: StrategyName;
|
|
15955
15955
|
exchangeName: ExchangeName;
|
|
15956
15956
|
frameName: FrameName;
|
|
15957
|
-
}, candles: ICandleData[]) => Promise<
|
|
15957
|
+
}, candles: ICandleData[]) => Promise<IStrategyTickResultClosed | IStrategyTickResultCancelled>;
|
|
15958
15958
|
/**
|
|
15959
15959
|
* Stops the specified strategy from generating new signals.
|
|
15960
15960
|
*
|
|
@@ -17451,7 +17451,7 @@ declare class BacktestLogicPrivateService {
|
|
|
17451
17451
|
* }
|
|
17452
17452
|
* ```
|
|
17453
17453
|
*/
|
|
17454
|
-
run(symbol: string): AsyncGenerator<IStrategyTickResultOpened |
|
|
17454
|
+
run(symbol: string): AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
17455
17455
|
}
|
|
17456
17456
|
|
|
17457
17457
|
/**
|
|
@@ -17558,7 +17558,7 @@ declare class BacktestLogicPublicService implements TBacktestLogicPrivateService
|
|
|
17558
17558
|
strategyName: StrategyName;
|
|
17559
17559
|
exchangeName: ExchangeName;
|
|
17560
17560
|
frameName: FrameName;
|
|
17561
|
-
}) => AsyncGenerator<IStrategyTickResultOpened |
|
|
17561
|
+
}) => AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
17562
17562
|
}
|
|
17563
17563
|
|
|
17564
17564
|
/**
|
|
@@ -17697,7 +17697,7 @@ declare class BacktestCommandService implements TBacktestLogicPublicService {
|
|
|
17697
17697
|
strategyName: StrategyName;
|
|
17698
17698
|
exchangeName: ExchangeName;
|
|
17699
17699
|
frameName: FrameName;
|
|
17700
|
-
}) => AsyncGenerator<IStrategyTickResultOpened |
|
|
17700
|
+
}) => AsyncGenerator<IStrategyTickResultScheduled | IStrategyTickResultOpened | IStrategyTickResultClosed | IStrategyTickResultCancelled, void, unknown>;
|
|
17701
17701
|
}
|
|
17702
17702
|
|
|
17703
17703
|
/**
|