Hi Guys
Could you code this :
HAturn = 0
IF BarIndex = 0 THEN
XClose = TotalPrice
XOpen = (Open + Close) / 2
ELSE
XClose = TotalPrice
XOpen = (XOpen[1] + Xclose[1]) / 2
ENDIF
if xclose>xopen and xclose[1]<xopen[1] then
HAturn = 1
elsif xclose<xopen and xclose[1]>xopen[1] then
HAturn = -1
endif
return HAturn
in order to have attached screen ;