Dear All
I created a cod based on price close above MA. How I can do this but instead using Hekin-Ashi candle close.
indictaor3= exponentialaverage[50](close)
indictaor4= exponentialaverage[20](close)
c2= (close[1] > indictaor3)
c3= (close[1]> indictaor4)
I want above close to be based in Heikin Ashi candle ?
There you go:
//xOpen= Open
xClose = (open + close + high + low) / 4
//if barindex > 0 then
//xOpen = (xOpen[1] + xClose[1]) / 2
//endif
//
indictaor3= exponentialaverage[50](xClose)
indictaor4= exponentialaverage[20](xClose)
c2= (xClose[1] > indictaor3)
c3= (xClose[1] > indictaor4)
I commented out any reference to xOpen, as you are not using it. If you need it then uncomment those lines.