Engulfing Candle Scan

I'm hoping for a scan that will identify any engulfing candle that is equal to or of greater height =/> than the candle that precedes it. Thanks.

Hi AlleyCat,

My understanding from the description is that you want a bullish engulfing signal candle that is also greater than or equal in height to the previous bar (high equal to or above the previous high).

Your information isn't completely clearcut because "greater height" could mean that
the current high is higher than the previous high or
it might mean the high minus low length of the current bar is greater than the high minus low length of the previous bar or
it could mean that the high and low of the current bar engulfs the high and low of the previous bar.

I've observed that engulfing is sometimes thought to mean that the high and low of the current bar engulfs the high and low of the previous bar, but the standard definition is simply that the body of the current bar engulfs the previous bar's body.

The given description sounds like:
(1) Produce a signal when a bullish engulfing candle has formed (current body engulfs body of previous candle) and (2) the current high is greater than or equal to the high of the previous bar (high >= high[1]).

Here is a chart and code for this... set BullEngulfer to Is True for scans.

Screenshot (1724).png

Code:
# BullishEngulfing_CandleTall
# Question from AlleyCat
# (1) Adds arrow when a bullish engulfing candle has formed (current body engulfs body of previous candle) that (2) also has a high greater than or equal to the high of the previous bar.
# Engulfing is defined here to mean the body of the current candle is equal to or greater in size than the body of the previous candle. This version doesn’t require the previous candle to be a bearish one or that the current candle’s body be X% larger than the body of the previous bar or that the current close be above a moving average or that the slope of a moving average be up, etc. though such additions might be helpful.

def UpClose = close > open;
def TallHeight = high >= high[1];

def EngulferClose = if close[1] < open[1] then close >= open[1] else if close[1] > open[1] then close >= close[1] else double.NaN;

def EngulferOpen = if close[1] < open[1] then open <= close[1] else if close[1] > open[1] then open <= open[1] else double.NaN;

plot BullEngulfer = UpClose and TallHeight and EngulferClose and EngulferOpen;

BullEngulfer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BullEngulfer.SetDefaultColor(Color.MAGENTA);
BullEngulfer.SetLineWeight(4);
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thread starter Similar threads Forum Replies Date
D Reverse Engulfing Indicator Questions 5
Lone Wolf Is This An Engulfing Indicator? Questions 8
T Engulfing Bars Questions 18
K Multi-bar Engulfing Pattern Questions 21
C Previous Periods H/L drawn at Candle Questions 2

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
252 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top