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 Shield is a pure price-action scalping strategy that combines two classic concepts — the engulfing candlestick pattern and rolling pivot levels — without using any technical indicators of any kind. An engulfing candle is a two-bar pattern where the most recent candle's body completely "engulfs" the body of the candle before it, a formation many traders study as a potential sign of shifting short-term momentum. The pivot frame (a central Pivot point with one resistance level and one support level) is rebuilt on every new bar directly from recent price highs, lows, and closes.
The strategy is designed for intraday, lower-timeframe scalping in markets that alternate between ranging and breakout behaviour. It looks for an engulfing candle that interacts with a meaningful price level, then interprets that interaction in one of two ways: a reversal when price tags a level and closes back through it, or a breakout when price closes decisively beyond a level. Because the levels are recalculated continuously, the strategy adapts its reference points as the market moves.
As a learning tool, the Engulfing Pivot Shield is well suited to traders who want to study how candlestick patterns can be combined with support/resistance logic, and who are curious about hedge-based risk structures. It is best viewed as a framework for understanding price-action mechanics — not as a shortcut to results. This article is a strategy analysis intended to help you understand how the components fit together.
How It Works
The Engulfing Pivot Shield evaluates the market once per freshly-closed candle and only searches for a new setup when the account is completely flat (no open positions and no pending orders for this strategy). Here is how the logic flows in plain English:
- Building the pivot frame: The strategy scans a lookback window of recent candles to find the highest high and lowest low. From these it derives the Pivot (
P = (High + Low + Close) / 3), the resistance level (R1 = 2·P − Low), and the support level (S1 = 2·P − High). These act as the reference levels for the session. - Detecting the engulfing candle: It checks the last closed candle against the one before it. A bullish engulfing forms when a down candle is followed by an up candle whose body fully covers it. A bearish engulfing is the mirror image.
- Measuring proximity: A "near" threshold is calculated from the engulfing candle's own range, scaled by the Proximity Factor. The strategy uses the candle's wick to test whether it tagged a pivot level within that threshold.
- Long signals: The strategy signals a long when a bullish engulfing reverses off support or the pivot (the wick tags the level and the close holds above it), or when a bullish engulfing breaks out decisively above resistance (R1).
- Short signals: The strategy signals a short when a bearish engulfing reverses off resistance or the pivot, or when a bearish engulfing breaks down decisively below support (S1).
- Ambiguity filter: If both a long and short condition resolve true at the same time — or neither does — the strategy stands aside and takes no trade.
Stop-loss logic: Stops are sized purely from the engulfing candle's range, not from any indicator. For a long, the stop is placed just below the engulfing candle's low, padded by a buffer derived from the Stop Buffer Factor. For a short, it sits just above the candle's high.
Take-profit logic: The risk (entry-to-stop distance) is multiplied by the TP Reward Ratio to set the take-profit target, giving a fixed reward-to-risk relationship on each trade.
The "Shield" hedge: When hedging is enabled, every entry is protected by an opposite stop order parked at the protective stop price. If the main idea fails and price runs the wrong way, the shield order converts the closed trade into a same-direction continuation position — an attempt to recover from a failed setup. If the main trade instead resolves cleanly (for example, by hitting take-profit), the strategy cancels the now-stale shield order so the account returns flat.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| PivotLookback | 20 | 8 | 60 | Number of recent candles used to build the rolling pivot frame (highest high / lowest low). Larger values produce slower, wider levels. |
| ProximityFactor | 0.60 | 0.10 | 2.0 | How close (as a fraction of the engulfing candle's range) price must be to a level to count as a "tag." Higher values loosen the proximity test. |
| StopBufferFactor | 0.25 | 0.00 | 1.0 | Extra padding beyond the engulfing candle's high/low for the stop-loss, expressed as a fraction of that candle's range. |
| TpRewardRatio | 1.50 | 0.50 | 4.0 | Reward-to-risk multiple. The take-profit distance equals the stop distance multiplied by this value. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots for both the main entry and the shield order. |
| HedgeEnabled | 1 | 0 | 1 | Toggles the protective shield order. Set to 1 to enable the hedge, 0 to trade the main entry only. |

Recommended Chart Settings
The Engulfing Pivot Shield was designed as an intraday scalping strategy, so it is most naturally applied to lower timeframes such as the M5 or M15 charts, where engulfing patterns form frequently and pivot levels refresh throughout the session. It can be tested on liquid forex pairs (for example, EUR/USD or GBP/USD) where spreads are tight and price action around support/resistance tends to be cleaner.
Keep in mind that the hedge structure requires a broker account that permits hedging (placing opposite orders on the same symbol). Results will vary considerably across different symbols, timeframes, and market conditions, and any settings should be validated on your own broker's data before drawing conclusions.
How to Install on MetaTrader 5
- Download the
.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
Like any approach, the Engulfing Pivot Shield has both strengths and limitations that are worth understanding before you study it on a chart.
Strengths:
- No indicators, no lag: Because it reads raw price action, the strategy reacts to candle structure directly rather than waiting for a smoothed indicator to catch up.
- Self-scaling risk: Stops and targets derive from the actual engulfing candle, so position parameters adapt to current volatility instead of using fixed pip distances.
- Defined logic: The dual reversal/breakout framework and the stand-aside ambiguity filter give the strategy clear, testable rules.
Limitations to keep in mind:
- Engulfing patterns are common and imperfect: A body engulf is a frequent formation, and many engulfing candles do not lead to follow-through. This can produce false signals, especially in choppy conditions.
- Pivot levels are reactive: Levels rebuilt from recent highs and lows can shift quickly during fast moves, which may place stops or targets in less-than-ideal locations.
- The hedge is not a safety net: The shield converts a failed trade into a continuation position, but a continuation can also fail. In whipsawing markets, hedge conversions may compound losses rather than recover them. Treat the shield as a structural feature to study, not as protection against loss.
- Scalping sensitivity: On lower timeframes, spread and slippage have an outsized effect on a fixed reward-to-risk model, and outcomes may differ markedly between brokers.
The strategy may underperform in directionless, low-volatility ranges where engulfing candles form without conviction, and in violently news-driven sessions where price gaps through both the main stop and the shield level.
Risk Management Tips
Risk management is the part of trading you have the most control over. Whether or not you ever run this EA live, these general principles apply:
- Risk a small, fixed fraction per trade. Many educators suggest risking no more than 1–2% of account equity on any single position so that a string of losses does not threaten the account.
- Size positions deliberately. The default
Lotsvalue is fixed; consider whether it matches your account size and the stop distances this strategy produces. Smaller is generally safer while you are learning. - Start on a demo account. Test the strategy in a risk-free simulated environment first so you can observe how the reversal, breakout, and shield mechanics behave before committing real capital.
- Understand drawdown. Every strategy experiences losing streaks. Know the maximum drawdown you are willing to tolerate, and remember that hedge-based logic can increase exposure when trades convert.
- Account for costs. Spreads, commissions, and swap fees all reduce net outcomes, particularly for a high-frequency scalping approach.
- Never trade money you cannot afford to lose. Leveraged trading can result in losses exceeding your initial deposit.
By treating the Engulfing Pivot Shield as a study in how candlestick patterns, pivot levels, and hedge structures interact, you will learn a great deal about price-action mechanics — regardless of any individual trade's outcome.
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: EngulfingPivotShield.ex5 (2 downloads)
- Source Code: EngulfingPivotShield.mq5 (3 downloads)
- Documentation: EngulfingPivotShield.pdf (3 downloads)