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 Swing Shelf Rejection Reversal is a pure price-action reversal strategy built around fractal swing highs and lows — the natural support and resistance "shelves" that price draws by itself. It uses no traditional indicators at all: no moving averages, no oscillators, no momentum tools. Instead, it reads raw candle geometry to detect when price has made a false break of a recent swing level and then snapped back inside it. In technical terms, a fractal swing point is simply a bar whose high (or low) is more extreme than a set number of neighbouring bars on each side, marking it as a local turning point.
This strategy is designed for markets that respect support and resistance and that frequently produce "stop hunts" — quick pokes beyond an obvious level that reverse almost immediately. These conditions are common in ranging or rotational markets, and around well-defined swing structure on most forex pairs and indices. Because every calculation is derived from bar highs, lows, opens, and closes, the logic is timeframe-agnostic: it runs the same way whether you apply it to a 15-minute, 1-hour, or daily chart.
As a learning tool, the Swing Shelf Rejection Reversal is well suited to traders who want to understand classic concepts such as springs, upthrusts, liquidity grabs, and rejection (pin-bar) candles in a transparent, rules-based form. Rather than treating it as a profit opportunity, think of it as a clean case study in how false breakouts and wick rejection can be defined mathematically and tested objectively. Frame your use of it as strategy analysis — a way to study how price-action reversals behave across different symbols and market regimes.
How It Works
The strategy maintains two "active shelves" — the most recent confirmed swing-high (resistance) and swing-low (support) — and waits for a single closed candle to reject one of them. It evaluates conditions once per bar, after the prior candle has fully closed.
Identifying the shelves (support and resistance):
- The strategy scans a candidate bar sitting
SwingLookbackbars back from the most recent closed bar, so it has an equal number of neighbours on each side. - If the candidate's high is strictly greater than the highs of all neighbours on both sides, it is confirmed as a swing high, and its high becomes the active resistance shelf.
- If the candidate's low is strictly lower than the lows of all neighbours on both sides, it is confirmed as a swing low, and its low becomes the active support shelf.
Long entry — bullish rejection of support:
The strategy signals a long when all of the following are true on the freshly closed candle:
- A support shelf currently exists.
- The candle is bullish (it closes above its open).
- The candle's low dips to or below the support shelf (the false break).
- The candle closes back above the support shelf (the snap-back).
- The lower wick is at least
WickRatioof the total candle range, confirming sellers were rejected.
Short entry — bearish rejection of resistance:
The strategy signals a short when all of the following are true:
- A resistance shelf currently exists.
- The candle is bearish (it closes below its open).
- The candle's high pokes to or above the resistance shelf.
- The candle closes back below the resistance shelf.
- The upper wick is at least
WickRatioof the total candle range, confirming buyers were rejected.
Stop-loss logic:
- For longs, the stop is placed just below the signal candle's low, offset by a buffer equal to
StopBufferFractionof the candle's range. - For shorts, the stop is placed just above the signal candle's high, with the same fractional buffer.
- This anchors risk directly to the rejection wick, so the stop sits beyond the level that proved the reversal.
Take-profit logic:
- The distance from entry to stop defines the trade's risk.
- The take-profit is set at
RewardRiskmultiplied by that risk distance, producing a fixed reward-to-risk target.
Trade management rules:
- Only one position at a time is allowed per symbol (tracked by the magic number).
- Once a shelf produces a trade, it is consumed so the same level is not re-traded repeatedly.
- The strategy acts strictly on closed bars, avoiding intrabar noise.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingLookback | 3 | 2 | 6 | Number of bars required on each side of a candidate pivot to confirm it as a swing high or low. Higher values demand more significant, less frequent shelves. |
| RewardRisk | 2.0 | 1.0 | 4.0 | The reward-to-risk multiple used to set the take-profit. A value of 2.0 targets twice the stop distance. |
| WickRatio | 0.5 | 0.3 | 0.7 | Minimum size of the rejection wick as a fraction of the candle's total range. Higher values require a more dominant, cleaner rejection. |
| StopBufferFraction | 0.15 | 0.0 | 0.5 | Extra stop-loss buffer beyond the signal candle's wick, expressed as a fraction of the candle's range. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots for each position. |

Recommended Chart Settings
Because the Swing Shelf Rejection Reversal derives everything from raw bar geometry, it is timeframe-agnostic and runs on whatever timeframe you select. As a practical starting point for study, many price-action traders examine intraday-to-swing horizons such as the 1-hour (H1) or 4-hour (H4) charts on liquid forex pairs (for example, EUR/USD), where swing structure tends to be well defined and false breaks are common. Higher timeframes generally produce fewer but more substantial shelves.
There is no single "correct" symbol or timeframe — the logic is general by design. Always remember that results will vary considerably across different instruments, sessions, and market conditions. Test on the specific symbol and timeframe you intend to study before drawing any conclusions.
How to Install on MetaTrader 5
- Download the
SwingShelfRejectionReversal.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
Strengths of this approach. The strategy is transparent and fully rules-based — every entry can be traced to objective candle geometry, which makes it an excellent teaching tool. Anchoring stops to the rejection wick gives each trade a clearly defined, structure-based risk. The fixed reward-to-risk target removes discretionary exit decisions, and consuming each shelf after use prevents the EA from firing repeatedly at the same level.
Known limitations. False-break reversal systems historically struggle in strongly trending markets, where a "break" of a swing level is genuine continuation rather than a stop hunt. In such conditions the strategy may take counter-trend trades that run straight into the stop. The requirement for a dominant rejection wick filters out many candles, so signals can be infrequent — periods of inactivity are normal. The strategy also uses a fixed lot size rather than dynamic position sizing, so risk per trade in account-currency terms will vary with the wick-defined stop distance.
Where it may underperform. Thin, choppy markets with erratic wicks can produce shelves that are quickly invalidated, and low-liquidity sessions may generate noisy signals. Parameter choices matter a great deal: a low WickRatio admits weaker rejections, while a high SwingLookback may identify shelves so slowly that the level is already stale. Treat this EA as a framework for studying false-break behaviour, not as a finished system to deploy without thorough, independent testing.
Risk Management Tips
Sound risk management is far more important than any single entry signal. Consider the following general principles as part of your education:
- Risk a small, fixed percentage per trade. Many educators suggest never risking more than 1–2% of account equity on any single position. Because this EA uses a fixed lot size, you may need to adjust the
Lotsvalue to keep risk proportionate to your account and the typical stop distance. - Understand drawdown. A series of losing trades is statistically normal for any strategy. Know the largest peak-to-trough decline you are willing to tolerate before you begin.
- Always test on a demo account first. Run the strategy on a demo or simulated environment until you fully understand its behaviour across different market conditions.
- Mind position sizing and leverage. Larger lot sizes magnify both gains and losses; leverage can erode an account quickly during adverse moves.
- Keep a trading journal. Recording why each trade triggered and how it resolved deepens your understanding of when the approach works and when it does not.
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: SwingShelfRejectionReversal.ex5 (2 downloads)
- Source Code: SwingShelfRejectionReversal.mq5 (4 downloads)
- Documentation: SwingShelfRejectionReversal.pdf (3 downloads)