The "Divergences" strategy is a trading strategy that utilizes various technical indicators to identify bullish and bearish divergences in the price of a financial asset. In the "populate_indicators" method, the strategy adds several technical indicators to the input DataFrame, including:
"bullish_div": This indicator checks for a bullish divergence pattern by comparing the price of the asset at different time periods. "mean24volume": This indicator calculates the 24-period moving average of the trading volume.
"mean68close": This indicator calculates the 68-period moving average of the closing price.
"bearish_div": This indicator checks for a bearish divergence pattern similar to the "bullish_div" indicator.
"cci_one" and "cci_two": These indicators calculate the Commodity Channel Index (CCI) using different time periods. "adx": This indicator calculates the Average Directional Index (ADX). Other indicators added include "rsi" (Relative Strength Index), "fastd" and "fastk" (Stochastic Fast), "macd" (Moving Average Convergence Divergence), "mfi" (Money Flow Index), "bb_lowerband," "bb_middleband," and "bb_upperband" (Bollinger Bands), "ema3," "ema5," "ema10," "ema21," "ema50," "ema100," and "ema200" (Exponential Moving Averages), "sar" (Parabolic SAR), "tema" (Triple Exponential Moving Average), "htsine" (Hilbert Transform - SineWave), and "htleadsine" (Hilbert Transform - Instantaneous Trendline). In the "populate_buy_trend" method, the strategy identifies buy signals based on specific conditions, such as a low RSI (below 40) and the presence of a bullish divergence pattern. In the "populate_sell_trend" method, the strategy identifies sell signals based on the presence of a bearish divergence pattern. Overall, the strategy aims to generate buy and sell signals by analyzing various technical indicators and divergence patterns in the price of the asset.