Discussing the article: "Building a Divergence System (Part III): The Adaptive SuperTrend EA"

 

Check out the new article: Building a Divergence System (Part III): The Adaptive SuperTrend EA.

The article implements a self-sufficient Adaptive SuperTrend EA with internal calculations on a selectable timeframe, avoiding external buffers and indicator files. It includes risk-based lot sizing, ATR stops, stepwise RR trailing, optional anti-repainting confirmation, and session control. Practitioners can reuse the structure for consistent new‑bar signal handling and broker‑compliant order validation.

In the previous article (Part II), we developed the Adaptive SuperTrend indicator, a trend-following system that combines SuperTrend with divergence analysis from either MPO4 or RSI. By dynamically shrinking its ATR multiplier when opposing divergence appears, the indicator attempts to identify weakening trends earlier while still maintaining the structure that makes SuperTrend popular among traders.

In this article, we will build an automated Expert Advisor around the Adaptive SuperTrend concept. Rather than relying on a separate indicator file attached to the chart, the EA will contain the complete calculation engine internally, making it self-contained and suitable for both live trading and strategy testing. Along the way, we will add dynamic position sizing, ATR-based stop placement, risk-reward trailing stops, optional anti-repainting confirmation, and session-based trade filtering.

Author: Solomon Anietie Sunday