Hi Anyone can help on below coding about Heikin-Ashi candle? Long: two consecutive green candles, after a series of red candles. Short: two red consecutive candles after a series of green candles. xClose = (Open+High+Low+Close)/4 if(barindex>2) then xOpen = (xOpen[1] + xClose[1])/2 endif green= xClose>xOpen AND xClose[1]<xOpen[1] red= xClose<xOpen AND xClose[1]>xOpen[1] Thanks.