Blog / Strategy
Strategy

Pivot Engulfing Scalper

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 Engulfing Scalper is a pure price-action expert advisor (EA) for MetaTrader 5 that combines structural pivot levels with the engulfing candlestick pattern to trade short-term momentum breakouts. It uses no traditional indicators — there is no moving average, RSI, ATR, or Bollinger Band anywhere in its logic. Instead, every decision is derived directly from raw candle data: the highest high, lowest low, and closing price of a recent window of bars. An engulfing candle is a two-bar pattern where the most recent candle's body completely covers and reverses the prior candle's body, a signal many traders read as a sudden shift in momentum.

The strategy is designed for liquid, momentum-prone markets — major forex pairs such as EUR/USD and GBP/USD, or gold (XAU/USD) — on intraday timeframes like M5, M15, or M30. These are the conditions where price repeatedly tests, breaks, and sometimes falsely breaks key structural levels. The EA is built around a single thesis: when a strong engulfing candle closes through a recent swing high or low, it may indicate that real momentum has shifted and that stop orders beyond the level are cascading.

As a learning tool, the Pivot Engulfing Scalper is well suited to traders who want to study breakout logic, candlestick structure, and hedge-based trade management in one self-contained system. It is best understood as a strategy analysis exercise — a way to see how pivots, patterns, breakouts, and a managed reversal hedge can be combined in code — rather than as a shortcut to results. Beginners should treat it as a study piece and always test on a demo account first.

How It Works

The strategy recomputes its key levels on every newly closed bar and only opens a fresh trade when the account is completely flat. Here is how the logic flows in plain English:

pivot engulfing scalper 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 5 150 Number of closed bars (before the signal candle) whose high/low/close define the pivot levels.
MaxExtendFrac 0.35 0.05 2.00 How far beyond the broken level the candle may close and still count as a fresh scalp (fraction of range).
FailFrac 0.25 0.05 1.50 Retrace back through the broken level, as a fraction of range, that proves the break false and triggers the hedge.
StopFrac 0.35 0.05 2.00 Extra base-stop pad placed beyond the hedge trigger (fraction of the pivot range).
RewardFrac 0.60 0.10 4.00 Minimum reward distance for the base and hedge take-profit (fraction of range).
ReclaimFrac 0.30 0.05 1.50 Hedge invalidation pad — if price reclaims the broken level by this much, the hedge is treated as wrong.
BasketTpMoney 25.0 5.0 2000.0 Net floating profit (account currency) at which the whole basket is closed.
BasketSlMoney 300.0 50.0 100000.0 Net floating loss (account currency) at which the whole basket is flattened.
MaxSpreadPoints 50 0 500 Skip new entries while spread (points) exceeds this value (0 = filter off).
Lots 0.10 0.01 1.00 Trade volume per leg, snapped to the symbol's volume step.
Magic 7733 0 9,999,999 Magic number used to identify and manage this EA's own positions.
pivot engulfing scalper MT5 EA — MQL5 source code

Recommended Chart Settings

The Pivot Engulfing Scalper was designed for liquid, momentum-prone instruments — major forex pairs such as EUR/USD and GBP/USD, or XAU/USD (gold) — traded on intraday timeframes of M5, M15, or M30. These markets tend to produce the alternating structural breaks and false breaks the strategy is built to read. Because the pivot range scales every buffer automatically, the EA runs on whatever symbol and timeframe you attach it to, but its behavior will differ across instruments and conditions. Results will vary significantly across different market environments — what works in a trending session may behave very differently in a tight, ranging one — so always study the strategy on each market before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

This strategy has some genuine educational strengths. Because it uses no indicators, its logic is transparent and easy to study line by line — every entry traces back to a candle pattern and a structural level you can see on the chart. The pivot-range scaling means it adapts its buffers to volatility without manual pip tuning, and the basket money management gives it a clear, rule-based exit on both the profit and loss sides.

It also has real limitations you should understand. Breakout strategies are vulnerable to choppy, sideways markets, where levels are broken and reclaimed repeatedly — exactly the conditions that produce false breaks. The hedge mechanic is designed to handle some of these, but hedging is not a cure-all: holding both directions locks in the spread cost and can still lose if a strong one-way trend runs after the hedge is deployed, which is precisely why the hard BasketSlMoney ceiling exists. The engulfing pattern itself is common and can produce signals that fail to follow through. Because the EA banks profits at a fixed money basket level, its risk-to-reward profile depends heavily on how BasketTpMoney and BasketSlMoney are set relative to your lot size — a small profit target paired with a large loss ceiling is a configuration that demands caution. Treat every parameter as something to test and understand, not to optimize blindly.

Risk Management Tips

Sound risk management matters more than any single strategy. 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