backtest-kit 1.4.3 → 1.4.4

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 CHANGED
@@ -1873,7 +1873,7 @@ const GET_SIGNAL_FN = functoolsKit.trycatch(async (self) => {
1873
1873
  }))) {
1874
1874
  return null;
1875
1875
  }
1876
- const signal = await self.params.getSignal(self.params.execution.context.symbol);
1876
+ const signal = await self.params.getSignal(self.params.execution.context.symbol, self.params.execution.context.when);
1877
1877
  if (!signal) {
1878
1878
  return null;
1879
1879
  }
package/build/index.mjs CHANGED
@@ -1871,7 +1871,7 @@ const GET_SIGNAL_FN = trycatch(async (self) => {
1871
1871
  }))) {
1872
1872
  return null;
1873
1873
  }
1874
- const signal = await self.params.getSignal(self.params.execution.context.symbol);
1874
+ const signal = await self.params.getSignal(self.params.execution.context.symbol, self.params.execution.context.when);
1875
1875
  if (!signal) {
1876
1876
  return null;
1877
1877
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -825,7 +825,7 @@ interface IStrategySchema {
825
825
  * If priceOpen is provided - becomes scheduled signal waiting for price to reach entry point.
826
826
  * If priceOpen is omitted - opens immediately at current price.
827
827
  */
828
- getSignal: (symbol: string) => Promise<ISignalDto | null>;
828
+ getSignal: (symbol: string, when: Date) => Promise<ISignalDto | null>;
829
829
  /** Optional lifecycle event callbacks (onOpen, onClose) */
830
830
  callbacks?: Partial<IStrategyCallbacks>;
831
831
  /** Optional risk profile identifier for risk management */