Up
RSI > 50
EMA1 > EMA2
Down
RSI < 50
EMA1 < EMA2
a= RSI[14](close)
b= ExponentialAverage[20](close)
c= ExponentialAverage[50](close)
d= averagetruerange[10](close)
if a>50 and b crosses over c then
DRAWARROWUP(barindex[1],low[1]-d/2)coloured(10,255,10)
elsif a<50 and b crosses under c then
DRAWARROWDOWN(barindex[1],high[1]+d/2)coloured(255,10,10)
endif
return