The MultiMA_TSL strategy is a trading strategy that combines multiple moving averages (MA) and other indicators to generate buy and sell signals. Here's a breakdown of what the strategy does:
populate_indicators(): This function calculates various indicators used in the strategy, such as exponential moving averages (EMA), Elder's Force Index (EWO), and relative strength index (RSI). It adds these indicators to the input dataframe and returns the modified dataframe.
populate_buy_trend(): This function determines the conditions for buying based on the calculated indicators.
It creates different offset values for SMA, EMA, and TRIMA (triangular moving average) and checks if the closing price is below these offsets.
It also considers the EWO values and RSI values for additional filtering. If the conditions are met, it sets the 'buy' tag in the 'buy_tag' column of the dataframe. It then combines these conditions using logical OR and assigns the result to the 'buy' column of the dataframe. Finally, it returns the modified dataframe. populate_sell_trend(): This function determines the conditions for selling based on the calculated indicators. If the run mode is set to 'hyperopt', it calculates the offset value for EMA and the MA-SL filter offset value using the dataframe. It then checks if the closing price is above the EMA offset value and if the volume is greater than zero. If the conditions are met, it sets the 'sell' tag in the 'sell' column of the dataframe. It combines these conditions using logical OR and assigns the result to the 'sell' column of the dataframe. Finally, it returns the modified dataframe. The last part of the code calculates the difference between two EMAs (sma1 and sma2) divided by the closing price multiplied by 100. It returns this calculated value (smadif) as the result. Overall, the MultiMA_TSL strategy utilizes moving averages, EWO, RSI, and other indicators to identify potential buy and sell signals in the market.
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 1335, in backtest_one_strategy
results = self.backtest(
^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1213, in backtest
data: Dict = self._get_ohlcv_as_lists(processed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 381, in _get_ohlcv_as_lists
df_analyzed = self.strategy.ft_advise_signals(pair_data, {'pair': pair})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1391, in ft_advise_signals
dataframe = self.advise_entry(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1425, in advise_entry
df = self.populate_entry_trend(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 225, in populate_entry_trend
return self.populate_buy_trend(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/user_data/strategies/MultiMA_TSLho.py", line 176, in populate_buy_trend
int(self.base_nb_candles_sell.value)) * self.high_offset_ema.value
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MultiMA_TSLho' object has no attribute 'base_nb_candles_sell'