The Helkin strategy is a trading strategy that uses various technical indicators to generate buy and sell signals. In the populate_indicators function, several technical indicators are calculated and added to the given DataFrame. These indicators include:
bullish_div: Identifies bullish divergence patterns in the price data.
mean24volume: Calculates the 24-period rolling average of the trading volume.
mean68close: Calculates the 68-period rolling average of the closing prices.
bearish_div: Identifies bearish divergence patterns in the price data. cci_one and cci_two: Computes the Commodity Channel Index (CCI) with different time periods. adx: Calculates the Average Directional Index (ADX). Other indicators used in the strategy include:
rsi: Calculates the Relative Strength Index (RSI). fastd and fastk: Computes the Stochastic Oscillator. macd, macdsignal, and macdhist: Calculates the Moving Average Convergence Divergence (MACD). mfi: Computes the Money Flow Index (MFI). bb_lowerband, bb_middleband, and bb_upperband: Calculates the Bollinger Bands. bb_percent: Calculates the percentage position of the closing price within the Bollinger Bands. bb_width: Computes the width of the Bollinger Bands. ema3, ema5, ema10, ema21, ema50, ema100, and ema200: Calculates various Exponential Moving Averages (EMA). sar: Computes the Parabolic SAR (Stop and Reverse). tema: Calculates the Triple Exponential Moving Average (TEMA). htsine and htleadsine: Computes the Hilbert Transform - SineWave indicators. ha_open, close, ha_high, and ha_low: Performs Heikin-Ashi transformation on the price data. haclosestrat and haopenstrat: Calculates the average of Heikin-Ashi open and close prices. highstrat and lowstrat: Determines the highest and lowest values among Heikin-Ashi high, open, and close prices. The strategy uses these indicators to generate buy and sell signals in the populate_buy_trend and populate_sell_trend functions, respectively. The buy signal is triggered when the current Heikin-Ashi close price is greater than the previous Heikin-Ashi open price, while the sell signal is triggered when the current Heikin-Ashi close price is less than or equal to the previous Heikin-Ashi open price. Overall, the Helkin strategy combines multiple indicators to identify potential market trends and generate trading signals based on the Heikin-Ashi candlestick transformation.
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/helkin.py", line 312, in populate_indicators
dataframe['highstrat'] = max(dataframe['ha_high'] , max(dataframe['ha_open'], dataframe['close'] ))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.11/site-packages/pandas/core/generic.py", line 1519, in __nonzero__
raise ValueError(
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().