Scanning for Heikin-Ashi Bullish Candle with no lower wick


Category:
0
0

Hi Pete,

How do scan for a Heikin-Ashi Bullish candle with no lower wick? (Conversely, a Heikin-Ashi bearish candle with no upper wick)?

 

Marked as spam
Posted by (Questions: 15, Answers: 23)
Asked on September 15, 2018 10:25 am
2469 views
0
Private answer

I will begin by stealing some code from a previous post on this topic: https://www.hahn-tech.com/ans/two-consecutive-green-heikin-ashi-candles/

def haClose = ohlc4;
def haOpen = if haOpen[1] == 0 then haClose[1] else (haOpen[1] + haClose[1]) / 2;
def haHigh = Max(high, Max(haClose, haOpen));
def haLow = Min(low, Min(haClose, haOpen));

These four lines of code give us the complete Heiken-Ashi candle, O, H, L, C.

So what you want for a bullish candle is the close greater than the open and the open is equal to the low:

plot noWickBullish = haClose > haOpen and haOpen == haLow;

Likewise for the bearish candle:

plot noWichBearish = haClose < haOpen and haOpen == haHigh;

Put those all together, and adjust the plot to boolean arrows and we have what appears in the screenshot below.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on September 15, 2018 10:39 am
0

Awesome! Thanks that was exactly what I was looking for!

( at September 15, 2018 1:17 pm)
0

Hi Pete,

Would you be able to expand on this and show how to scan for the first bullish candle (no lower wick) after a set of 2 or more red candles as well as separate scan that looks finds the first bearish candle (no upper wick) after a set of 2 or more green candles? I don’t want anything returned that is later in trend. The scan would be meant to only catch the beginnings of trend shifts. Thanks!

( at January 18, 2019 7:17 am)
0

I think this would be handled best by posting it as a new question.

( at January 18, 2019 11:05 am)