Blog / Strategy
Strategy

Shelf Sweep Fade Hedge

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 Shelf Sweep Fade Hedge is a pure price-action mean-reversion strategy built around the classic support-and-resistance "shelf" — a horizontal level that price has tested more than once. Instead of relying on indicators such as a moving average, RSI, or ATR, every decision is read directly from the raw OHLC (open, high, low, close) data of each candle. A "shelf" here simply means a price level (equal highs for resistance, equal lows for support) that the market has bounced off before, proving that buyers or sellers have defended it.

The core idea is a fade: when price briefly pierces a proven level and then snaps back inside the range, the strategy treats that spike as a liquidity "sweep" — a stop-run that traps breakout traders — rather than a genuine breakout. It then trades against the spike, expecting price to revert back into the established range. A "sweep" is a quick poke beyond a level that fails to hold; a "rejection" is the long candle wick left behind when price is pushed back. This is the deliberate mirror image of a breakout system: rather than buying the break, it sells the failure of the break.

Because fades can be wrong when a level genuinely gives way, the strategy adds a distinctive second layer: a structural breakout hedge. If a later candle actually closes decisively beyond the faded shelf, that is strong evidence the level truly broke, so the strategy opens an opposite position to ride the real breakout it was just run over by. This makes the Shelf Sweep Fade Hedge most useful as a learning tool for traders who want to study how liquidity sweeps, candlestick rejection, and structural confirmation interact — and how a hedge can be used to manage a fade that fails. It is designed for liquid, range-then-break instruments and is best suited to students of price action rather than anyone seeking a hands-off solution.

How It Works

The strategy reads only closed candles and acts at most once per new bar. Here is the logic in plain English.

Defining the shelf (the level to fade):

The short setup (fading resistance): the strategy signals a sell when, on a freshly closed candle:

The long setup (fading support): the exact mirror — a sweep below support, a bullish reclaim with a dominant lower wick, plus the same momentum and optional confirmation filters.

Stop-loss logic: the stop sits just beyond the swept wick (the resistance high for shorts, the support low for longs) plus StopBufferPoints — the price that would prove the shelf has genuinely given way. The distance is widened if it falls inside the broker's minimum stop level.

Take-profit logic: the target is placed at RewardRisk multiplied by the stop distance, aiming to harvest the reversion back into the range. No indicator is used to size the target.

The hedge (structural breakout flip): while the primary fade is open, the strategy watches for a candle that closes beyond the faded shelf by HedgeBufferPoints. That close says the move was a real break, not a sweep — so it opens an opposite position of HedgeLots, with a retest-style stop just inside the broken shelf and a target of HedgeRewardRisk times that stop distance. When the primary finally resolves at its own stop or target, any surviving hedge is closed so the basket always returns flat — one clean lifecycle at a time. A spread filter (MaxSpreadPoints) blocks new entries when trading costs are unusually high.

shelf sweep fade strategy
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
StructureLookback 24 8 80 Number of bars used to define the support/resistance shelf to fade.
TouchTolerancePoints 60 5 600 How close (in points) a bar must come to the extreme to count as a "touch".
MinTouches 2 1 6 Minimum touches required for a level to qualify as a real shelf.
RejectionWickFactor 1.2 0.3 4.0 Rejection wick must be at least this multiple of the signal bar's body.
AvgRangePeriod 14 5 40 Window for the average bar range used by the momentum filter.
MomentumRangeFactor 1.0 0.3 3.0 Signal-bar range must exceed this multiple of the average range.
RequireEngulfing 0 0 1 Also require an engulfing of the prior body for confirmation (1=on, 0=off).
RequireFvg 0 0 1 Also require a 3-bar Fair Value Gap confirming the reversal (1=on, 0=off).
StopBufferPoints 40 0 500 Extra points beyond the swept wick for the protective stop.
RewardRisk 1.6 0.5 5.0 Take-profit as a multiple of the stop distance for the fade.
HedgeEnabled 1 0 1 Enable the structural breakout hedge (1=on, 0=off).
HedgeBufferPoints 60 5 1000 A close beyond the shelf by this many points confirms a real breakout.
HedgeStopBufferPoints 80 5 1000 Hedge stop sits this many points inside the broken shelf (retest stop).
HedgeRewardRisk 1.8 0.5 6.0 Hedge take-profit as a multiple of the hedge stop distance.
MaxSpreadPoints 80 5 400 Skip new entries while the spread (in points) is wider than this.
HedgeLots 0.10 0.01 1.0 Hedge volume (full-size ≈ market-neutral; smaller = partial).
Lots 0.10 0.01 1.0 Primary fade trade volume.
Magic 7714 0 9,999,999 Unique identifier for the EA's trades (hedge legs use Magic+1).
shelf sweep fade strategy — MQL5 source code

Recommended Chart Settings

The Shelf Sweep Fade Hedge was designed for liquid, range-then-break instruments such as EURUSD, XAUUSD (gold), or a major index. It is intended for intraday timeframes in the M5 to M30 range, where horizontal shelves form and get swept frequently enough to generate setups. Importantly, the strategy uses only the timeframe of the chart it is attached to — it never references a hardcoded higher timeframe — so the chart period you select is the period it trades. Results will vary considerably across different symbols, sessions, and market conditions, so treat any single configuration as a starting point for study rather than a finished setup.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of this approach. Because it is pure price action, the logic is transparent and easy to audit — there are no indicator settings hiding the decision. Fading proven levels after a liquidity sweep is a well-documented behavioral edge, and the multiple filters (touch count, rejection wick, momentum, optional engulfing and Fair Value Gap) are designed to weed out weak setups. The structural hedge is a thoughtful answer to a fade's single biggest weakness — a real breakout — and the strategy enforces a clean, one-trade-at-a-time lifecycle that always returns flat.

Known limitations. Mean-reversion fades are fundamentally counter-trend, which means they can struggle badly in strongly trending or news-driven markets where levels break and keep going. The hedge mitigates but does not eliminate this: a hedge only triggers after a confirmed close beyond the shelf, so the primary fade may already be losing by then, and a choppy "break-then-fail" sequence can stop out both legs. The strategy also trades infrequently, since it waits for a tested shelf, a sweep, a rejection, and a momentum candle to align. Default point-based buffers assume a particular instrument's volatility and may need adjustment for symbols that move differently.

Where it may underperform. Expect weaker behavior during persistent trends, low-liquidity sessions with erratic wicks, and around high-impact economic releases. As with any historical pattern, prior behavior of a level does not guarantee it will hold again.

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