mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 21:01:14 +00:00
Fix backtesting exception when no data is available for a pair
This commit is contained in:
@@ -1425,7 +1425,7 @@ class Backtesting:
|
|||||||
# Row is treated as "current incomplete candle".
|
# Row is treated as "current incomplete candle".
|
||||||
# entry / exit signals are shifted by 1 to compensate for this.
|
# entry / exit signals are shifted by 1 to compensate for this.
|
||||||
row = data[pair][row_index]
|
row = data[pair][row_index]
|
||||||
except IndexError:
|
except (IndexError, KeyError):
|
||||||
# missing Data for one pair at the end.
|
# missing Data for one pair at the end.
|
||||||
# Warnings for this are shown during data loading
|
# Warnings for this are shown during data loading
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user