That’s a regular Japanese candlestick.
Heikin-Ashi candlesticks are an indicator by themselves and need to be coded, their seup is:
once xOpen = open //initial OPEN
xClose = (open + close + high + low ) / 4 //CLOSE
if barindex > 0 then
xOpen = (xOpen + xClose[ 1 ] ) / 2 //OPEN after the first bar
endif
xLow = min (low ,min (xClose,xOpen)) //LOW
xHigh = max (high ,max (xClose,xOpen)) //HIGH
xTypic = (xHigh + xLow + xClose) / 3 //Typical HA price
xMed = (xHigh + xLow) / 2 //Median HA price
xRange = xHigh - xLow //HA range
you can comment out all definitions you don’t plan to used.
To check if a HA candlestick is bearish then you have to use:
bearcandle = (xClose <= xOpen)