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 Stop Hunt Fvg Reversal strategy is a pure price-action approach that combines two well-known concepts from the "smart money" school of technical analysis: the liquidity sweep (often called a stop hunt) and the Fair Value Gap (FVG, a three-candle imbalance). It uses no traditional indicators — no moving averages, no oscillators. Instead, every decision is made from raw candle geometry and recent swing levels, which makes it a clean example for studying how institutional order-flow ideas can be translated into mechanical rules.
The core idea is intuitive. Large participants frequently push price just beyond an obvious swing high or low to trigger the protective stop-loss orders resting there ("raiding liquidity"), and then reverse sharply in the opposite direction. That violent reversal often prints a Fair Value Gap — a price zone the market moved through so quickly that one candle's range never overlapped the candle two bars later, leaving an "imbalance." The Stop Hunt Fvg Reversal strategy waits for price to retrace back into that gap and then signals an entry in the direction of the post-sweep move.
This strategy is best suited to traders who are studying market-structure and order-flow concepts and want to see them expressed as objective, repeatable conditions. It is designed for markets that produce clear swing extremes followed by impulsive moves — typical of liquid forex pairs and indices during active sessions. Treat it as a learning tool for understanding how a stop hunt and an FVG can be detected programmatically, rather than as a finished money-management system.
How It Works
The strategy evaluates only completed bars and acts on the first tick of each new candle. It works in two stages: first it arms a setup, then it waits for a retrace to trigger the entry. Here is the logic in plain English.
Detecting the setup (the "arming" stage):
- The strategy looks at the three newest closed candles — call them candle 1 (oldest), candle 2 (the displacement candle), and candle 3 (newest).
- It measures the average candle body over the
SweepLookbackwindow immediately before this trio. The displacement candle (candle 2) must have a body at leastDisplacementMulttimes that average — this confirms a strong, impulsive move rather than ordinary noise. - For a bullish setup, a Fair Value Gap must exist between candle 1's high and candle 3's low (candle 3's low sits above candle 1's high), and candle 2 must close bullish. The lowest point of the trio must also have pierced below the lowest low of the lookback window — meaning resting sell-side liquidity (stops below) was swept first.
- For a bearish setup, the mirror conditions apply: an FVG between candle 3's high and candle 1's low, a bearish displacement candle, and the trio's high pierces above the lookback window's highest high (buy-side liquidity swept).
- When these conditions align, the strategy records the gap boundaries and the swept extreme, then marks the setup as "armed."
Triggering the entry (the "retrace" stage):
- Once armed, the strategy watches each newly closed bar to see whether price pulls back into the Fair Value Gap.
- For a long, the strategy signals a buy when a bar's low dips into the bullish gap zone. For a short, it signals a sell when a bar's high pushes up into the bearish gap zone.
- If price instead closes back beyond the swept extreme (the trap level), the setup is considered failed and is discarded.
- An armed setup also expires automatically after
SetupExpiryBarsbars if no retrace occurs — this prevents stale signals from firing long after the original context is gone. - Only one position is held at a time. While a trade is open, any pending setup is dropped.
Stop-loss logic:
- The protective stop is placed just beyond the swept extreme — the price level where the trap was set. The strategy adds a small buffer equal to 25% of the gap height, so the stop sits slightly below the swept low (for longs) or slightly above the swept high (for shorts).
Take-profit logic:
- The take-profit is set at a fixed reward-to-risk multiple defined by the
RewardRiskparameter. The strategy measures the distance from entry to stop (the risk) and projects the target that many multiples away. With the default of 2.0, the target sits twice as far from entry as the stop.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SweepLookback | 10 | 4 | 30 | Number of bars in the swing window examined just before the three-candle trio. Defines how far back the strategy looks for the liquidity (stop) level that must be swept. |
| DisplacementMult | 1.6 | 1.0 | 4.0 | How large the displacement candle's body must be relative to the average body in the lookback window. Higher values demand a stronger impulsive move before a setup is armed. |
| RewardRisk | 2.0 | 1.0 | 5.0 | The reward-to-risk multiple used to place the take-profit. A value of 2.0 sets the target twice as far from entry as the stop-loss. |
| SetupExpiryBars | 6 | 1 | 20 | How many bars an armed setup remains valid while waiting for the retrace into the gap. After this, an untriggered setup is discarded. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade size in lots for each position. Adjust to match your account size and risk tolerance. |

Recommended Chart Settings
The Stop Hunt Fvg Reversal strategy is timeframe-agnostic by design — all of its reads use the chart's primary timeframe, so it adapts to whatever chart you attach it to. As a learning starting point, many traders study liquidity-sweep and FVG concepts on intraday charts such as the 15-minute (M15) or 1-hour (H1) timeframe, using liquid instruments like major forex pairs (for example EUR/USD or GBP/USD) or major index CFDs where swing extremes and impulsive displacement are common.
Because the logic depends on clear swing structure and impulsive candles, behavior will differ noticeably between fast and slow timeframes and between trending and ranging conditions. Results will vary across different market conditions, sessions, and instruments, so test across several before drawing any conclusions.
How to Install on MetaTrader 5
- Download the
StopHuntFvgReversal.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
Like any single approach, the Stop Hunt Fvg Reversal strategy has clear strengths and equally clear limitations. Understanding both is the point of studying it.
Strengths:
- It encodes a popular order-flow concept (sweep-then-reverse) into fully objective, mechanical rules, which removes discretionary guesswork and makes it easy to study and backtest.
- Using no lagging indicators, it reacts to structure as it forms rather than to smoothed averages of past prices.
- Built-in setup expiry and a "trap failed" check help filter out signals where the original context has broken down.
- A fixed reward-to-risk framework enforces a defined risk on every trade.
Limitations and weak spots:
- Not every spike beyond a swing level is a genuine liquidity sweep; in strongly trending markets, a "sweep" may simply be continuation, and the expected reversal may never come.
- Fair Value Gaps frequently get filled and then ignored — price entering a gap does not reliably mean a reversal, so false triggers are normal.
- The strategy trades one position at a time and waits for a retrace, so it can miss moves that run without pulling back into the gap.
- In quiet, low-volatility, or choppy conditions, the displacement filter may rarely trigger, producing long stretches with no trades — or, if loosened, a cluster of low-quality setups.
- Performance is sensitive to the
DisplacementMultandSweepLookbacksettings, and a configuration that historically suited one instrument may not transfer to another.
This strategy may underperform in ranging markets without clean swing structure, during major news-driven gaps, or on illiquid symbols with erratic candles. It is a study of a concept, not a guarantee of any particular outcome.
Risk Management Tips
Whatever you are testing, sound risk management matters far more than the entry logic itself. Keep these general principles in mind as you learn:
- Size positions deliberately. Rather than leaving the
Lotsvalue at its default, calculate a size so that a stop-out costs only a small, pre-decided fraction of your account. - Risk only 1–2% per trade. A common educational guideline is to never expose more than 1–2% of account equity to a single trade, so that a string of losses does not threaten the account.
- Start on a demo account. Run the EA on a demo or simulated account first to understand how often it trades and how it behaves in different conditions before considering any real capital.
- Understand drawdown. Every strategy experiences losing streaks. Study the depth and length of historical drawdowns so you are mentally and financially prepared for them.
- Account for costs. Spreads, commissions, and slippage can meaningfully change real outcomes versus an idealized backtest, especially on lower timeframes.
- Review regularly. Markets evolve. Periodically re-examine whether the parameters and assumptions still match current conditions.
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: StopHuntFvgReversal.ex5 (0 downloads)
- Source Code: StopHuntFvgReversal.mq5 (0 downloads)
- Documentation: StopHuntFvgReversal.pdf (0 downloads)