hi,
same problem here.
There is no bug.
Floating-point has an infinite number of decimals, it's you, not understanding floating-point and that some numbers can't be represented exactly. (like 1/10.)
Double-precision floating-point format - Wikipedia
See also The == operand. - MQL4 programming forum (2013)
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)
MetaTrader 5 users will see this as a bug, because in previous build if you entered double value 0.1 there was no additional zeroes... 0.1000000000001
This is just something that a lot of users will complain
See this GIF:
MetaTrader 5 users will see this as a bug, because in previous build if you entered double value 0.1 there was no additional zeroes... 0.1000000000001
This is just something that a lot of users will complain
See this GIF:
Agree, even thou we deal with the imprecisions of floating point behind the scenes, this will look like a bug to users and the previous
behavior was ideal.
This is strange
I confirm NormalizeDouble does not work and its an official bug and must be reported to ServiceDesk
I'm not sure but I did a simple test. The NormalizeDouble function should be working.
void OnStart() { //--- Print("Normalize double test: 0.2999999 = ", DoubleToString(NormalizeDouble(0.299999, 2), 2)); }
Output:
2022.01.30 20:30:28.360 MyTest1 (EURUSD,H1) Normalize double test: 0.2999999 = 0.30
- 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,
After upgrading MT5 today 29.1.2022, there is bug for decimal input value.
When you enter decimal value for example 0.2 then it changes to 0.20000000000001.
There is also bug when you want to set 4.1 as decimal input value.