backtest-kit 1.4.7 → 1.4.8

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
@@ -1831,6 +1831,9 @@ const VALIDATE_SIGNAL_FN = (signal, currentPrice, isScheduled) => {
1831
1831
  if (signal.minuteEstimatedTime <= 0) {
1832
1832
  errors.push(`minuteEstimatedTime must be positive, got ${signal.minuteEstimatedTime}`);
1833
1833
  }
1834
+ if (!Number.isInteger(signal.minuteEstimatedTime)) {
1835
+ errors.push(`minuteEstimatedTime must be an integer (whole number), got ${signal.minuteEstimatedTime}`);
1836
+ }
1834
1837
  // ЗАЩИТА ОТ ВЕЧНЫХ СИГНАЛОВ: ограничиваем максимальное время жизни сигнала
1835
1838
  if (GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES && GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES) {
1836
1839
  if (signal.minuteEstimatedTime > GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES) {
@@ -3017,6 +3020,7 @@ class StrategyConnectionService {
3017
3020
  this.getStrategy = functoolsKit.memoize(([symbol, strategyName]) => `${symbol}:${strategyName}`, (symbol, strategyName) => {
3018
3021
  const { riskName, getSignal, interval, callbacks } = this.strategySchemaService.get(strategyName);
3019
3022
  return new ClientStrategy({
3023
+ symbol,
3020
3024
  interval,
3021
3025
  execution: this.executionContextService,
3022
3026
  method: this.methodContextService,
package/build/index.mjs CHANGED
@@ -1829,6 +1829,9 @@ const VALIDATE_SIGNAL_FN = (signal, currentPrice, isScheduled) => {
1829
1829
  if (signal.minuteEstimatedTime <= 0) {
1830
1830
  errors.push(`minuteEstimatedTime must be positive, got ${signal.minuteEstimatedTime}`);
1831
1831
  }
1832
+ if (!Number.isInteger(signal.minuteEstimatedTime)) {
1833
+ errors.push(`minuteEstimatedTime must be an integer (whole number), got ${signal.minuteEstimatedTime}`);
1834
+ }
1832
1835
  // ЗАЩИТА ОТ ВЕЧНЫХ СИГНАЛОВ: ограничиваем максимальное время жизни сигнала
1833
1836
  if (GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES && GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES) {
1834
1837
  if (signal.minuteEstimatedTime > GLOBAL_CONFIG.CC_MAX_SIGNAL_LIFETIME_MINUTES) {
@@ -3015,6 +3018,7 @@ class StrategyConnectionService {
3015
3018
  this.getStrategy = memoize(([symbol, strategyName]) => `${symbol}:${strategyName}`, (symbol, strategyName) => {
3016
3019
  const { riskName, getSignal, interval, callbacks } = this.strategySchemaService.get(strategyName);
3017
3020
  return new ClientStrategy({
3021
+ symbol,
3018
3022
  interval,
3019
3023
  execution: this.executionContextService,
3020
3024
  method: this.methodContextService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",