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 FVG Momentum Pullback is a momentum-continuation strategy that combines a Fair Value Gap (FVG) — a price-imbalance pattern drawn from three consecutive candles — with a Relative Strength Index (RSI) momentum filter. A Fair Value Gap is the three-candle fingerprint of a fast, one-sided move: when a dominant "displacement" candle travels so quickly that the wick of the candle before it and the wick of the candle after it never overlap, it leaves behind an untraded pocket of price. The RSI is a classic momentum oscillator that measures whether recent buying or selling pressure is dominant on a 0–100 scale. Together, these two ideas answer two different questions: the gap tells the strategy where to look for an entry, and the momentum reading tells it whether that entry is still worth taking.
This strategy is designed for trending, liquid market conditions rather than choppy ranges. Its core logic is "buy the dip" — but a disciplined version of it. Instead of guessing where a trend will resume, the strategy waits for price to retrace back into the imbalance the thrust left behind, and it only acts while the RSI confirms the trend's momentum is still intact. Two independent filters — price structure and momentum — must agree before any trade is signalled, which is what helps screen out the false pullbacks that often trap continuation traders.
As a learning tool, the FVG Momentum Pullback is well suited to traders who want to study how imbalance-based "smart money" concepts can be combined with a traditional oscillator to build a rule-based, fully mechanical system. It is best understood as a framework for analysis and education, not as a profit opportunity. Every threshold in the strategy scales to the average candle range or to ATR, so it adapts to whatever symbol and timeframe you test it on.
How It Works
The strategy continuously tracks the single most-recent Fair Value Gap and waits for price to pull back into it with momentum confirmation. Here is how the logic unfolds:
- Detecting a bullish imbalance (up-gap): On each closed bar, the strategy inspects the last three candles. It flags a bullish FVG when the high of the oldest candle is below the low of the newest candle, leaving a clean gap between them. The middle candle must be bullish (close above open) and body-dominant — its body must make up a large enough share of its total range to count as a genuine thrust rather than an indecisive bar.
- Detecting a bearish imbalance (down-gap): The exact mirror — the low of the oldest candle is above the high of the newest candle, and the middle displacement candle must be bearish and body-dominant.
- Minimum gap size: The gap must be wide enough to matter. Its height must be at least
MinGapFracmultiplied by the average candle range over the recent lookback window, which filters out trivial imbalances. - The pullback entry (long): Once a bullish gap is active, the strategy waits for price to retrace down so the Ask re-enters the gap pocket. It then signals a market BUY only if the RSI is at or above the
TrendLevel— confirming the bullish momentum regime still holds. - The pullback entry (short): For a bearish gap, the strategy waits for price to retrace up into the pocket and signals a market SELL only if RSI is at or below
100 − TrendLevel. - Stop-loss logic: For a long, the stop is placed a fixed ATR buffer below the gap's base (the oldest candle's high), sized by
SlAtrMult. For a short, the stop sits an ATR buffer above the gap's base. This anchors risk to the structure that defined the trade. - Take-profit logic: The take-profit is set at
RewardRiskmultiplied by the measured stop distance, giving a fixed reward-to-risk target on every trade. - Trade management: Only one position per Magic number is held at a time, and only the single most-recent imbalance is tracked. A gap is abandoned if a bar closes through its far edge (the gap is considered failed) or if
ExpiryBarspass without a pullback. Each imbalance is traded at most once. The strategy also skips entries when the current spread exceedsMaxSpreadPoints.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| RsiPeriod | 14 | 7 | 28 | RSI smoothing period — the momentum gate. |
| TrendLevel | 50.0 | 40.0 | 60.0 | Momentum regime line: bullish pullbacks need RSI ≥ this value; bearish pullbacks need RSI ≤ 100 − this value. |
| AtrPeriod | 14 | 7 | 28 | ATR period used to size the structural stop buffer. |
| MinGapFrac | 0.25 | 0.05 | 1.50 | Minimum gap height as a fraction of the average candle range (defines a meaningful imbalance). |
| BodyDominance | 0.55 | 0.30 | 0.90 | Displacement candle body ÷ range — how one-sided the thrust must be. |
| SlAtrMult | 0.50 | 0.00 | 2.00 | Stop buffer beyond the gap's far edge, expressed in ATR multiples. |
| RewardRisk | 1.80 | 0.80 | 4.00 | Take-profit distance as a multiple of the structural stop distance. |
| ExpiryBars | 15 | 3 | 60 | Abandon an untouched imbalance after this many closed bars. |
| RangeWindow | 20 | 8 | 60 | Lookback for the mean candle range that scales the gap-size filter. |
| MaxSpreadPoints | 30 | 1 | 200 | Skip the trade if the current spread (in points) is wider than this. |
| Lots | 0.10 | 0.01 | 1.00 | Trade volume in lots. |
| Magic | 9273 | 0 | 9,999,999 | Unique identifier so the EA manages only its own trades. |

Recommended Chart Settings
The FVG Momentum Pullback is naturally at home on M15 to H1 timeframes and is designed for trend-prone, liquid instruments such as EUR/USD, GBP/USD, XAU/USD (gold), and major stock indices. These markets tend to produce the clean, one-sided displacement moves that create well-defined Fair Value Gaps, and their tight spreads suit the strategy's spread filter.
Because every threshold scales to the average candle range or to ATR rather than to fixed pips, the strategy will run on whatever symbol and timeframe you select. That said, results will vary considerably across different instruments, sessions, and market conditions. Always test any combination thoroughly on historical data and on a demo account before drawing conclusions.
How to Install on MetaTrader 5
- Download the .ex5 file 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
Like every mechanical system, the FVG Momentum Pullback has both strengths and limitations that you should understand before testing it.
Strengths. The dual-filter design is its main appeal: requiring both a structural imbalance and an aligned RSI reading means it ignores many of the random retracements that single-idea pullback systems chase. Anchoring the stop to the gap structure and the ATR gives every trade a logical, volatility-aware risk definition, and the fixed reward-to-risk target keeps the exit consistent. Because thresholds are expressed relative to candle range and ATR, the system adapts across symbols without manual pip tuning.
Limitations. Fair Value Gaps work best in trending environments. In choppy, range-bound conditions, gaps form and fail more often, and the "buy the pullback" premise can repeatedly catch falling or rising knives — momentum continuation systems historically struggle when a trend is quietly ending. The RSI gate reduces but does not eliminate this risk. The strategy also tracks only the single most-recent imbalance, so it may overlook valid gaps that form while another is active. During high-impact news, spreads can widen past the MaxSpreadPoints filter and otherwise valid setups will simply be skipped. No filter combination can anticipate every market regime.
In short, this EA is a structured way to study imbalance-plus-momentum trading, not a hands-off solution. Treat its signals as analysis to be observed and understood.
Risk Management Tips
Sound risk management matters far more than any single entry rule. Keep these general principles in mind as you study this strategy:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position, so that a string of losses does not threaten your account.
- Size positions deliberately. Set the
Lotsinput in line with your account size and the stop distance the strategy produces — never larger than your risk budget allows. - Always start on a demo account. Test the strategy in a risk-free simulated environment until you fully understand how it behaves before considering any live capital.
- Understand drawdown. Every strategy experiences losing streaks. Review the maximum historical drawdown in testing so you know what a normal rough patch looks like and can stay disciplined through it.
- Diversify and avoid over-leverage. Concentrating risk in one symbol or using excessive leverage can amplify losses quickly. Use leverage conservatively.
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: FVGMomentumPullback.ex5 (2 downloads)
- Source Code: FVGMomentumPullback.mq5 (2 downloads)
- Documentation: FVGMomentumPullback.pdf (3 downloads)