I have a problem with my EA because the spread of the currency that im trading is 5 , so, when the indicator give something ending with other number than 5 or 0, the error ocurrs
2016.10.22 13:29:38.787 2016.10.03 11:55:00 failed exchange sell 1.00 WINZ16 at 60739 sl: 60834 tp: 60584 [Invalid price]
I tried to use StringToDouble or DoubleToString but thats also give me an conversion error.
How can i round the numbers of the buy and sell order to end with 5 or 0 when they end with 1 2 3 4 6 7 8 or 9?
Here is the code to send the orders
Regardless to your code, the following simple idea should work ...
Please let me know what happened ...
Dear Osama, i dont know if i its right but i got this errors while trying to implement your code
'Digits' - undeclared identifier
'Digits' - some operator expected PinbarTS.mq5
'NormalizeDouble' - wrong parameters count
Here is the whole code
Normalize your price like that :