Engulfing

engulfingpatternsForge API 1

A body that covers the previous opposite body.

Inputs

NameTypeDefault
allow_equalbooltrue

Outputs

NameTypeRequiredDescription
engulfingeventOptionalcolor_down theme.down, color_up theme.up, shape diamond, style marker, where above_bar
Warm-up
1 bars (1 at the defaults)
Repaints
No
Parity
TA-Lib

Formula

body = |close - open|, range = high - low, upper wick = high - max(open, close), lower wick = min(open, close) - low

bullish: the first bar falls, the second rises, open <= the first close and close >= the first open, and the two bodies are not identical

bearish: the first bar rises, the second falls, open >= the first close and close <= the first open, and the two bodies are not identical

With equal prices off the comparisons are strict. Wicks are ignored. No gap between the bodies is required or forbidden. When the second open equals the first close, as it usually does on a market that trades without a break, the bar still counts while Equal prices count is on.

Found: 1 bullish, -1 bearish

A bar whose high equals its low, or that has a missing price, is never part of a pattern. Computed on the prices the bars are drawn with: on Heikin-Ashi or Renko bars those are the built candles.