Elffuss BraidHub

kikocis/freqtrade public

remove `copy()` from `custom_info` example

`set_index` automatically copies if not stated otherwise with `inplace=True`
> inplacebool, default False
If True, modifies the DataFrame in place (do not create a new object).

from: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.set_index.html?highlight=set_index#pandas.DataFrame.set_index
Changesete223b474eddc61f98771b4e2a837b2ee2e263c507f78b63140d1bbe59a01a693
AuthorJoeSchr <JoeSchr@users.noreply.github.com> · 2021-04-15 15:21 +02:00
CommitterGitHub <noreply@github.com> · 2021-04-15 15:21 +02:00
Parents367c2ff7a7f3

Browse the files at this changeset

1 file changed

modified docs/strategy-advanced.md +1 −1
@@ -57,7 +57,7 @@
5757 dataframe['atr'] = ta.ATR(dataframe)
5858 if self.dp.runmode.value in ('backtest', 'hyperopt'):
5959 # add indicator mapped to correct DatetimeIndex to custom_info
60- self.custom_info[metadata['pair']] = dataframe[['date', 'atr']].copy().set_index('date')
60+ self.custom_info[metadata['pair']] = dataframe[['date', 'atr']].set_index('date')
6161 return dataframe
6262 ```
6363