Blog / Strategy
Strategy

Perimeter Rejection 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 Perimeter Rejection Hedge is a pure price-action support and resistance strategy that trades by fading rejections at recently established price boundaries, with a built-in protective breakout hedge. It uses no technical indicators of any kind — no moving averages, no RSI, no ATR, no Bollinger Bands, and no formula-based pivots. Instead, every level and threshold is read directly from raw price bars, making it a clean case study in how to build a system from market structure alone.

The strategy is designed for range-bound or consolidating markets, where price repeatedly tests a ceiling and a floor that the market has recently respected. It identifies these boundaries — together called the "perimeter" — as the highest high and lowest low over a rolling window of closed bars. When price pokes into one of those boundaries and then closes back inside the range with a clear rejection wick, the strategy signals a counter-trend (mean-reversion) trade back toward the middle of the range.

This makes it most suitable as a learning tool for traders who want to understand support/resistance trading, rejection candle patterns, and the concept of hedging a failed setup. The protective hedge component, which activates only when the boundary breaks, illustrates a risk-recovery idea that goes beyond a plain support/resistance fade. It is a strategy worth studying rather than a shortcut, and it rewards a careful reading of how each rule connects to the next.

How It Works

The strategy reads only closed bars to avoid acting on incomplete information. It treats the last fully formed bar (shift 1) as the "signal bar" and builds its levels from the bars before it, so a touch is judged against pre-existing structure rather than against the signal bar itself.

Building the perimeter and the range unit:

Entry conditions (fading a rejection at the perimeter):

Stop-loss and take-profit (price-action sized, fixed at entry):

The hedge (recovery on a failed level):

perimeter rejection hedge strategy
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
Lookback 20 10 60 Number of closed bars used to build the rolling support/resistance perimeter and the average-range volatility unit.
TouchBufferMult 0.25 0.05 1.00 How close (in Range units) a wick must come to a level to count as a touch.
WickRatio 0.45 0.25 0.75 Minimum rejection-wick size as a fraction of the signal bar's full range.
SlMult 1.50 0.50 4.00 Primary stop-loss distance beyond the rejected level, in Range units.
TpMult 2.00 0.50 6.00 Primary take-profit distance back toward the middle of the range, in Range units.
HedgeTriggerMult 0.80 0.20 3.00 Break-through distance past the level that arms the breakout hedge, in Range units.
HedgeLotMult 1.50 0.50 3.00 Hedge volume as a multiple of the primary Lots.
MaxSpreadPoints 40 0 500 Skip new setups while the spread (in points) exceeds this value (0 = off).
Lots 0.10 0.01 1.00 Primary trade volume in lots.
Magic 7301 0 9,999,999 Unique identifier for the strategy's orders (hedge legs use Magic + 1).
perimeter rejection hedge strategy — MQL5 source code

Recommended Chart Settings

This strategy was designed with a liquid FX major such as EURUSD in mind, on the M15 or H1 timeframe, where clean ranges tend to form and breakouts tend to run. That said, the code reads only the timeframe the chart or backtest selects, so it will run on whatever timeframe you apply it to.

Because the perimeter and range unit are derived entirely from recent price action, the strategy adapts its level spacing to current volatility. Even so, results will vary across different market conditions, symbols, and brokers — spread, stop-level requirements, and the character of each market all influence how the rules behave. Always test on the specific symbol and timeframe you intend to study.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of this approach. The Perimeter Rejection Hedge is conceptually transparent: because it uses no indicators, you can see exactly why every trade triggers by looking at the chart. Its levels and distances scale with current volatility, so it does not rely on fixed pip values that go stale. The rejection-wick filter adds a confirmation requirement that helps screen out shallow touches, and the hedge introduces a structured response to the single most common failure mode of a support/resistance fade — the level simply breaking.

Known limitations. Mean-reversion systems like this one perform best in ranging conditions and tend to struggle in strong, sustained trends, where the perimeter breaks repeatedly. While the hedge is designed to recover from a clean breakout, a market that breaks, reverses, and breaks again (a "whipsaw") can stop out both legs. Holding two opposing positions also means two sets of spread and commission costs, and on some account types hedging may not be permitted at all. Finally, the strategy takes only one setup at a time, so it can sit idle through long stretches and may miss opportunities outside its narrow definition of a rejection.

The honest takeaway is that this is a tool for understanding range trading and hedging mechanics — not a finished system to deploy unexamined. Study how it behaves before drawing any conclusions.

Risk Management Tips

Sound risk management matters far more than any single strategy. Consider these general principles as you study this EA:

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