Skip to content

Commit 431644f

Browse files
committed
REF: Don't plot(resample=) if data up to *including* _MAX_CANDLES
1 parent e2fdfd7 commit 431644f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/_plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _maybe_resample_data(resample_rule, df, indicators, equity_data, trades):
9393
if isinstance(resample_rule, str):
9494
freq = resample_rule
9595
else:
96-
if len(df) < _MAX_CANDLES:
96+
if len(df) <= _MAX_CANDLES:
9797
return df, indicators, equity_data, trades
9898

9999
from_index = dict(day=-2, hour=-6, minute=1, second=0, millisecond=0,

0 commit comments

Comments
 (0)