The strategy, named "CombinedBinHClucAndMADV3," combines multiple trading strategies to generate buy and sell signals. Here is a breakdown of what the strategy does:
populate_indicators: This function populates the indicators required for the strategy. It merges the informative 1-hour indicators with the current timeframe indicators using the merge_informative_pair function.
populate_entry_trend: This function determines the conditions for entering a trade and assigns a value of 1 to the "buy" signal if the conditions are met.
It combines three different sub-strategies:
a.
BinHV45 strategy: Several conditions need to be satisfied, including the current close price being higher than the 200-period exponential moving average (ema_200_1h), the 50-period exponential moving average (ema_50) being higher than the 200-period exponential moving average (ema_200), and the 50-period exponential moving average on the 1-hour timeframe (ema_50_1h) being higher than the 200-period exponential moving average on the 1-hour timeframe (ema_200_1h). Additionally, there are conditions related to lower bands, price deltas, and volumes. b. ClucMay72018 strategy: Conditions include the current close price being lower than the slow exponential moving average (ema_slow) and 0.985 times the lower Bollinger Band (bb_lowerband). There are also conditions related to volumes. c. MACD Low buy strategy: Conditions include the MACD (Moving Average Convergence Divergence) being bullish (ema_26 > ema_12) and the difference between the two being above certain thresholds based on the opening price. There are also conditions related to volumes and the close price in relation to the lower Bollinger Band. populate_exit_trend: This function determines the conditions for exiting a trade and assigns a value of 1 to the "sell" signal if the conditions are met. The condition in this case is that the current close price is above 1.01 times the middle Bollinger Band (bb_middleband) and the volume is greater than zero. Overall, the strategy combines different entry conditions from three sub-strategies and uses the exit condition to generate buy and sell signals for backtesting.