diff --git a/vnpy/app/cta_strategy/backtesting.py b/vnpy/app/cta_strategy/backtesting.py index fdeff439..e4aa25c7 100644 --- a/vnpy/app/cta_strategy/backtesting.py +++ b/vnpy/app/cta_strategy/backtesting.py @@ -226,6 +226,8 @@ class BacktestingEngine: # Use the first [days] of history data for initializing strategy day_count = 0 + ix = 0 + for ix, data in enumerate(self.history_data): if self.datetime and data.datetime.day != self.datetime.day: day_count += 1