Hello all,
Just to tell you, I saw OrderStopLoss() function returned value on the 16th digit on decimal part.
That mean, if you have a condition like that, Stop < OrderStopLoss() with these values in the log file Stop = 1.36190000 & OrderStopLoss()=1.36190000, it could be TRUE.
Because OrderStopLoss() didn't return 1.36190000 as you can see in your log file but it return for exemple 1.3619000000000002
To avoid this issue, I suggest to use the NormalizeDouble() function like that -> NormalizeDouble(OrderStopLoss(),Digits)
I didn't check yet other functions but it could be the same issue on OrderTakeProfit( ), OrderOpenPrice( ) and so on....
bye
Wap
Or just ensure to use <= or >= conditional statements in this sort of logic, rather than == statements.
Hello all,
Just to tell you, I saw OrderStopLoss() function returned value on the 16th digit on decimal part.
That mean, if you have a condition like that, Stop < OrderStopLoss() with these values in the log file Stop = 1.36190000 & OrderStopLoss()=1.36190000, it could be TRUE.
Because OrderStopLoss() didn't return 1.36190000 as you can see in your log file but it return for exemple 1.3619000000000002
To avoid this issue, I suggest to use the NormalizeDouble() function like that -> NormalizeDouble(OrderStopLoss(),Digits)
I didn't check yet other functions but it could be the same issue on OrderTakeProfit( ), OrderOpenPrice( ) and so on....
bye
Wap

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all,
Just to tell you, I saw OrderStopLoss() function returned value on the 16th digit on decimal part.
That mean, if you have a condition like that, Stop < OrderStopLoss() with these values in the log file Stop = 1.36190000 & OrderStopLoss()=1.36190000, it could be TRUE.
Because OrderStopLoss() didn't return 1.36190000 as you can see in your log file but it return for exemple 1.3619000000000002
To avoid this issue, I suggest to use the NormalizeDouble() function like that -> NormalizeDouble(OrderStopLoss(),Digits)
I didn't check yet other functions but it could be the same issue on OrderTakeProfit( ), OrderOpenPrice( ) and so on....
bye
Wap