The RSI and MACD Divergence Strategy is designed to identify potential trend reversals by analyzing divergences between price movements and two widely used technical indicators: the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD).
By detecting divergences, this strategy aims to enter trades at opportune moments when the momentum is likely shifting.
This strategy also includes optional filters for additional confirmation:
- EMA200 Filter: Ensures that long positions are only taken when the price is above the 200-period Exponential Moving Average (EMA200), and short positions are taken when the price is below the EMA200. This filter helps align trades with the broader market trend.
- ADX Filter: The Average Directional Index (ADX) is used to measure the strength of a trend. Trades are only taken if the ADX is above a configurable threshold, ensuring that the market has sufficient momentum.
Core Indicators
- RSI (Relative Strength Index): Used to identify overbought and oversold conditions and potential divergences with price.
- MACD (Moving Average Convergence Divergence): Analyzes the relationship between two moving averages of the asset’s price to detect potential trend reversals.
Entry Conditions
- Bullish Divergence: A long position is triggered when the price forms a lower low while both the RSI and MACD form higher lows, coupled with the RSI crossing above 30.
- Bearish Divergence: A short position is triggered when the price forms a higher high while both the RSI and MACD form lower highs, coupled with the RSI crossing below 70.
Exit Conditions
- Take Profit: The strategy closes the position when there is a shift in momentum, indicated by either the RSI moving back to the 50 level or the MACD line crossing its signal line.
- Stop Loss: For long positions, the stop loss is set 2% below the recent swing low. For short positions, it is set 2% above the recent swing high.
Additional Filters (Optional)
- EMA200: Ensures alignment with the broader trend, filtering out trades that go against the long-term direction.
- ADX: Filters out trades in low-momentum environments, reducing the likelihood of false signals.
This strategy is versatile and can be applied across different assets and timeframes. However, as with all trading strategies, it's important to thoroughly backtest and optimize settings to suit the specific market conditions you are trading in.