Engulfing Failed Zone by RWBTradeLab
- Indicators
-
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. - Version: 1.10
- Updated: 2 September 2026
Engulfing Failed Zone by RWBTradeLab
A clean, non-repainting FAILED engulfing detector for MetaTrader 5. Most traders only look for engulfing patterns — professionals also watch what happens when an engulfing FAILS, because a broken pattern traps traders on the wrong side and often fuels the opposite move. This indicator finds those failures automatically, sorts them into 8 types, and marks the exact level that broke — all from CLOSED candles only.
What This Indicator Does
Step 1 — Engulfing Detection (internal engine)
The indicator first detects confirmed engulfing patterns by CLOSE (wicks alone don't count):
- Regular Engulfing (2 candles): the very next candle closes beyond the base candle's high/low
- E-Regular Engulfing (multi-candle): a run of same-color candles after the base (Dojis skipped, an opposite candle cancels); the engulfing close happens on the 2nd or later candle of the run
- A Regular pattern on the same base takes precedence over E-Regular
- Type 1: the pattern also raided the OPPOSITE side of the base candle before the close broke it — a liquidity sweep. On a Regular pattern this is tested on the confirming candle; on an E-Regular pattern any candle of the run may carry it
Those three facts — side, speed, sweep — give the 8 types this indicator reports:
R Buy, R Sell, ER Buy, ER Sell, T1 R Buy, T1 R Sell, T1 ER Buy, T1 ER Sell.
Step 2 — Failure Detection (the actual signal)
After a pattern is confirmed, the indicator watches what price does next:
- Buy EG Failed: after a confirmed Buy Engulfing, a Red candle CLOSES below the base candle's low — the bullish absorption is broken
- Sell EG Failed: after a confirmed Sell Engulfing, a Green candle CLOSES above the base candle's high — the bearish absorption is broken
A wick through the level is not enough; the close has to settle beyond it. The EARLIEST failure candle is used, and the failed zone is drawn from the base candle to that failure candle.
Key Features
Professional Chart Display
- Every failed pattern is drawn as a ZONE BOX from the base candle to the failure candle, covering the base candle's full high-low range
- The zone is coloured by what it means AFTER the failure: a failed Buy Engulfing leaves RESISTANCE behind, a failed Sell Engulfing leaves SUPPORT
- The box style tells you the type at a glance: solid border = Regular, dashed border = E-Regular, thick border = Type 1
- Type 1 zones are filled a step brighter than plain zones (adjustable), so swept patterns stand out
- The broken edge — the exact side of the base candle price closed through — is highlighted with its own line
- Boxes are drawn BEHIND the candles — price action always stays readable
- Clear text labels ("R Buy EG Failed", "T1 ER Sell EG Failed", ...) placed on the side the zone now works from
- Label distance scales with the base candle's height (percentage based)
Summary Panel
- A compact panel in the chart corner lists all 8 types with how many of each are currently on the scanned range
- Every cell is drawn as its own filled box with a thin grid line, so it reads the same on a white chart and on a black one
- The panel counts a type even while that type is hidden, so it tells you what is really there and not just what is drawn
- Four corner positions, adjustable font size and colours, and it can be switched off entirely
Non-Repainting Engine
- All patterns and failures are calculated on CLOSED candles only — no running-candle logic
- Zones 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 the failure candle closes — once per event, never repeated
- Whatever fires an alert is exactly what you see on the chart
Alerts (bar-close only, off by default)
- 8 alert types, one per failed pattern type, each with its own On/Off switch
- 3 delivery channels: Popup, Push Notification, Email
- Every alert message includes event, price, symbol, timeframe and time
Inputs
- Scan: Scan Length (closed candles) — how many recent closed candles are scanned (default 50)
- Pattern Types: an On/Off switch for each of the 8 failed types
- Zone Style: Buy failed zone colour (resistance), Sell failed zone colour (support), label colours, Type 1 extra emphasis, Highlight Broken Edge switch and its colour
- Labels: show labels, text offset from box (% of base candle height, min 20), font and font size
- Summary Table: show/hide, corner, font size, text colour, header background, cell background, grid colour
- Alerts: master switch, Popup / Push / Email, and a switch per failed type
How to Use
Attach the indicator to any symbol and any timeframe — forex, gold, indices, crypto. A Buy EG Failed zone means bulls tried to take control and got rejected — trapped buyers above often accelerate the move down, and the zone itself can act as resistance. A Sell EG Failed zone is the mirror: trapped sellers and potential support. Type 1 failures are the ones where the pattern had already swept the opposite side before it formed, so its failure traps a wider group of traders. Failed zones pair perfectly with the RWBTradeLab Engulfing Detector — one shows the pattern, the other shows its fate. 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 colours are tuned for dark charts — all colours are fully adjustable for light themes
- This indicator is a pattern-analysis 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.
