Traceback (most recent call last):
File "/freqtrade/freqtrade/main.py", line 42, in main
return_code = args['func'](args)
^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/commands/optimize_commands.py", line 58, in start_backtesting
backtesting.start()
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1401, in start
min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1318, in backtest_one_strategy
preprocessed = self.strategy.advise_all_indicators(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1378, in advise_all_indicators
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair}).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1378, in
return {pair: self.advise_indicators(pair_data.copy(), {'pair': pair}).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1410, in advise_indicators
return self.populate_indicators(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/user_data/strategies/Discord_1_DIV_v2.py", line 45, in populate_indicators
dataframe = find_divergence(dataframe, 'rsi', 60)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/user_data/strategies/Discord_1_DIV_v2.py", line 89, in find_divergence
dataframe['hp_iv'] = dataframe.loc[index_of_max_price, indicator]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1147, in __getitem__
return self._getitem_tuple(key)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1330, in _getitem_tuple
return self._getitem_lowerdim(tup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1063, in _getitem_lowerdim
return getattr(section, self.name)[new_key]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1153, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1382, in _getitem_axis
return self._getitem_iterable(key, axis=axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1322, in _getitem_iterable
keyarr, indexer = self._get_listlike_indexer(key, axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexing.py", line 1520, in _get_listlike_indexer
keyarr, indexer = ax._get_indexer_strict(key, axis_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 6115, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 6179, in _raise_if_missing
raise KeyError(f"{not_found} not in index")
KeyError: '[nan] not in index'