OPEN-SOURCE SCRIPT
Updated

Engulfing Strategy

574
Core Concept:
This is a price action trading strategy that identifies high-probability trade setups by combining multi-timeframe engulfing patterns with Current Market Price (CMP) validation.
How It Works:
H4 Setup Zone (Primary Timeframe)
Identifies Bullish or Bearish Engulfing patterns on the 4-hour timeframe
When detected, marks a zone at the high and low of the engulfed candle
This zone represents the initial setup area
M30 Trade Control Zone (Confirmation Timeframe)
Looks for Engulfing patterns on the 30-minute timeframe
These patterns must form within or near the H4 setup zone
Acts as a confirmation that the setup is valid
CMP Validation (Current Market Price)
Monitors where price is currently trading relative to the zones
Validates whether the pattern is still active or has been invalidated
Helps determine entry timing and stop loss placement
Trade Setup:
Bullish Setup: Red candle engulfed by green candles → Zone marked at red candle's high/low → Wait for M30 confirmation → Enter when CMP validates the pattern
Bearish Setup: Green candle engulfed by red candles → Zone marked at green candle's high/low → Wait for M30 confirmation → Enter when CMP validates the pattern
Release Notes
update to include weekly and daily and table status of W D H4 M30
Release Notes
update to consecutive candles logic
Release Notes
refined and fix bugs on consecutive candles
Release Notes
fix bugs
Release Notes
Weekly: Added consecutive candle logic + EF detection

✅ Daily: Added consecutive candle logic + EF detection

✅ H4: Added EF detection with proper engulfed candle level checking

✅ H1: Already had the working logic

✅ M30: Added EF detection with proper engulfed candle level checking
All timeframes now have:
Simple engulfing detection
Consecutive candle engulfing detection (scan back 10 bars)
Engulfing Failure (EF) detection with correct engulfed candle level checking
Proper else if statements to prevent false double detections
Release Notes
fixed more bugs

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.