Yes try changing
Code: Select all
if (trena[whichBar]== 1) doAlert(whichBar,"trend changed to up");
if (trena[whichBar]==-1) doAlert(whichBar,"trend changed to down");
Code: Select all
if (trena[whichBar]== -1) doAlert(whichBar,"trend changed to up");
if (trena[whichBar]== 1) doAlert(whichBar,"trend changed to down");