Merge pull request #4743 from JoeSchr/patch-1

remove `copy()` from `custom_info` example
This commit is contained in:
Matthias 2021-04-15 15:34:50 +02:00 committed by GitHub
commit db9887c335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ class AwesomeStrategy(IStrategy):
dataframe['atr'] = ta.ATR(dataframe)
if self.dp.runmode.value in ('backtest', 'hyperopt'):
# add indicator mapped to correct DatetimeIndex to custom_info
self.custom_info[metadata['pair']] = dataframe[['date', 'atr']].copy().set_index('date')
self.custom_info[metadata['pair']] = dataframe[['date', 'atr']].set_index('date')
return dataframe
```