Skip to content

Commit

Permalink
Fix from_timestamp check
Browse files Browse the repository at this point in the history
  • Loading branch information
MDUYN committed Dec 4, 2023
1 parent 6351582 commit 66f69dc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ def get_data(self, backtest_index_date, **kwargs):
minutes=self.total_minutes_timeframe
)

if from_timestamp > self.start_date:
if from_timestamp < self.backtest_data_start_date:
raise OperationalException(
f"Cannot get data from {from_timestamp} as the "
f"backtest data starts at {self.start_date}"
)

if to_timestamp > self.end_date:
if to_timestamp > self.backtest_data_end_date:
raise OperationalException(
f"Cannot get data to {to_timestamp} as the "
f"backtest data ends at {self.end_date}"
Expand Down

0 comments on commit 66f69dc

Please sign in to comment.