I'm executing Buy/Short signals based on an indicator above 1.04 or below 0.96 (code below). The code is not able to evaluate the following expressions correctly
amaoversma[bar] < (1-slider3.ValueInt/100) // where slider3 is 4
amaoversma[bar] > (1+slider3.ValueInt/100) // slider3 is 4
As shown in the debug log, it prints amaoversma values that are between 0.96 and 1.04. It should only print when amaoversma is <0.96 or >1.04
What am i doing wrong? Pl specify the right code to fix this
------------Debug Log----------------------------------
QUOTE:
Bear, date= 7/17/2012, amaoversma=0.992228216089536, slider3=4
Bull, date= 7/30/2012, amaoversma=1.03764814678449, slider3=4
Bear, date= 10/5/2012, amaoversma=0.976891929373198, slider3=4
Bull, date= 10/19/2012, amaoversma=1.00204790653971, slider3=4
Bear, date= 10/29/2012, amaoversma=0.945458991505152, slider3=4
CODE:
Please log in to see this code.