Fix candle ranges in backtesting test

This commit is contained in:
Matthias
2021-10-30 16:10:28 +02:00
parent 6cf140f8fb
commit 459a2239ce
2 changed files with 25 additions and 19 deletions

View File

@@ -54,4 +54,10 @@ def _build_backtest_dataframe(data):
frame[column] = frame[column].astype('float64')
if 'buy_tag' not in columns:
frame['buy_tag'] = None
# Ensure all candles make kindof sense
assert all(frame['low'] <= frame['close'])
assert all(frame['low'] <= frame['open'])
assert all(frame['high'] >= frame['close'])
assert all(frame['high'] >= frame['open'])
return frame