The engulfing pattern is one of the most widely recognised two-candle reversal signals. A bullish engulfing occurs when a small bearish candle is completely engulfed by a larger bullish candle, suggesting buyers have overwhelmed sellers. The bearish engulfing is the mirror image.
An engulfing pattern is a two-candle formation where the second candle's body completely covers (engulfs) the first candle's body. The pattern comes in two variants — bullish and bearish — each signalling a potential shift in control between buyers and sellers.
Context matters more than the pattern itself. An engulfing candle at a key support or resistance level, or at the end of an extended move, carries far more weight than one occurring in the middle of a range.
A bullish engulfing forms when a small bearish candle is followed by a larger bullish candle whose body completely covers the prior body. The previous candle must be bearish (close < open) and the current candle bullish (close > open). Volume confirmation strengthens the signal.

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 - BuildTradingStrategies.com / TradeXecution.com
//@version=6
indicator("Bullish Engulfing Detector", overlay=true)
// Previous candle bearish
prevBearish = close[1] < open[1]
// Current candle bullish
currBullish = close > open
// Current candle's body engulfs previous candle's body
bodyEngulfs = open <= close[1] and close >= open[1]
// Only trigger on a confirmed/closed bar
bullishEngulfing = prevBearish and currBullish and bodyEngulfs and barstate.isconfirmed
// Draw a shape below the completed engulfing bar
plotshape(
bullishEngulfing,
title="Bullish Engulfing",
style=shape.triangleup,
location=location.belowbar,
text="BU",
size=size.small
)
A bearish engulfing is the inverse: a small bullish candle followed by a larger bearish candle whose body fully engulfs the prior body. It signals that sellers have overwhelmed buyers and is most significant at resistance levels or after an extended uptrend.

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 - BuildTradingStrategies.com / TradeXecution.com
//@version=6
indicator("Bearish Engulfing Detector", overlay=true)
// Previous candle bullish
prevBullish = close[1] > open[1]
// Current candle bearish
currBearish = close < open
// Current candle's body engulfs previous candle's body
bodyEngulfs = open >= close[1] and close <= open[1]
// Only trigger on a confirmed/closed bar
bearishEngulfing = prevBullish and currBearish and bodyEngulfs and barstate.isconfirmed
// Draw a shape above the completed engulfing bar
plotshape(
bearishEngulfing,
title="Bearish Engulfing",
style=shape.labeldown,
location=location.abovebar,
text="BE",
size=size.small
)
The basic detector flags every candle where the bearish body engulfs the prior bullish body — useful for scanning, but it catches many low-quality setups in choppy conditions. The strict version adds two extra filters:
Together these filters dramatically reduce false signals, especially on lower timeframes.

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 - BuildTradingStrategies.com / TradeXecution.com
//@version=6
indicator("Bearish Engulfing Detector - Strict", overlay=true)
// Previous candle bullish
prevBullish = close[1] > open[1]
// Current candle bearish
currBearish = close < open
// Current candle's body engulfs previous candle's body
bodyEngulfs = open >= close[1] and close <= open[1]
// Simple up move into the pattern
afterUpMove = close[1] > close[2]
// Current candle's full range engulfs previous candle's full range
rangeEngulfs = high >= high[1] and low <= low[1]
// Only trigger on a confirmed/closed bar
bearishEngulfing = prevBullish and currBearish and bodyEngulfs and afterUpMove and rangeEngulfs and barstate.isconfirmed
// Draw a shape above the completed engulfing bar
plotshape(
bearishEngulfing,
title="Bearish Engulfing",
style=shape.triangledown,
location=location.abovebar,
text="BE-S",
size=size.small
)
Engulfing patterns are visually clear, easy to code in Pine Script, and widely followed — which can create self-fulfilling behaviour at obvious levels. However, they produce many false signals in ranging markets and on lower timeframes where noise dominates. Always combine with at least one additional confluence factor such as volume, a key level, or a trend filter.