CDLENGULFING
CDLENGULFING
Summary
A two-candle reversal pattern where the second candle's real body engulfs the first candle's opposite-colored real body. Bullish (white engulfs black) or bearish (black engulfs white) reversal signal. Bullish reversal at +100/+80, bearish at -100/-80; ideally after a downtrend (bullish) or uptrend (bearish), which the code does not verify.
Notes
- Does not verify the prior trend (down for bullish, up for bearish) the reversal classically assumes.
Inputs
inOpen— Open price of each barinHigh— High price of each barinLow— Low price of each barinClose— Close price of each bar
Outputs
outInteger— +100/+80 (bullish, white engulfs black), -100/-80 (bearish, black engulfs white), 0 otherwise. Magnitude 100 when the second body strictly engulfs both ends; 80 when the bodies share an exact endpoint (open[i]==close[i-1] or close[i]==open[i-1])
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ✅ Candlestick i |
Implementation
TA-Lib Definition: cdlengulfing.c · cdlengulfing.yaml
| Native | File |
|---|---|
| C | ta_CDLENGULFING.c |
| Rust | cdlengulfing.rs |
| Java | Core_CDLENGULFING.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Engulfing Pattern, Engulfing, Bullish/Bearish Engulfing