Merge pull request #4743 from JoeSchr/patch-1
remove `copy()` from `custom_info` example
This commit is contained in:
commit
db9887c335
@ -57,7 +57,7 @@ class AwesomeStrategy(IStrategy):
|
|||||||
dataframe['atr'] = ta.ATR(dataframe)
|
dataframe['atr'] = ta.ATR(dataframe)
|
||||||
if self.dp.runmode.value in ('backtest', 'hyperopt'):
|
if self.dp.runmode.value in ('backtest', 'hyperopt'):
|
||||||
# add indicator mapped to correct DatetimeIndex to custom_info
|
# 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
|
return dataframe
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user