Skip to content
All library documents

Combining RSI and MACD Divergence with Trend Constraints

Article MQL5 articles

Summary

The article describes adding divergence signals to a trend-constrained trading expert advisor. Regular bullish divergence pairs lower price lows with higher indicator lows, while regular bearish divergence pairs higher price highs with lower indicator highs. Hidden divergence is framed as a possible continuation signal. The implementation discussion uses RSI and MACD values to identify these relationships, then treats MACD behavior as confirmation and aligns entries with a daily candle trend filter.

The expert advisor also includes configurable execution settings, per-strategy identifiers, limits on concurrent positions, and a profit-locking function that adjusts stops as trades move favorably. The article reports that the strategy tester executed trades and shows an example with a cap on active positions, but the supplied text gives no comprehensive profitability, drawdown, or out-of-sample evidence. Divergence can be subjective and noisy, and indicator confluence does not guarantee predictive value; the described rules require independent testing across markets and conditions.

Key ideas

  • Regular divergence compares opposing price and indicator extremes to flag a possible reversal.
  • Hidden divergence is used as a possible trend-continuation signal.
  • The system combines RSI or MACD divergence with MACD confirmation and a daily trend constraint.
  • Position limits, trade identifiers, and dynamic stop adjustment are included in the expert advisor.
  • The reported tester activity does not establish profitability or robustness across markets.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.