Blog / Strategy
Strategy

Engulfing Pullback Continuation

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 Pullback Continuation strategy is a pure price-action trading system built around the bullish and bearish engulfing candlestick pattern — a two-candle formation where a larger candle's body completely "engulfs" the body of the candle before it. What makes this approach distinct is that it uses no indicators whatsoever: no moving averages, no RSI, no ATR, nothing but the raw open, high, low, and close of each closed bar. Every decision is made from candle structure alone.

Most traders first meet the engulfing pattern as a reversal signal — fading an exhaustion candle at the top or bottom of a move. This strategy deliberately flips that idea on its head. Here, the engulfing candle is treated as a trend-continuation trigger. The system looks for an established trend, waits for price to take a shallow breather against that trend (a pullback), and then uses the engulfing candle as the "resume" signal that the dominant side has re-taken control. In an up-trend it buys a shallow dip; in a down-trend it sells a shallow rally.

As a learning tool, this strategy suits traders who want to study trend-following with candlestick confirmation and structural stop placement. It is best viewed as a framework for understanding how pattern, market structure, and risk fit together — not as a shortcut. Because it is timeframe-agnostic and uses range-relative measurements, it can also help you appreciate why a single set of rules behaves very differently across symbols and conditions.

How It Works

The strategy evaluates conditions only on closed bars — it never reacts to the still-forming candle. Two reference candles drive every signal: the signal bar (the last fully closed candle, the engulfing trigger) and the prior bar (the candle immediately before it, representing the pullback being engulfed). It also measures market structure across two equal windows of TrendLookback bars: a recent window (the most recent L bars) and a past window (the L bars before those).

The strategy signals a long (continuation up) when all of the following are true:

The strategy signals a short (continuation down) using the exact mirror image: a down-trend structure (Lower High and Lower Low), a shallow rally, and a valid bearish engulfing candle.

Stop-loss and take-profit logic is fully structural and expressed as a fraction of the signal bar's range, so it auto-scales to any instrument or timeframe without needing point size or volatility inputs:

engulfing pullback continuation EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
TrendLookback 8 3 30 Half-window length in bars. Structure compares the most recent L bars against the L bars before them. Larger values demand a more developed trend before a signal can fire.
EngulfFactor 1.10 1.00 3.00 The signal candle's body must be at least this multiple of the engulfed prior body. Higher values require a more dominant, decisive engulf.
MinBodyFrac 0.50 0.20 0.90 Minimum signal-body size as a fraction of its full range. Enforces a decisive close and filters out doji-ish candles with large two-sided wicks.
MaxRetrace 0.70 0.30 1.00 The deepest the pullback may retrace the recent leg and still count as a shallow with-trend dip. A value of 1.00 effectively turns the shallowness filter off.
StopBufferFrac 0.15 0.00 1.00 Stop buffer placed beyond the signal candle's extreme, as a fraction of that bar's range.
RewardRatio 1.50 0.80 5.00 Take-profit distance as a multiple of the structural stop distance (the reward-to-risk ratio).
Lots 0.10 0.01 1.00 Order volume in lots for each trade.
Magic 8420 0 9,999,999 Magic number used to identify and manage this EA's positions separately from other trades.
engulfing pullback continuation EA — MQL5 source code

Recommended Chart Settings

The Engulfing Pullback Continuation strategy was designed with a trending instrument on an intraday frame in mind — for example, a stock index such as US500 or GER40, or a trending FX major, on the M15 or M30 timeframe. Because the code always uses the chart's primary symbol and timeframe and relies on range-relative measurements rather than fixed pip distances, it will run on whatever frame your backtest or chart selects.

Keep in mind that trend-continuation logic depends entirely on the market actually trending. The same settings that behave well on a directional index session can struggle on a choppy, range-bound symbol. Results will vary across different market conditions, instruments, and broker data feeds, so treat the recommended settings as a starting point for your own study rather than a fixed prescription.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every trading approach, this one has clear strengths and equally clear limitations, and an honest assessment of both is essential before you commit any capital.

Strengths. The logic is transparent and easy to reason about — there are no black-box indicators, just candles and structure. Because stops and targets are derived from the signal bar's own range, the risk framework adapts automatically to volatility and to different symbols without re-tuning point sizes. The combination of a structural trend filter, a shallowness filter, and a decisive-close requirement is designed to reject many low-quality engulfing patterns that a naive pattern scanner would take.

Limitations. Trend-continuation systems are, by definition, dependent on trends continuing. In sideways or whipsawing markets, the structure filter may still register a marginal Higher High/Higher Low while price has no real follow-through, leading to losing trades. The Higher-High-and-Higher-Low definition of trend is simple and can lag or misread complex structures. With a single position per magic and no trailing logic, the strategy fully commits each trade to its fixed stop and target — a runner that could have continued is capped at the take-profit, while a sharp reversal is only contained by the structural stop.

Where it may underperform. Expect more false signals during low-volatility consolidations, around major news releases, and on illiquid instruments with erratic candles. A MaxRetrace set too high effectively disables the shallow-dip filter and lets the system buy deep reversals it was not designed for. The strategy does not account for spread, slippage, swap, or commission beyond what your broker applies, so live behavior can differ meaningfully from idealized expectations.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Use the following general principles as you study this EA:

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