Blog / Strategy
Strategy

Expansion Candle Equilibrium Retest

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Expansion Candle Equilibrium Retest is a trend-following continuation strategy built around a single, easily recognizable price-action event: the expansion candle. An expansion candle (sometimes called a displacement or impulse candle) is a bar whose range dwarfs recent volatility and that closes hard in its own direction — a footprint of one-sided order flow that repriced the market in a hurry. Rather than chasing the close of that candle, this strategy waits for price to retrace to the candle's own equilibrium, the 50% midpoint calculated as (High + Low) / 2, and then re-enters in the impulse direction once that level is defended.

To keep those retests aligned with the broader move, the strategy is indicator-gated by three well-known tools. The Average True Range (ATR) — a measure of typical bar range — defines what "big" means, so the expansion test adapts to each instrument and volatility regime instead of relying on a fixed pip count. An Exponential Moving Average (EMA) — a moving average that weights recent prices more heavily — confirms both the direction and the slope of the prevailing trend. Finally, the Relative Strength Index (RSI) — a 0–100 momentum oscillator — checks that momentum sits in healthy trend territory but is not already exhausted.

This makes the strategy a useful learning tool for anyone studying how discretionary "impulse and pullback" price-action concepts can be encoded into objective, rules-based logic. It is designed for trending market conditions and is best suited to traders who want to understand structural stops, reward-to-risk targeting, and multi-filter confirmation rather than those seeking a black-box signal. Treat it as a study in strategy construction, not a shortcut.

How It Works

The strategy operates in two stages: it first arms on a qualifying impulse candle, then waits for a defended retest of that candle's midpoint before entering. All logic runs on completed candles on a single timeframe, evaluated once per bar close.

Stage 1 — Arming on an expansion candle (long example; shorts mirror it):

When all conditions align, the strategy stores the equilibrium (the 50% midpoint), the impulse candle's Low as a stop reference, and opens an expiry window of ArmBars candles.

Stage 2 — Waiting for the defended equilibrium retest:

Stop-loss and take-profit logic:

expansion candle retest MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lots 0.10 0.01 1.00 Fixed position size in lots for each trade.
AtrPeriod 14 5 40 Number of bars used to calculate ATR (the volatility/expansion yardstick).
EmaPeriod 50 10 200 Length of the EMA used to define trend direction and slope.
RsiPeriod 14 5 30 Number of bars used to calculate the RSI momentum oscillator.
RangeAtrMult 1.4 0.8 3.0 Expansion threshold: impulse range must be at least this many ATRs.
BodyFrac 0.55 0.30 0.90 Minimum fraction of the candle range that the body must fill (decisiveness).
CloseLoc 0.65 0.50 0.95 Close must land in this leading fraction of the range (close strength).
RsiTrendMin 50.0 40.0 65.0 RSI floor for a long (mirrored for shorts) — momentum must be in trend territory.
RsiMax 78.0 60.0 90.0 RSI ceiling for a long (mirrored for shorts) — avoids exhausted momentum.
ArmBars 6 1 20 Number of bars after arming within which the retest must trigger.
RewardRisk 1.8 0.5 5.0 Take-profit distance as a multiple of the stop distance.
AtrBuffer 0.25 0.00 1.50 Extra stop room beyond the impulse extreme, measured in ATRs.
MaxSpread 250 10 900 Maximum spread (in points) allowed at entry to avoid high-cost fills.
expansion candle retest MT5 EA — MQL5 source code

Recommended Chart Settings

The Expansion Candle Equilibrium Retest was designed with EUR/USD, GBP/USD and XAU/USD (gold) in mind, but because every threshold is ATR-relative it is symbol- and timeframe-agnostic and will run on whatever chart it is attached to. A common starting point for study is an intraday-to-swing timeframe such as H1 or H4, where expansion candles are meaningful and pullbacks develop with enough structure to define a clean midpoint. Because the defaults are tuned to typical volatility, remember that behavior will vary considerably across symbols, sessions, and market conditions. Always re-test the parameters on your chosen instrument and timeframe before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The core strength of this approach is that it combines a visually intuitive price-action pattern with objective, adaptive filters. By measuring "expansion" against ATR rather than a fixed pip count, the strategy stays relevant as volatility changes. Waiting for the 50% retest instead of chasing the impulse close gives a tighter, structurally defined stop, and the EMA and RSI gates are designed to keep entries aligned with a healthy, non-exhausted trend. The fixed reward-to-risk target enforces disciplined trade management.

That said, every design choice carries trade-offs. Continuation strategies like this one historically perform best in clean, trending conditions and may struggle in choppy, range-bound markets where expansion candles form but no durable trend follows — leading to false arms and quick invalidations. Because the setup requires a specific sequence (impulse, then a defended retest within a limited window), it can be selective, and many potential moves will simply not qualify. Strong trends that never pull back to their midpoint will be missed entirely. The ArmBars window, RSI bounds, and expansion multiple all interact, so over-tightening one filter can starve the strategy of trades while loosening them may admit lower-quality setups. Slippage, spread widening around news, and gaps can also affect how closely live behavior tracks a backtest. Treat the strategy as a framework to study and stress-test, not a finished solution.

Risk Management Tips

Sound risk management matters far more than any single entry signal. Consider these general principles as you study this or any strategy:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog