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 Engulfing Pivot Reversal is a pure price-action trading strategy built around two classic tools: floor pivot points (the PP, R1, S1, R2 and S2 levels that intraday desks use as a reference grid) and the engulfing candlestick pattern (a candle whose body fully swallows the prior candle's body, signalling a shift in short-term momentum). It is a mean-reversion scalping style at heart — it fades price into a known support or resistance level and aims for a quick move back toward the central pivot — with a distinctive breakout hedge layered on top for protection. Notably, it uses no indicators at all: no moving average, RSI, ATR or Bollinger Bands. Every decision is derived from raw candle geometry and the pivot grid.
The strategy is designed for liquid, range-respecting markets where price repeatedly tests pivot levels and then either rejects them or breaks through. Think of a major FX pair such as EUR/USD or AUD/USD, or gold (XAU/USD), on intraday timeframes like M15, M30 or H1. In these conditions, pivot levels are widely watched, so reactions around them tend to be meaningful rather than random.
As a learning tool, the Engulfing Pivot Reversal is well suited to traders who want to study how support/resistance, candlestick confirmation, and risk-offsetting hedges can be combined into a single rules-based system. It is best viewed as a strategy analysis — a way to understand how a level-fade can be structured and how a "failed level" can be managed — rather than as a shortcut to results. Treat it as a framework for studying market structure, not a promise of any particular outcome.
How It Works
The strategy recomputes its pivot grid on every closed bar and only hunts for new trades when it is completely flat. Here is the logic in plain English.
Building the pivot grid
- Over the last
PivotLookbackclosed bars, the strategy finds the highest high (H), the lowest low (L), and the most recent close (C). - It then calculates standard floor pivots:
PP = (H + L + C) / 3,R1 = 2·PP − L,S1 = 2·PP − H,R2 = PP + (H − L), andS2 = PP − (H − L). - The pivot range (H − L) is used to size every buffer and target, so distances scale automatically to any symbol or timeframe — there is no hard-coded pip value.
The long (buy) entry — the strategy signals a setup when:
- The just-closed candle dips into the S1 support zone (its low reaches at least
ZoneFracof a range toward S1). - That candle is a bullish engulfing — the prior candle was bearish, the current one is bullish, and its body fully engulfs the prior body.
- The candle closes back above S1, indicating support has been reclaimed.
- The take-profit aims at the central pivot PP (a mean-reversion scalp). The stop-loss sits beyond the hedge trigger, so the hedge always engages before the base stop is hit.
The short (sell) entry is the mirror image: a bearish engulfing candle pokes into the R1 resistance zone and closes back below R1, with a take-profit aiming down at PP.
The signature hedge mechanic
- Fading a level has one fatal failure mode: the level fails and price keeps running.
- While the single base leg is open, if price travels
HedgeFracof a range beyond the rejected level, the level is deemed to have failed. - The strategy then opens an opposite breakout leg — a genuine locked hedge that rides the very move that beat the base trade, aiming at the next pivot (S2 for a failed support, R2 for a failed resistance).
Exits
- Every leg carries its own structural stop-loss and take-profit, managed by the engine.
- Once both legs are live, the strategy closes everything the instant net floating profit reaches
BasketTpMoney— the hedge's "bail-to-green" exit. - Because each leg has its own stop, per-leg risk is capped and there is no separate basket stop-loss.
A spread filter (MaxSpreadPoints) blocks new entries when the spread is too wide, helping avoid poor fills during illiquid periods.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| PivotLookback | 20 | 5 | 150 | Number of closed bars whose high/low/close define the floor pivots. |
| ZoneFrac | 0.20 | 0.02 | 0.80 | How close to a pivot the engulfing candle's wick must reach, as a fraction of the pivot range. |
| HedgeFrac | 0.25 | 0.05 | 1.50 | Distance beyond the rejected level that confirms it has failed and triggers the hedge. |
| StopFrac | 0.25 | 0.05 | 2.00 | Padding placed beyond the engulfing extreme (and the hedge trigger) for the base stop-loss. |
| ReclaimFrac | 0.30 | 0.05 | 1.50 | Hedge invalidation pad: if price reclaims the failed level by this much, the hedge is wrong. |
| MinRewardFrac | 0.50 | 0.10 | 3.00 | Minimum reward distance for any take-profit, as a fraction of the pivot range. |
| BasketTpMoney | 30.0 | 5.0 | 2000.0 | Net floating profit (in account currency) at which the whole basket is closed. |
| MaxSpreadPoints | 50 | 0 | 500 | Skip new entries while spread (in points) exceeds this value (0 disables the filter). |
| Lots | 0.10 | 0.01 | 1.00 | Volume of the base reversal leg. |
| HedgeLots | 0.10 | 0.01 | 1.00 | Volume of the hedge breakout leg. |
| Magic | 7311 | 0 | 9,999,999 | Magic number used to identify this EA's positions. |

Recommended Chart Settings
The Engulfing Pivot Reversal was designed for liquid, range-respecting FX majors such as EUR/USD or AUD/USD, and for XAU/USD (gold), on intraday timeframes of M15, M30 or H1. These are markets where pivot engulfings and false breakouts tend to alternate, which is the environment the logic is built to read.
Because the strategy sizes all of its buffers from the pivot range rather than fixed pips, it will technically run on any symbol and any timeframe selected at backtest time. That flexibility is a feature, but it is not a guarantee — results will vary significantly across different instruments and market conditions. Always test a configuration on the specific symbol and timeframe you intend to use before drawing any conclusions.
How to Install on MetaTrader 5
- Download the
EngulfingPivotReversal.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 involves trade-offs, and an honest assessment matters more than a sales pitch.
Strengths of this approach
- It is built on transparent, well-understood concepts — floor pivots and engulfing candles — so its behaviour is easy to study and explain.
- The pivot-range-based sizing means it adapts to volatility without manual pip tuning.
- The hedge mechanic directly addresses the classic failure mode of level-fading: instead of absorbing a runaway loss, it attempts to ride the breakout that beat the base trade.
Known limitations
- Mean-reversion strategies struggle in strong trends. When a level fails, the hedge is designed to help — but if price whipsaws back and forth across the level, both legs can be tested unfavourably.
- A locked hedge ties up margin on both legs simultaneously and may incur additional swap and spread costs.
- The "bail-to-green" basket exit depends on price moving far enough for the hedge to recover the base leg; in choppy, directionless conditions that may take time or not occur within a useful window.
- Pivot levels are only as meaningful as the market's respect for them. In thin or news-driven sessions, levels can be ignored entirely.
This system is best treated as an educational case study in combining support/resistance, candlestick confirmation, and hedging — not as a finished, hands-off solution.
Risk Management Tips
Sound risk management is the foundation of responsible trading, regardless of the strategy:
- Position sizing: Keep your
LotsandHedgeLotsmodest relative to account size, and remember that a hedge means two positions can be open at once. - Risk per trade: A common educational guideline is to risk no more than 1–2% of your account on any single setup. Size your lots so the structural stop-loss stays within that limit.
- Use a demo account first: Test the strategy thoroughly in MT5's Strategy Tester and on a demo account before considering any live use.
- Understand drawdown: Study how the strategy behaves during losing streaks and choppy markets, not just favourable ones. The maximum drawdown you can tolerate emotionally and financially should guide your settings.
- Account for costs: Spread, swap, and slippage all affect real-world outcomes — especially for a scalping style that takes frequent trades and holds hedged pairs.
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: EngulfingPivotReversal.ex5 (2 downloads)
- Source Code: EngulfingPivotReversal.mq5 (3 downloads)
- Documentation: EngulfingPivotReversal.pdf (2 downloads)