NormalizeDouble() not working
I have tried both code from both code after decimal value appearing 16 digits. Where I have made mistake?
It could be dangerous to normalize prices (stop loss and take profit are also prices) by NormalizeDouble() because not always a tick size is equal to points.
This is not your fault, it's a feature of double type. NormalizeDouble() provides rounding (BTW in a slightly non standard way) to required number of decimal places. But double is still double.
It could be dangerous to normalize prices (stop loss and take profit are also prices) by NormalizeDouble() because not always a tick size is equal to points.
- www.mql5.com
Could you please provide a reference to the rounding standard(s) ? Thanks.
https://physics.nist.gov/cuu/pdf/sp811.pdf
appendix B.7 on page 43
Thanks Petr.
However what I wanted to point is there is no reason to think Metaquotes is following any standard if not documented, certainly not a US standard.
Thanks Petr.
However what I wanted to point is there is no reason to think Metaquotes is following any standard if not documented, certainly not a US standard.
You're right that Metaquotes doesn't have to follow any standard (SI is not an US standard, but an international standard).
NIST is US, it's what I meant.
US like to think they are the "international standard". But it's not the place to discuss about that.
I have tried both code from both code after decimal value appearing 16 digits. Where I have made mistake?