This can be used to trigger an alert if Heikin Ashi bar changes color :)
study("HEIKIN ASHI COLOUR CHANGE ALERT") haclose = ((open + high + low + close)/4) haopen = na(haopen[1]) ? (open + close)/2 : (haopen[1] + haclose[1]) / 2 UP = haclose > haclose [1]? 0:1 DOWN = haclose <= haclose [1]? 1:0 plot(UP) plot(DOWN)