Heikin-Ashi watchlist column for strong reversals (no wick)


Category:
0
0

Hi Pete. Is there a way to add one more label on the watch list column which states “Strong Reversal” if a red HA candle is followed immediately by a green HA candle with no wick or a green HA candle is immediately followed by a red candle with no wick? The current version of the column shows when the HA candle color changes, but I would like the label of strong reversal to take precedent over any other label if it occurs.

Heiken-Ashi watchlist for candle color, no wick and color change – Hahn-Tech, LLC

Attachments:
Marked as spam
Posted by (Questions: 19, Answers: 18)
Asked on August 19, 2024 4:51 pm
23 views
0
Private answer

I updated the title of your question to include some very important details. Which is that you are seeking a result that shows strong reversal with no wick.

Here is the original code you provided, which has been modified and tested to perform as you requested:

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));
def haGreen = haClose > haOpen;
def twoHaGreen = haGreen[1] and haGreen;
def haRed = haClose < haOpen; def twoHaRed = haRed[1] and haRed;
def newHAgreen = hagreen and hared[1]; def newHared = hared and hagreen[1];
def noLowerWickGreen = haClose > haOpen and haOpen == haLow;
def noUpperWickRed = haClose < haOpen and haOpen == haHigh;
def bullishReversal = haRed[1] and haGreen and noLowerWickGreen;
def bearishReversal = hagreen[1] and haRed and noUpperWickRed;
AddLabel(yes, if bullishReversal then "Bull Reversal" else if bearishReversal then "Bear Reversal" else if newhared or newHAgreen then "NEW" else if noLowerWickGreen or noUpperWickRed then "No Wick" else " ", Color.BLACK);
AssignBackgroundColor(if haGreen then Color.GREEN else if haRed then Color.RED else Color.CURRENT);

Marked as spam
Posted by (Questions: 37, Answers: 4116)
Answered on August 19, 2024 4:54 pm
0
It works perfectly. Thank you Pete.
( at August 19, 2024 8:20 pm)