...
I hope this is clear and helps to sort out the issue.
All results should be 0.0006 but as soon i pass the string to a function it seems to have serious bug. This might cost us big trouble! Build 670. Same behavious on 646 too.
Hi, very strange behaviour is found:
I hope this is clear and helps to sort out the issue.
All results should be 0.0006 but as soon i pass the string to a function it seems to have serious bug. This might cost us big trouble! Build 670. Same behavious on 646 too.
DoubleToString is intended to be used in the more recent versions of mql4 as it brings it closer to mql5 language coding.
DoubleToStr is the old mql4 style. Not a problem but you should be aware of it.
However... there isn't any problem with your example though.
0.0006 and 0.00060 are mathematically equal values.
The reason you are seeing different numbers in your journal output is because you are formatting as such.
Print("LocalLots * RemoteLots = ",LocalLots*RemoteLots); // returns 0.0006 Print("LocalLots * RemoteLots = "+DoubleToStr(LocalLots*RemoteLots,5)); // prints 0.0006
The first line will output 0.0006 and the second line will output 0.00060 .
It's doing exactly what you told it to do.
This isn't a bug.
It's an output formatting issue in your code.
- david-forex
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, very strange behaviour is found:
I hope this is clear and helps to sort out the issue.
All results should be 0.0006 but as soon i pass the string to a function it seems to have serious bug. This might cost us big trouble! Build 670. Same behavious on 646 too.