
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I confirm NormalizeDouble does not work and its an official bug and must be reported to ServiceDesk
they have always been imprecise, it's just that before the update, the UI would not show the actual value.
All programmers should know how to deal with double/float imprecision, but when it comes to user experience, the
previous behavior of the UI was ideal.
Here are my results with the following script:
So it seems, that functionality in both the display and the NormalizeDouble has changed in some way in this new build.
EDIT: See later posts!
Here are my results with the following script:
So it seems, that NormalizeDouble is in fact flawed in some way in this new build.
The only flaw is the fact that the function still exists, instead of pointing people to articles teaching about floating point,
In both your examples, the double's value is actually ~0.299999999... the print function is what rounded the value.it promises something impossible with them that is to round it to specific numbers. Some numbers just can't be represented.
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
https://floating-point-gui.de/
Metaquotes should deprecate it, as this function causes confusion to beginners everyday.
Here is a more thorough test with the following script:
From the above, it seems that it is more of only a default display problem and that NormalizeDouble is still working as before.One more test to see if the normalising function has changed or not with the following script:
It seems to be working as before. The only difference seems to be the default display of the numbers and not the underlying data.
I'm not sure but I did a simple test. The NormalizeDouble function should be working.
Output:
2022.01.30 20:30:28.360 MyTest1 (EURUSD,H1) Normalize double test: 0.2999999 = 0.30
try this
It's not an issue with the NormalizeDouble, it's just an UI issue. The current UI is showing what doubles actually are,
they have always been imprecise, it's just that before the update, the UI would not show the actual value.
All programmers should know how to deal with double/float imprecision, but when it comes to user experience, the
previous behavior of the UI was ideal.
No, NormalizeDouble seems to be working just as before with no change. It seems to be only a "display" problem. See my previous posts here on the thread, especially Post #17.