Blog / Strategy
Strategy

Inverted Gap Limit Continuation

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 Inverted Gap Limit Continuation is a pure price-action trading system built around the Inversion Fair-Value Gap (IFVG) concept. A fair-value gap (FVG) is a three-candle imbalance — a fast middle candle leaves an "untraded void" so that, for a bullish gap, the high of the oldest candle sits below the low of the newest. Most gap strategies treat that void as support or resistance that should hold. This strategy does the opposite: it trades the moment a void fails, when price closes clean through the gap and simultaneously breaks market structure. The trading style is break-of-structure continuation with passive limit-order entries.

What sets this approach apart is that it uses no technical indicators whatsoever — no moving averages, no oscillators, no momentum studies. Every level, filter, stop and target is derived from raw candle geometry. The single average it computes is a plain mean candle range, used only to scale the minimum-gap filter to current volatility. The system also adds a structure gate: a gap only "inverts" if the breaking candle also clears the most recent fractal swing (a pivot confirmed by a set number of bars on each side), tying every signal to a genuine break of structure rather than a simple body-size move.

As a learning tool, this EA is well suited to traders studying institutional-style concepts such as fair-value gaps, liquidity, and order-flow shifts. It is designed with FX majors, gold (XAU), and index CFDs on M5 to H1 timeframes in mind, though it is not locked to any single timeframe. Treat it as a framework for understanding how a failed imbalance can flip into a fresh supply or demand zone — not as a shortcut to results.

How It Works

The strategy processes one freshly-closed bar at a time and walks through a fixed pipeline of pure-geometry steps.

Inverted Gap Limit Continuation EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
MinGapFactor 0.20 0.05 1.50 Minimum gap size as a fraction of the average candle range — filters out trivial imbalances.
RangeLookback 20 10 60 Number of bars used to compute the mean candle range for the gap filter.
SwingStrength 2 1 5 Fractal pivot strength — bars required on each side to confirm a swing high/low.
EntryDepth 0.50 0.00 1.00 How deep the limit order rests inside the inverted void (0 = first touch, 1 = deepest edge).
StopBufferPct 0.25 0.00 1.50 Stop buffer beyond the void's far edge, as a fraction of the void height.
RiskReward 2.0 1.0 6.0 Fixed reward-to-risk multiple used to set the take-profit.
BreakEvenR 1.0 0.0 4.0 Move the stop to entry after the trade runs this many multiples of risk in profit (0 disables).
FvgExpiry 20 3 60 Number of bars an un-inverted gap survives before being discarded.
LimitExpiry 12 2 50 Number of bars a resting limit order survives before being cancelled.
Lots 0.10 0.01 1.00 Fixed trade volume in lots.
Inverted Gap Limit Continuation EA — MQL5 source code

Recommended Chart Settings

This strategy was tuned with FX majors, gold (XAU), and index CFDs in mind, on timeframes from M5 to H1. It is not locked to any particular timeframe and will run on whatever primary chart you attach it to. Lower timeframes produce more frequent gaps and more signals but also more noise; higher timeframes produce fewer, larger setups. As always, results will vary considerably across different instruments, spreads, and market conditions, so test on the specific symbol and timeframe you intend to study.

How to Install on MetaTrader 5

What to Consider Before Using This EA

On the strength side, this approach is built on a clear, repeatable logic. Because it uses no indicators, there is nothing to lag or repaint — every decision comes from candle structure you can see and verify on the chart. The double requirement of a gap failure and a structure break is a meaningful filter that historically helps avoid trading every minor poke through a void. Passive limit entries also mean you only participate when price retraces to a defined level, and the break-even trail offers active management that many simpler gap systems lack.

The limitations are equally important to understand. Continuation systems built on break-of-structure can suffer in ranging or choppy markets, where price repeatedly fakes breaks and reclaims voids — generating cancelled orders or stop-outs. Limit entries that wait for a retrace may miss strong, one-directional moves entirely when price never comes back to fill. The fixed reward-to-risk target does not adapt to volatility, so the same RiskReward setting may be too tight in trending conditions and too ambitious in quiet ones. Parameter choices like EntryDepth, MinGapFactor, and SwingStrength interact in non-obvious ways, and over-tuning them to past data may not carry forward. As with any EA, spread, slippage, and broker stop-level rules can materially change real-world behaviour versus a clean backtest.

Risk Management Tips

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