Blog / Strategy
Strategy

Engulfing Pivot 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 Engulfing Pivot Hedge is a pure price-action expert advisor (EA) for MetaTrader 5 that combines Japanese candlestick patterns — specifically the engulfing pattern and the pin bar — with a rolling pivot point framework (the classic P / R1 / S1 levels) to time entries around support and resistance. A pivot point is a calculated reference price derived from recent highs, lows, and closes; R1 and S1 are the first resistance and support levels projected from it. Notably, the strategy uses no traditional indicators at all: there are no moving averages, no RSI, and no MACD. Every decision is made directly from raw candle data, which makes the logic transparent and easy to study.

The strategy is designed to operate in two complementary market conditions. In a ranging or mean-reverting market, it looks for reversal signals — a bullish engulfing candle or bullish pin bar that rejects a support zone, or a bearish counterpart that rejects a resistance zone. In a trending or expanding market, it looks for breakout signals — a strong-bodied candle that closes decisively beyond R1 or below S1. Layered on top is an optional hedge leg: if the primary trade runs against you by a measured amount, an opposite-side position opens automatically to cap further drawdown.

As a learning tool, the Engulfing Pivot Hedge suits intermediate traders who already understand basic candlestick reading and want to see how pattern recognition, dynamic support/resistance, volatility-based position sizing, and hedging logic fit together in one coherent system. It is best treated as a study in price-action mechanics rather than a turnkey solution, and it should be explored on a demo account first.

How It Works

The strategy evaluates new entries only once per newly-closed bar, while hedge management runs on every tick so an adverse move is caught promptly. Here is how the logic unfolds:

engulfing pivot hedge MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
PivotLookback 20 10 60 Number of closed bars used to find the high/low for the pivot, R1, and S1 levels. Larger values produce broader, slower-moving zones.
RangePeriod 14 5 30 Number of bars averaged in the range proxy that sizes stops, targets, zones, and the hedge trigger.
ZoneFrac 0.50 0.10 2.0 Width of the support/resistance "zone" as a fraction of the range. Larger values make proximity checks and breakout buffers more lenient.
SlRangeMult 1.00 0.30 3.0 Stop-loss distance as a multiple of the range proxy.
TpRangeMult 1.50 0.50 5.0 Take-profit distance as a multiple of the range proxy.
HedgeTrigger 1.00 0.30 3.0 Adverse move, as a multiple of the range, that triggers the opposite-side hedge leg.
HedgeMult 1.00 0.50 2.0 Volume multiplier applied to the hedge leg relative to the primary lot size.
Lots 0.10 0.01 1.0 Primary trade volume in lots.
engulfing pivot hedge MT5 EA — MQL5 source code

Recommended Chart Settings

Because the Engulfing Pivot Hedge relies on clean candlestick patterns and pivot structure, it tends to be studied most naturally on the major forex pairs — such as EUR/USD or GBP/USD — where spreads are tight and price action is liquid. Intraday timeframes like the M15 (15-minute) or H1 (1-hour) chart give the pattern-and-pivot logic enough bars to form meaningful zones while still producing scalp-style targets. As always, the optimal symbol, timeframe, and parameter set depend on the instrument's behavior, and results will vary considerably across different market conditions. Treat any setting as a starting point for your own testing rather than a fixed recommendation.

How to Install on MetaTrader 5

What to Consider Before Using This EA

The Engulfing Pivot Hedge has several genuine strengths as a study tool. Its logic is fully transparent — with no indicator handles, you can trace every entry back to specific candle and pivot math. Sizing stops, targets, zones, and the hedge trigger from a shared volatility proxy is an elegant design that adapts thresholds to the market automatically. The dual reversal-and-breakout approach also means the system has a mode for both ranging and trending conditions.

There are equally important limitations to understand. Engulfing patterns and pin bars are common and can produce false signals, especially during low-volatility chop where candles overlap noisily. Pivot levels recalculated from a rolling window can drift, and price does not always respect them. The breakout leg can be vulnerable to "fakeouts" where price closes beyond a level only to snap back.

The hedging component deserves particular caution. Hedging does not eliminate risk — it can lock in a loss on both legs if price whipsaws, and it increases total exposure and commission costs. Some brokers and jurisdictions restrict hedging or apply FIFO rules that prevent it entirely. The strategy may underperform in strongly trending markets where reversal entries repeatedly fail, and in very quiet markets where the range proxy shrinks and stops sit uncomfortably tight. Forward-test thoroughly before drawing any conclusions.

Risk Management Tips

Sound risk management matters more than any single entry rule. Consider these general principles:

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