Blog / Strategy
Strategy

Exhaustion Gap Reversal

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 Gap Reversal is a pure price-action expert advisor built around the fair-value gap (FVG) pattern, traded in a counter-trend reversal style. A fair-value gap is a three-candle imbalance: when one impulsive middle candle moves so quickly that the high of the candle before it never overlaps the low of the candle after it, the chart is left with a small "void" or inefficiency in price. Many traders treat that void as future support or resistance. This strategy takes the opposite view in one specific situation — when the gap is a sign of exhaustion rather than strength.

The key idea is that not every gap means continuation. When the impulsive candle that creates the gap also drives price to a fresh swing extreme — a brand-new high in an up-move, or a brand-new low in a down-move — that final thrust is often a late-stage liquidity grab rather than the beginning of a new leg. In this reading, the gap is the "last gasp" of an over-extended side of the market. The Exhaustion Gap Reversal strategy is designed to identify these end-of-move imbalances and trade the snap-back against the thrust: it signals a sell after an exhausted up-gap and a buy after an exhausted down-gap.

This EA is best suited as a learning tool for traders who want to study mean-reversion logic, fair-value-gap geometry, and the difference between continuation and reversal interpretations of the same pattern. It uses no traditional indicators at all — every decision comes from candle geometry. It was built with FX majors and gold (XAU) on the M15–H1 timeframes in mind, but it is not locked to any particular timeframe. If you are still learning how price action and order-flow concepts translate into mechanical rules, this strategy offers a clear, transparent example to dissect.

How It Works

The strategy runs two small "state machines" — one watching for exhausted up-gaps and one watching for exhausted down-gaps. It only acts once per fully closed bar, so it never reacts to an unfinished candle. Here is the logic in plain English.

Detecting an exhaustion gap (the setup):

Confirming the entry (the trigger):

Stop-loss logic:

Take-profit logic:

The strategy also keeps things simple by trading only one position at a time per symbol, and it manages armed setups before detecting new ones so that a single candle can never both arm and trigger a trade.

exhaustion gap reversal MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lookback 20 8 60 Number of prior bars used to measure the swing extreme and the average candle range.
MinGapFactor 0.35 0.05 2.00 Minimum gap size required, expressed as a fraction of the average candle range. Higher values demand larger, rarer gaps.
FillFraction 0.50 0.10 1.00 How far price must close back into the gap before a reversal is confirmed. 0.50 means halfway into the imbalance.
ConfirmExpiry 6 1 25 Number of bars an armed setup stays valid while waiting for confirmation before it expires.
RewardRisk 2.0 1.0 6.0 Reward-to-risk multiple used to place the take-profit relative to the stop distance.
StopBufferPct 0.25 0.00 1.50 Extra stop-loss buffer beyond the exhaustion extreme, expressed as a fraction of the gap height.
Lots 0.10 0.01 1.00 Fixed trade volume in lots.
exhaustion gap reversal MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy was designed with FX major pairs and gold (XAU) in mind, on the M15 to H1 timeframes, where fair-value gaps and exhaustion thrusts tend to be clean and meaningful. That said, the code is deliberately not locked to any timeframe — it runs on whatever primary chart you attach it to. Because the gap filter scales to volatility through the average-range calculation, the same parameters can behave differently on a fast-moving instrument than on a slow one. Treat the defaults as a starting point for study, and remember that results will vary considerably across symbols, sessions, and changing market conditions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The strength of the Exhaustion Gap Reversal approach is its clarity and discipline. It defines exhaustion mechanically — a real fair-value gap plus a fresh swing extreme plus a confirmed snap-back — rather than relying on subjective judgment. The confirmation requirement and the expiry window help filter out gaps that simply keep running, and the fixed reward-to-risk structure enforces a consistent risk profile on every trade.

The limitations are equally important to understand. Counter-trend reversal systems, by design, trade against momentum, which means a strong trending market can produce a string of losing signals when "exhaustion" gaps turn out to be genuine continuation. The strategy's invalidation rule (a new extreme cancels the setup) helps, but it cannot eliminate the core risk that fading a strong move carries. Performance is also sensitive to spread and slippage, particularly on lower timeframes and around news events where gaps are most common. Periods of low volatility may produce few qualifying gaps at all, while choppy ranges can produce frequent small setups that whipsaw. No parameter set works equally well across every market regime, and over-tuning the inputs to past data can create a strategy that looks impressive in review but adapts poorly to new conditions. Use this EA as a framework for learning how reversal logic behaves — not as a finished, hands-off system.

Risk Management Tips

Sound risk management matters far more than any single entry rule. As you study this strategy, keep these general principles in mind:

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