engulfing

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.engulfing(open: ArrayLike,high: ArrayLike,low: ArrayLike,close: ArrayLike,allow_equal: bool = True) -> np.ndarray

Engulfing: a body that covers the previous opposite body. Found: 1 bullish, -1 bearish.

Parameters

NameTypeDefault
openArrayLike
highArrayLike
lowArrayLike
closeArrayLike
allow_equalboolTrue

Indicator: Engulfing

Bullish: the first bar falls, the second rises, its open is at or below the first close and its close at or above the first open, and the two bodies are not identical. Wicks are ignored. No gap between the bodies is required or forbidden. With allow_equal off the open and close must be strictly beyond the first body.

Classpython
forge.ta.Engulfing(**inputs: Any) -> None

A body that covers the previous opposite body.

Inputs

NameTypeDefault
allow_equalbooltrue

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.