Signal arrow printing on wrong place.

 
Hi All,

we are trying to create an EA using some strategy with Bollinger band indicator.

we are showing up and down arrow on candle sticks when candle sticks values goes out of Bollinger band upper line.

it is working correctly on most of the candle stick but on few candle sticks it is showing arrows even when candles stick is not out of the Bollinger Band.

According to our understanding, this is perhaps due to rounding off of values of candle stick (Ope[], Close[] etc.) from a values(of 6 digits) to a values (of 4 digits)  when it is assigned to a double type of variable.



double var = 1.301269 will get rounded off to var=1.3013. and due to this our conditions are not executing correctly and it is showing arrows on wrong candle stick.

So is there any solution to this. please suggest.

we have already tried "DoubleToString" method in the code to print the 6 digit values but as we know this is string and we have to use only double value.

Please help. much Appreciated.





  



Reason: