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 Exhaustion Closing Reversal is a pure price-action, counter-trend reversal strategy built around the classic Closing Price Reversal (CPR) candle pattern — a two-candle "fingerprint" that flags when a directional push has run out of fuel. A CPR forms when price stabs to a fresh extreme (taking out the prior bar's low for a long, or its high for a short) but then snaps back and closes on the opposite side of the prior bar's close. That single bar tells a story: the last aggressive push found no follow-through, and the late entrants who chased the move are now trapped on the wrong side.
What separates this strategy from a naive pattern scanner is context. A CPR on its own fires constantly inside choppy, sideways markets, where the "reversal" means nothing. This Expert Advisor (EA) only arms the pattern after a measured run of net directional travel has fed into the signal — an actual trend leg that can become exhausted — and only when the signal bar prints a fresh extreme of the recent swing window. In plain terms, the reversal is allowed to trigger only at the terminal point of a real move, where stop orders cluster and fading a tired drive may have a structural edge. Crucially, the strategy uses no indicators of any kind: every condition is raw candle geometry, raw closing prices, and raw swing highs and lows.
As a learning tool, the Exhaustion Closing Reversal is well suited to traders who want to study counter-trend reversal logic and price-action structure without leaning on lagging indicators. It is designed with liquid, high-range instruments in mind — GBP/JPY or XAU/USD (gold) on the M30 or H1 timeframe — though it will run on any liquid symbol and timeframe. Treat it as a transparent case study in how to filter a common candle pattern down to higher-quality contexts, not as a shortcut to results.
How It Works
The strategy evaluates conditions once per freshly-closed bar. The most recently closed candle is the signal bar, and the candle before it is the predecessor. For a long (bullish reversal ending a down-drive), the strategy signals when all of the following are true (the short side is an exact mirror):
- Exhaustion gate (net down run): The predecessor's close is lower than the close
RunBarscandles further back. This confirms a genuine directional drive fed into the signal, rather than random noise. - Fresh terminal extreme: The signal bar's low reaches or undercuts the lowest low of the preceding swing window (
Lookbackbars). The reversal is happening at the visible bottom of the move. - Prior-bar breakout: The signal bar's low takes out the predecessor's low — price made a new extreme.
- The reversal close: Despite that new low, the signal bar closes above the predecessor's close. This is the heart of the CPR — a new extreme rejected by the close.
- Decisive body: The signal bar is bullish (close above open) and its body is at least
MinBodyFracof the bar's total range. This filters out indecisive dojis where the close does not genuinely commit.
When every condition aligns, the strategy signals a market entry in the reversal direction. Exit logic is fully structural and defined up front:
- Stop-loss (SL): Placed just beyond the rejected extreme — below the signal bar's low for longs (plus a small buffer), or above its high for shorts. This is the price level at which the reversal thesis is simply wrong.
- Take-profit (TP): Set at a fixed risk/reward multiple of the stop distance. If the structural stop is, say, 40 pips away and
RiskRewardis 1.8, the target sits 72 pips from entry. - One position at a time: The EA holds only a single open position per symbol for its magic number, and it acts only on the close of a new bar, so signals are evaluated cleanly without intrabar noise.
The buffer past the rejected extreme is itself a fraction of the signal bar's range (BufferFrac), so the stop scales with current volatility rather than using a fixed distance.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| Lots | 0.10 | 0.01 | 1.00 | Trade volume in lots for each position. Set this to match your account size and risk tolerance. |
| RunBars | 4 | 2 | 10 | Number of bars of net directional travel required into the signal — the exhaustion gate that confirms a real drive. |
| Lookback | 15 | 6 | 50 | Size of the swing window preceding the signal bar, used to confirm the signal is a fresh terminal extreme. |
| MinBodyFrac | 0.30 | 0.10 | 0.70 | Minimum candle body as a fraction of the signal bar's range, ensuring the close is decisive and not a doji. |
| RiskReward | 1.8 | 1.0 | 5.0 | Take-profit distance expressed as a multiple of the structural stop distance. |
| BufferFrac | 0.10 | 0.00 | 1.00 | Extra stop-loss buffer past the rejected extreme, as a fraction of the signal bar's range. |
The EA also uses a fixed Magic number (default 530417) so it can identify and manage only its own positions — useful when running multiple strategies on the same account.

Recommended Chart Settings
The Exhaustion Closing Reversal was designed for GBP/JPY or XAU/USD (gold) on the M30 or H1 timeframe. These instruments tend to produce clean, high-range directional legs that exhaust visibly — the exact conditions the CPR pattern is built to fade. The strategy will technically run on any liquid symbol and timeframe, but its character changes with volatility and session structure. Reversal behavior on a quiet major pair will not resemble reversal behavior on gold. Results will vary across different instruments, brokers, spreads, and market conditions, so always study how the pattern behaves on your specific chart before drawing any conclusions.
How to Install on MetaTrader 5
- Download the
ExhaustionClosingReversal.ex5file from the link below. - Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
The strength of this approach is its transparency and selectivity. Because it uses no indicators, there is nothing to lag or repaint — every decision traces back to candle geometry you can verify with your own eyes on the chart. The layered filters (exhaustion run, fresh swing extreme, decisive body) are designed to keep the EA out of the chop where naive CPR signals fail, and the structural stop placed just past the rejected extreme gives every trade a clearly defined, logical invalidation point.
That said, counter-trend reversal trading carries inherent limitations you should understand. Fading a strong move means you are, by definition, trading against momentum — and a genuinely strong trend can blow through a single exhaustion signal and keep going, hitting your stop. The strategy is also selective by design, so it may go long stretches without a qualifying signal; this is normal and not a malfunction. In persistently trending or news-driven markets, exhaustion patterns can fail repeatedly before one finally holds. Wider-spread instruments like gold can also erode the math of the fixed risk/reward target. No pattern works in all conditions, and the Exhaustion Closing Reversal is no exception — it historically performs best where moves genuinely exhaust and reverse, and worst where they simply do not.
Risk Management Tips
Sound risk management matters more than any single entry signal. Consider these general principles:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of account equity on any single position. Size your
Lotsso that the distance to your stop-loss represents that small fraction, rather than choosing a lot size arbitrarily. - Test on a demo account first. Run the EA on a demo or simulated environment until you understand how often it signals and how it behaves through different market phases.
- Understand drawdown. Even a well-built strategy goes through losing streaks. Know the maximum string of losses you are emotionally and financially prepared to sit through before you commit real capital.
- Account for costs. Spread, commission, and slippage all eat into a fixed risk/reward model — factor them into your expectations, especially on higher-spread instruments.
- Never over-leverage. Trade sizes that feel comfortable in a winning streak can become unmanageable in a losing one.
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
- Expert Advisor: ExhaustionClosingReversal.ex5 (4 downloads)
- Source Code: ExhaustionClosingReversal.mq5 (4 downloads)
- Documentation: ExhaustionClosingReversal.pdf (4 downloads)