Fix buy_tag not being saved to trade object.

Column is mistakenly excluded because advise_buy() creating this column runs after code detecting presence of buy_tag column.
This commit is contained in:
Rokas Kupstys
2021-08-11 10:18:25 +03:00
parent 0b6aedbc4c
commit f6267c7514
2 changed files with 5 additions and 7 deletions

View File

@@ -52,4 +52,6 @@ def _build_backtest_dataframe(data):
# Ensure floats are in place
for column in ['open', 'high', 'low', 'close', 'volume']:
frame[column] = frame[column].astype('float64')
if 'buy_tag' not in columns:
frame['buy_tag'] = None
return frame