Blog / Strategy
Strategy

Dual Boundary 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 Dual Boundary Rejection Hedge is a pure price-action range-trading strategy built around candlestick rejection patterns (often called pin bars or long-wick candles) at support and resistance boundaries. It uses no traditional indicators — no moving averages, no RSI, no MACD. Instead, it reads raw price structure: it maps a rolling support/demand floor and a resistance/supply ceiling from recent swing highs and lows, then looks for a candle that pierces one of those boundaries and snaps back inside, leaving a long rejection wick behind.

This approach is designed for ranging or consolidating markets — periods when price oscillates between a well-defined floor and ceiling rather than trending strongly in one direction. In those conditions, boundaries tend to hold, and rejection candles can mark the points where price turns away from the edge of the range. The strategy "fades" the move, meaning it trades against the test of the boundary in anticipation of a bounce back toward the middle of the range.

The defining twist is the built-in hedge. Ranges do not last forever, and sometimes a boundary that looks like support or resistance simply breaks. When that happens, the strategy does not just take the loss passively — it opens an opposing position in the direction of the breakout, attempting to recover from (and potentially profit on) the very move that invalidated the original fade. This makes the Dual Boundary Rejection Hedge a useful learning tool for anyone studying how support and resistance, candlestick rejection patterns, and hedging mechanics can be combined inside a single automated system. It is best treated as a study piece for understanding range behavior, not as a turnkey solution.

How It Works

The strategy evaluates the market once per completed bar, using the last fully-closed candle as its "signal bar." Before looking for any trade, it builds a range from the bars sitting behind the signal bar.

Building the range:

Long (buy) entry — the strategy signals a bullish rejection at support when:

Short (sell) entry — the strategy signals a bearish rejection at resistance when:

Stop-loss logic:

Take-profit logic:

The hedge:

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

Strategy Parameters

Parameter Default Min Max Description
RangeLookback 20 8 60 Number of completed bars behind the signal bar used to define the support/resistance range.
WickFraction 0.50 0.30 0.80 Minimum rejection-wick size as a fraction of the signal bar's full range (pin-bar quality filter).
BufferFraction 0.50 0.10 1.50 Boundary zone width and stop buffer, expressed as a fraction of the average bar range in the window.
RewardRatio 1.80 0.80 4.00 Take-profit distance as a multiple of the stop distance (risk-to-reward ratio).
HedgeMultiplier 1.50 1.00 3.00 Hedge volume relative to the base position when a boundary breaks against the fade.
Lots 0.10 0.01 1.00 Base order size in lots.
dual boundary rejection hedge EA — MQL5 source code

Recommended Chart Settings

This strategy was designed as a range/swing tool and tends to be studied on liquid forex pairs such as EUR/USD or GBP/USD, where support and resistance levels form cleanly. Intraday timeframes like M15, M30, and H1 are a natural starting point, since they produce enough rejection candles to study while filtering out a lot of the noise found on very short timeframes.

Keep in mind that boundary behavior differs dramatically between instruments and market regimes. A setting that maps ranges well on one pair during a quiet session may behave very differently on another pair or during high-impact news. Results will vary across different market conditions, and any timeframe or symbol choice should be tested thoroughly before live use.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths. The logic is transparent and easy to study — it is pure price action, so there are no hidden indicator calculations to interpret. The risk on each base trade is defined up front by a structural stop below support or above resistance, and the reward ratio is explicit. The hedge mechanism is an interesting answer to one of range trading's classic weaknesses: what to do when a boundary you faded turns into a breakout.

Known limitations. Range-fading strategies are, by design, fighting the move at the boundary. In strongly trending or breakout-heavy markets, boundaries break more often, and fades can be stopped out repeatedly before the hedge engages. The hedge itself is not a guaranteed rescue — it can also be stopped out if price whipsaws back through the broken level, and because HedgeMultiplier can increase the position size, a failed hedge can produce a larger loss than the original fade. The strategy also acts only once per bar and deploys only one hedge per cycle, so it will not adapt mid-bar to fast intrabar reversals.

Where it may underperform. Choppy, low-liquidity conditions, news-driven spikes, and sustained trends are all environments where rejection signals may indicate a bounce that never materializes. Wide spreads can also erode the edge on tighter stops. Treat this EA as an educational illustration of combining support/resistance, candlestick rejection, and hedging — not as a strategy that performs uniformly across all markets.

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