Engulfing Detector by RWBTradeLab
- Indicatori
-
Md Hasibul Kabir
Founder & Developer at RWBTradeLab.
I develop high-quality trading indicators, expert advisors (EAs),
and utility tools for MetaTrader 5.
My work focuses on precise calculations, non-repainting logic,
and clear visual market structure. - Versione: 1.0
Engulfing Detector by RWBTradeLab
A clean, non-repainting engulfing pattern detector for MetaTrader 5 that finds BOTH kinds of engulfing: the classic 2-candle Regular Engulfing and the extended multi-candle E-Regular Engulfing that most indicators miss. Every pattern is marked as a clear zone box on the chart — all from CLOSED candles only.
What This Indicator Does
The indicator detects 4 pattern types by CLOSE-based engulfing (a candle must CLOSE beyond the base candle's range — wicks alone don't count):
Regular Engulfing (2 candles)
- R Buy EG: a Red base candle, and the VERY NEXT candle is Green and CLOSES above the base high
- R Sell EG: a Green base candle, and the VERY NEXT candle is Red and CLOSES below the base low
E-Regular Engulfing (multi-candle)
- ER Buy EG: a Red base candle followed by a run of consecutive Green candles (Dojis are skipped, any Red candle cancels the run); the close ABOVE the base high must happen on the 2nd or later Green candle
- ER Sell EG: the exact mirror — a Green base, a run of Red candles, the close BELOW the base low on the 2nd or later Red candle
If the FIRST candle already engulfs the base, that is a Regular pattern — a Regular pattern on the same base always takes precedence over E-Regular.
Key Features
Professional Chart Display
- Every pattern is drawn as a ZONE BOX from the base candle to the confirmation candle, covering the base candle's full high-low range
- Boxes are drawn BEHIND the candles — price action always stays readable
- Clear text labels ("R Buy EG", "ER Sell EG", ...) placed below Buy zones and above Sell zones
- 4 separate box colors (Regular Buy/Sell, ER Buy/Sell) + Buy/Sell label colors — fully adjustable
- Label distance scales with the base candle's height (percentage based)
Non-Repainting Engine
- All patterns are calculated on CLOSED candles only — no running-candle logic
- Patterns are rescanned once per new bar, not on every tick (zero terminal lag)
- Automatic object cleanup — remove the indicator and the chart is spotless
Chart = Alerts, Always
- Drawing and alerts share the SAME detection rules
- An alert fires exactly when a pattern's confirmation candle closes — once per pattern, never repeated
- Whatever fires an alert is exactly what you see on the chart
Alerts (bar-close only, off by default)
- 4 alert types: R Buy EG, R Sell EG, ER Buy EG, ER Sell EG — each with its own On/Off switch
- 3 delivery channels: Popup, Push Notification, Email
- Every alert message includes pattern type, price, symbol, timeframe and time
Inputs
- Candle Length (closed candles) — how many recent closed candles are scanned (default 50)
- Show/Hide toggles: Regular Buy / Regular Sell / ER Buy / ER Sell boxes + text labels
- 4 box colors + Buy/Sell label text colors
- Text Offset from Box (% of base candle height, min 20)
- Label font and font size
- Full Alerts group: master switch, Popup / Push / Email, per-type switches
How to Use
Attach the indicator to any symbol and any timeframe — forex, gold, indices, crypto. A Buy Engulfing box marks a zone where sellers were fully absorbed by a close above the base high — watch it as a potential demand zone on retest. A Sell Engulfing box is the mirror supply zone. E-Regular patterns show the same absorption happening over several candles — often the smoother, more reliable version. For best results combine with higher-timeframe structure and your own trade plan.
Important Notes
- Push notifications require your MetaQuotes ID in MT5 (Tools -> Options -> Notifications); email alerts require SMTP settings
- Alerts work while the terminal is running
- Default box colors are tuned for dark charts — all colors are fully adjustable for light themes
- This indicator is a pattern-detection tool, not financial advice. Trading involves risk — always use proper risk management
Creator: RWBTradeLab
If you find this indicator useful, please leave a review and share your feedback.
