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 Confluence Engulfing strategy is a pure price-action reversal system that combines floor-trader pivot levels (objective support and resistance lines calculated from recent price) with engulfing candlestick confirmation. An engulfing candle is a two-bar pattern where the second candle's body completely covers the prior candle's body, a classic signal that momentum has shifted from buyers to sellers, or vice versa. By itself, an engulfing candle is noisy and can appear anywhere on a chart, so this strategy only acts when one forms at a meaningful, pre-calculated price level.
The core idea is confluence: two independent conditions agreeing at the same moment. A floor-trader pivot — the pivot point (PP), plus resistance levels R1 and R2 and support levels S1 and S2 — gives an objective map of where price has historically reacted. When a bullish engulfing candle forms right as price dips into and reclaims a support pivot, that suggests demand is actively defending the level. When a bearish engulfing candle forms as price pokes into and rejects a resistance pivot, that suggests supply is defending it. Requiring both signals together filters out the bulk of false engulfings that fire mid-range, where there is no level to react against.
This makes the Pivot Confluence Engulfing strategy a useful learning tool for traders who want to study how mean-reversion and support/resistance logic can be combined into a single, rules-based system. It is a reversal (counter-move) approach rather than a trend-following one, and it operates on a single timeframe. It is best suited to students of technical analysis who want to see how candlestick patterns and pivot mathematics can be encoded objectively, rather than to anyone seeking a hands-off shortcut.
How It Works
The strategy evaluates the market once per completed bar and manages a single position per symbol at a time. Here is how each part of the logic works in plain English:
- Building the pivots: The strategy looks back over a window of recently completed bars (set by
PivotLookback) that ends just before the current engulfing pair. From that window it takes the highest high, the lowest low, and the most recent close, then calculates the standard floor-trader levels: PP = (High + Low + Close) / 3, with R1, R2, S1, and S2 derived from PP and the high–low range. - Measuring volatility: An Average True Range (ATR) indicator — a measure of how much price typically moves per bar — scales the strategy's tolerances, stops, and targets. This keeps the logic adaptive across calm and volatile conditions instead of using fixed pip values.
- Confirming a decisive candle: The most recently closed candle must have a body (open-to-close distance) of at least
MinBodyAtrMult × ATR. A small, indecisive candle is ignored even if it technically engulfs the prior bar. - The long signal: The strategy signals a potential buy when a bullish engulfing candle forms (current candle closes up and covers the prior down candle's body) and that candle has dipped to within tolerance of a support pivot (S2, S1, or PP) before closing back above it. This is read as demand reclaiming the level.
- The short signal: The strategy signals a potential sell when a bearish engulfing candle forms and that candle has poked up to within tolerance of a resistance pivot (R2, R1, or PP) before closing back below it. This is read as supply rejecting the level.
- The touch tolerance: "Within tolerance" means the candle's wick came within
ConfluenceAtrMult × ATRof the pivot. This allows for the fact that price rarely touches a level to the exact tick. - Stop-loss logic: For a long, the stop is placed just below the lower of the two candles' lows, minus a small ATR buffer. If that distance is tighter than
StopAtrMult × ATR, the stop is widened to the ATR-based distance so it is never unreasonably close to entry. Short trades mirror this above the candles' highs. - Take-profit logic: The take-profit is set at a fixed reward-to-risk multiple of the stop distance, controlled by
TargetRR. With the default of 1.80, the target sits 1.8 times further from entry than the stop. - One trade at a time: While a position from this strategy is open on the symbol, no new signals are taken.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| PivotLookback | 24 | 8 | 96 | Number of completed bars that define the prior "session" window used to build the pivot levels. |
| AtrPeriod | 14 | 7 | 28 | Length of the ATR used for volatility-scaled tolerance, stops, and targets. |
| ConfluenceAtrMult | 0.40 | 0.10 | 1.00 | How close (in ATR units) the candle's wick must come to a pivot to count as a touch. |
| MinBodyAtrMult | 0.60 | 0.20 | 1.50 | Minimum engulfing body size as a fraction of ATR for the candle to be considered "decisive". |
| StopAtrMult | 1.20 | 0.50 | 3.00 | Stop-loss distance expressed as a multiple of ATR beyond entry. |
| TargetRR | 1.80 | 0.80 | 4.00 | Reward-to-risk ratio; take-profit distance equals TargetRR times the stop distance. |
| Lots | 0.10 | 0.01 | 1.00 | Fixed trade volume in lots. |

Recommended Chart Settings
The Pivot Confluence Engulfing EA is designed to run on a single timeframe — the chart you attach it to is the only timeframe it reads. Pivot-and-engulfing reversal logic is commonly studied on intraday charts such as the M15, M30, or H1, where engulfing patterns at pivot levels appear frequently enough to study but the bars are not so fast that noise dominates. Major forex pairs with steady liquidity and well-behaved ranges, such as EUR/USD or GBP/USD, are a sensible starting point for observation.
Because every tolerance, stop, and target is scaled by ATR, the strategy adapts to the volatility of whatever symbol and timeframe you choose. That said, results will vary considerably across different instruments, sessions, and market conditions. Always test on a demo account and on historical data before drawing any conclusions about how the settings behave on a given market.
How to Install on MetaTrader 5
- Download the .ex5 file 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 trading approach has strengths and weaknesses, and the Pivot Confluence Engulfing strategy is no exception. Understanding both sides will help you study it more effectively.
Strengths of this approach:
- Objective rules. Pivots are pure mathematics and engulfing patterns are clearly defined, so the strategy removes much of the subjectivity that plagues discretionary support/resistance trading.
- Built-in confluence filter. Requiring a pivot touch and an engulfing candle together discards many of the false patterns that fire in the middle of a range.
- Volatility-aware. Scaling tolerances and stops by ATR helps the logic behave consistently across quiet and active periods.
- Defined risk. Every trade ships with a stop-loss and a take-profit anchored to a fixed reward-to-risk ratio.
Known limitations:
- Reversal trades fight momentum. Counter-trend systems can suffer in strong, persistent trends, where a "resistance" pivot is broken cleanly rather than rejected. Engulfing reversals may repeatedly trigger against a runaway move.
- Pivots are not magic levels. They are derived from a rolling window of recent bars, not from institutional order flow. Price may ignore them entirely during news-driven or thin-liquidity conditions.
- Whipsaw risk in choppy ranges. Frequent engulfing candles near pivots can generate signals that reverse quickly.
- Single-timeframe blind spots. Because it reads only one timeframe, the strategy has no higher-timeframe context to tell it whether a reversal aligns with the larger trend.
The honest takeaway is that this EA is a structured way to study a well-known confluence concept, not a finished system to deploy unattended. Parameter choices, symbol selection, and market regime all materially affect how it behaves.
Risk Management Tips
Sound risk management matters far more than any single entry signal. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position. Adjust the
Lotsparameter so the stop distance translates into a risk amount you are comfortable with. - Always trade with a stop-loss. This EA places one automatically, but you should understand where it sits and why before committing real capital.
- Test on a demo account first. Run the strategy on a demo or in the Strategy Tester long enough to observe how it behaves across different market conditions before considering live use.
- Understand drawdown. Even a well-constructed strategy will experience losing streaks. Know the maximum drawdown you can tolerate emotionally and financially.
- Avoid over-optimization. Tuning parameters until historical results look perfect ("curve fitting") often produces settings that fail on new data. Favor robust, sensible values over fragile, perfect-looking ones.
- Diversify and size sensibly. Never concentrate excessive risk in a single symbol, trade, or strategy.
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: PivotConfluenceEngulfing.ex5 (4 downloads)
- Source Code: PivotConfluenceEngulfing.mq5 (6 downloads)
- Documentation: PivotConfluenceEngulfing.pdf (3 downloads)