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 Pivot Rebound Hedge is a pure price-action reversal scalper built around two classic concepts: floor pivot levels and the engulfing candlestick pattern. Unlike most expert advisors, it uses no technical indicators at all — no moving averages, no RSI, no ATR, no Bollinger Bands. Every decision is made from raw candle geometry and a shelf of horizontal support and resistance levels that the strategy rebuilds on a fixed schedule. If you are learning how professional traders read price structure without lagging indicators, this strategy is a useful case study.
The "scalper" label describes its trading style: it looks for short, high-probability reversals where price pierces a pivot level, fails to break through, and snaps back into the range. A pivot level is a calculated horizontal price line (derived from a prior window's high, low, and close) that many traders watch as potential support or resistance. An engulfing candle is a reversal pattern where one candle's body completely covers the previous candle's body, signalling a possible shift in momentum. When these two ideas line up at the same price, the strategy treats it as a rebound signal.
What makes this approach distinctive is its built-in hedge. A rebound trade assumes the pivot holds. If price instead breaks decisively through the level, the original idea is wrong — so the strategy fires an opposite-side hedge to ride the breakout it failed to anticipate. This makes the Pivot Rebound Hedge a good educational tool for studying how mean-reversion and breakout logic can be combined in a single rules-based system. It is designed for liquid markets in intraday conditions, and it is best suited to traders who want to understand structure-based entries rather than chase a quick result.
How It Works
The strategy operates in two layers: a slow "bar" layer that acts once per closed candle, and a fast "reactive" layer that watches every tick for breakouts. Here is the logic in plain English.
Building the pivot map
- Every
RefPeriodbars, the strategy looks back over the just-closed reference window and records its highest high (H), lowest low (L), and final close (C). - It then computes five classic floor pivots that stay fixed until the next refresh:
P = (H + L + C) / 3,R1 = 2P − L,S1 = 2P − H,R2 = P + (H − L), andS2 = P − (H − L). - These five horizontal lines act as the session's support/resistance shelf — much like daily pivots stay put for the day, but computed on whatever timeframe you run.
Long (buy) entry — the strategy signals a support rebound when:
- The just-closed candle is a bullish engulfing candle (it closes higher than it opens, and its body fully covers the prior bearish candle's body).
- The candle's lower wick pierces one of the pivot levels (its low dips at or below the level) but its body closes back above that level — the level held as support.
- The candle's body is at least
MinBodyRatiotimes the size of the previous candle's body, confirming the move has conviction.
Short (sell) entry — the strategy signals a resistance rebound when:
- The just-closed candle is a bearish engulfing candle (it closes lower than it opens and engulfs the prior bullish body).
- The candle's upper wick pierces a pivot level (its high reaches at or above the level) but the body closes back below it — the level held as resistance.
- The same
MinBodyRatiobody-strength filter applies.
Stop-loss logic
- Stops are structure-based and fixed — there is no ATR or indicator-based trailing.
- For a long, the stop sits just below the lower of the candle's low or the pierced level, padded by
StopBufferFractionof the candle's range. For a short, it mirrors above the high. The strategy also clamps the stop to respect your broker's minimum stop distance.
Take-profit logic
- The take-profit is placed at a
RewardRatiomultiple of the structural risk (the stop distance). With the default 1.5, a trade risking 10 pips targets 15 pips — a quick scalp back into the range.
The hedge leg
- A rebound assumes the pivot holds. If price instead breaks through the level by
HedgeBreakFractionof the reference range, the level has failed and a genuine breakout may be underway. - The strategy then opens an opposite-side hedge, sized at
HedgeMultipliertimes the base lot, to ride the breakout and offset the losing rebound leg. - Only one hedge is fired per original position, and a hedge is skipped entirely if
HedgeMultiplieris set to 0.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| RefPeriod | 24 | 8 | 96 | Number of bars in each pivot reference window; the pivot shelf is rebuilt every RefPeriod bars. |
| RewardRatio | 1.5 | 0.5 | 4.0 | Take-profit distance as a multiple of the structural risk (the stop-loss distance). |
| StopBufferFraction | 0.30 | 0.00 | 1.50 | Extra stop-loss padding beyond the pierce wick, as a fraction of the signal candle's range. |
| MinBodyRatio | 1.00 | 0.50 | 3.00 | Engulfing strength filter; the signal candle's body must be at least this multiple of the prior body. |
| HedgeBreakFraction | 0.25 | 0.05 | 1.50 | How far beyond a failed pivot (as a fraction of the reference range) price must break before a hedge fires. |
| HedgeMultiplier | 1.50 | 0.00 | 3.00 | Hedge lot size as a multiple of Lots; set to 0 to disable hedging entirely. |
| Lots | 0.10 | 0.01 | 1.00 | Base trade volume in lots. |
| Magic | 7301 | 0 | 9,999,999 | Unique magic number so the EA can identify and manage only its own trades. |

Recommended Chart Settings
The Pivot Rebound Hedge was designed with liquid markets in mind. Its natural habitat is a major FX pair or gold on an intraday timeframe — for example EUR/USD or XAU/USD on the M15 (15-minute) chart — where pivot levels are widely watched and engulfing reversals tend to be clean. On these instruments the spread is typically tight, which matters for a scalping approach that targets relatively short moves.
That said, pivot behaviour and engulfing reliability differ across symbols, sessions, and volatility regimes. Results will vary across different market conditions, and a setting that suits one pair may behave very differently on another. Always test any symbol and timeframe combination on historical data and a demo account before drawing conclusions.
How to Install on MetaTrader 5
- Download the
PivotReboundHedge.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
Every strategy has strengths and trade-offs, and understanding both is part of trading education.
Strengths of this approach
- No indicator lag. Because decisions come from raw candle geometry and fixed pivots, signals are not delayed by smoothing calculations.
- Defined structure. Stops sit at logical price structure (beyond the pierce wick), and the reward is a clean multiple of that risk, which makes the risk on each rebound leg easy to reason about.
- A built-in plan for being wrong. The hedge leg gives the system a defined response when a pivot fails, rather than simply absorbing a full stop-out.
Known limitations
- Engulfing patterns are common but not predictive. A bullish or bearish engulfing candle at a pivot may indicate a reversal, but levels fail regularly — which is precisely why the hedge exists.
- Hedging adds exposure. When a hedge fires at
HedgeMultipliergreater than 1, your total open volume and margin usage increase. In choppy markets where price whipsaws around a pivot, both the rebound and the hedge can be tested. - Sensitive to spread and noise. As a scalper targeting modest moves, performance is affected by spread, slippage, and low-liquidity sessions.
- Fixed pivots can drift. Because the shelf only refreshes every
RefPeriodbars, a fast-trending market can leave the levels behind until the next recompute.
This strategy may underperform in strongly trending, news-driven, or thin markets where pivots are repeatedly broken rather than respected. It is best understood as a framework for studying price-action structure, not a finished solution to deploy untested.
Risk Management Tips
Sound risk management matters more than any single entry rule. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed percentage per trade. A common guideline is to risk no more than 1–2% of account equity on any single position, sizing
Lotsaccordingly — and remember the hedge can add to your total exposure. - Always start on a demo account. Run the EA in a risk-free simulated environment until you understand how it behaves across different sessions and volatility conditions.
- Understand drawdown. Even a well-designed system goes through losing streaks. Know the largest peak-to-trough decline you are willing to tolerate before you commit real capital.
- Account for costs. Spread, commission, and slippage all eat into a scalping strategy's results — factor them into any historical testing.
- Keep position sizing consistent. Avoid increasing lot size to "make back" losses; let the rules, not emotion, govern your exposure.
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: PivotReboundHedge.ex5 (3 downloads)
- Source Code: PivotReboundHedge.mq5 (5 downloads)
- Documentation: PivotReboundHedge.pdf (4 downloads)