Blog / Strategy
Strategy

Fair Value Gap Runner

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 Fair Value Gap Runner is a price-action continuation strategy built around a single chart pattern: the fair value gap (FVG), also known as an imbalance. A fair value gap is a three-candle footprint that appears when price moves so quickly in one direction that a "vacuum" of untraded price is left behind — the wick of the first candle never overlaps the wick of the third candle. The Fair Value Gap Runner is a trend/momentum continuation strategy that waits for price to retrace into one of these gaps and then trades in the direction of the original impulse.

What makes this approach distinctive is that it uses no technical indicators at all. There is no moving average, RSI, MACD, or oscillator involved. Every decision — whether a gap exists, how strong the impulse was, how large the gap is, and where the stop-loss and take-profit go — is measured purely from raw candle geometry (the highs, lows, opens, and closes). The only "average" in the code is a plain mean candle range used to scale the strategy's thresholds to current volatility, so that the same settings adapt to quiet and active markets alike.

As a learning tool, the Fair Value Gap Runner is well suited to traders who want to study institutional-style price-action concepts such as imbalances, liquidity gaps, and momentum continuation without leaning on lagging indicators. It is designed for liquid instruments like EUR/USD or XAU/USD (gold) on the M15 (15-minute) timeframe. Treat it as a structured way to understand how gap-fill mechanics work — not as a profit opportunity.

How It Works

The strategy acts only once per newly closed candle, and it holds a maximum of one position at a time. On each new bar it first calculates the average candle range over a recent window of bars to gauge volatility, then scans recent candles for a fresh, untapped fair value gap. Here is how the logic flows in plain English:

Entry: When a bullish gap is tapped and held, the strategy signals a long (buy) at the current ask price. When a bearish gap is tapped and held, it signals a short (sell) at the current bid price.

Stop-loss logic: For a long, the stop is placed just below the lower of the gap base and the trigger candle's low, minus a small volatility buffer (BufferFrac × average range). For a short, it is the mirror — just above the gap base or the trigger candle's high, plus the buffer. This places the stop on the far side of the structure that is supposed to hold.

Take-profit logic: The target is set at a fixed reward-to-risk multiple. The distance from entry to stop (the risk) is multiplied by RiskReward and projected in the trade's direction. With the default of 2.0, the strategy seeks two units of reward for every one unit risked.

fair value gap 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 trade size in lots for each position.
ImpulseFactor 1.20 0.50 3.00 Minimum size of the middle (impulse) candle's body, as a multiple of the average candle range. Higher values demand a stronger thrust.
MinGapFactor 0.25 0.05 1.50 Minimum gap height, as a multiple of the average candle range. Higher values ignore small gaps and require larger imbalances.
RiskReward 2.0 1.0 5.0 Reward-to-risk multiple for the take-profit. A value of 2.0 targets twice the stop distance.
ZoneExpiry 12 2 40 Maximum age (in bars) a gap may have and still be considered tradable. Older gaps are ignored.
LookbackRange 20 10 60 Number of recent candles used to compute the average range (the volatility yardstick).
BufferFrac 0.20 0.00 1.00 Extra stop-loss padding beyond the gap edge, as a multiple of the average candle range.

(The strategy also uses an internal Magic number, default 7733, to identify and manage its own trades. This is a bookkeeping value, not a trading parameter.)

Recommended Chart Settings

The Fair Value Gap Runner was designed for EUR/USD or XAU/USD (gold) on the M15 (15-minute) timeframe. These are liquid instruments where fair value gaps form regularly and tend to be respected. The logic is generic, so it can be applied to any liquid symbol or timeframe, but the default parameter values were chosen with M15 in mind. Bear in mind that gap behavior, volatility, and spread characteristics differ from one instrument and session to another, so results will vary across different market conditions. Always re-test the settings on the specific symbol and timeframe you intend to study.

Historical Backtest Results

Note: The figures below are from a historical backtest simulation. Backtests have inherent limitations — they do not account for slippage, requotes, spread widening, or psychological factors. These results should not be interpreted as a prediction of future performance.

No backtest data is available for this strategy at the time of writing. Once a historical simulation has been run, key figures — such as net profit, profit factor, win rate, maximum drawdown, and total trades — would be reported here as a labeled historical simulation, not as live trading results. Until then, you are encouraged to run your own backtest in the MetaTrader 5 Strategy Tester over a representative date range, and to forward-test on a demo account, before drawing any conclusions about the strategy's behavior.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every strategy, the Fair Value Gap Runner has clear strengths and equally clear limitations, and it helps to understand both.

Strengths. Because it uses no indicators, the logic is transparent and easy to audit — every signal traces back to candle geometry you can see on the chart. The volatility-scaled thresholds let one set of parameters adapt across calmer and busier periods. The "first tap only" and freshness checks are designed to avoid chasing gaps that have already been filled, and the fixed reward-to-risk structure enforces a defined risk on every trade.

Limitations. Fair value gaps are a momentum-continuation idea, so the approach naturally performs best in trending or impulsive conditions. In choppy, range-bound, or low-volatility markets, gaps may be smaller, fill cleanly, and reverse — meaning the continuation the strategy expects may not materialize. Because it trades only the first tap of each gap and holds one position at a time, it can be selective and may produce relatively few signals, which can lengthen the time needed to evaluate it. A fixed take-profit multiple also means the strategy does not adapt its target to changing structure, so some winners may reverse before reaching their goal. As always, news events, spread widening, and slippage can affect real-world fills that a backtest does not capture.

This is a tool for studying gap-fill mechanics, not a shortcut. Approach it with curiosity and rigorous testing rather than expectation.

Risk Management Tips

Sound risk management matters more than any single entry signal. 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