OPEN-SOURCE SCRIPT

Engulfing Look-back Alert

Updated
This script is an extension of the classical engulf pattern with added rules and user defined features.

Engulfing Candle Definition:
- Bullish Engulfing: Trade BELOW the prior candle's LOW and CLOSE ABOVE the prior candle's HIGH. Previous candle can be an up (bullish) or a down (bearish) candle
- Bearish Engulfing: Trade ABOVE the prior candle’s HIGH and CLOSE BELOW the prior candle’s LOW. Previous candle can be an up (bullish) or a down (bearish) candle

Features:
- Set the look-back period for engulfing candle high and low -> default = 1; e.g. Did the bullish eng candle trade below the lows of the last 3 candles and trade above the highs of the last 4 candles? Set the input values accordingly
- Choose time frame(s) engulfing candle is to be displayed on -> default = M/W/D/4H/1H/15M
- Ability to enable Alerts (includes time frame alert was triggered on): IMPORTANT - when setting alerts ensure to choose "ONCE PER BAR"; otherwise alerts will NOT trigger as intended
prntscr.com/r1yzbm
Release Notes
New features added:
- Multi-hour and multi-minute support
- Compare candle shadows -> Bullish Engulf: upper shadow can be bigger or smaller than lower by x%. Vice versa for Bearish Engulf
- Compare candle size relative to the previous x candles based on candle body and/or shadows
- Compare candle look back period based on candle close or candle shadow
Bearish EngulfingBullish EngulfingCandlestick AnalysiseducationalEngulfing Candle

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer