Normalizedouble return double with max 4 digits only

 

Hi everyone,

I try func NormalizeDouble(value,digits) in mql4 but it return double with max 4 digits after float point although i set digits larger than 4.

Ex: NormalizeDouble(1.1234567,6)  return 1.1235

How can i fix this?

 


Ex: NormalizeDouble(1.1234567,6)  return 1.1235

How do you know what it returns?

 
NormalizeDouble returns a double. Floating-point has an infinite number of decimals, it's your not understanding floating-point and that some numbers can't be represented exactly. (like 1/10.)
          Double-precision floating-point format - Wikipedia, the free encyclopedia

See also The == operand. - MQL4 programming forum

Print out your values to the precision you want with DoubleToString - Conversion Functions - MQL4 Reference.

If you want to see the correct number of digits, convert it to a string with the correct/wanted accuracy.
          question about decima of marketinfo() - MQL4 programming forum 2016.05.18

Reason: