What kind of bug is this? It doesn't keep popping up every once in a while.
NormalizeDouble(value, 4);
and prints this
0.5484000000001
This is from the help:
NormalizeDouble ................................ Please note that when output to Journal using Print(), a normalized number may contain more decimal places than you expect. For example,
double a=76.671;// normalized number with 3 decimal places Print("Print(76.671)=",a);// print it as is Print("DoubleToString(a,8)=",DoubleToString(a,8));// print with a specified accuracy
NormalizeDouble ................................ Please note that when output to Journal using Print(), a normalized number may contain a larger number of decimal places than you expect. For example,
double a=76.671;// normalized number with 3 decimal places Print("Print(76.671)=",a);// print it as is Print("DoubleToString(a,8)=",DoubleToString(a,8));// print it with the specified accuracy
is that it has to be 4 digits ! There are cases that give 4 characters, and there are cases with ... 0000000001 ! Why is it that the same function sees different values ?
is that it has to be 4 digits ! There are cases that give 4 characters, and there are cases with ... 0000000001 ! Why is it that the same function sees different values ?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
So the history will start to be written from the moment the symbol is set in the market overview ?
What kind of bug is this? It doesn't happen all the time, it just pops up from time to time.
NormalizeDouble(value, 4);
but outputs this
0.5484000000001
What kind of bug is this? It doesn't keep popping up every once in a while.
NormalizeDouble(value, 4);
it outputs this
0.5484000000001
What kind of bug is this? It doesn't keep popping up every once in a while.
NormalizeDouble(value, 4);
and prints this
0.5484000000001
This is from the help:
NormalizeDouble
................................
Please note that when output to Journal using Print(), a normalized number may contain more decimal places than you expect. For example,
double a=76.671;// normalized number with 3 decimal places
Print("Print(76.671)=",a);// print it as is
Print("DoubleToString(a,8)=",DoubleToString(a,8));// print with a specified accuracy
will output in the terminal:
DoubleToString(a,8)=76.67100000
Print(76.671)=76.67100000000001
Where does it output ?
This is from the reference:
NormalizeDouble
................................
Please note that when output to Journal using Print(), a normalized number may contain a larger number of decimal places than you expect. For example,
double a=76.671;// normalized number with 3 decimal places
Print("Print(76.671)=",a);// print it as is
Print("DoubleToString(a,8)=",DoubleToString(a,8));// print it with the specified accuracy
will give out in the terminal:
DoubleToString(a,8)=76.67100000
Print(76.671)=76.67100000000001
What's the bug?
What's the bug?
is that it has to be 4 digits ! There are cases that give 4 characters, and there are cases with ... 0000000001 ! Why is it that the same function sees different values ?
How do I round the value to 4 digits ...
-----------------------------------------------------------------------------------
NormalizeDouble(value, 4);
but outputs this
0.5484000000001
is that it has to be 4 digits ! There are cases that give 4 characters, and there are cases with ... 0000000001 ! Why is it that the same function sees different values ?
How do I round the value to 4 digits ...
-----------------------------------------------------------------------------------
NormalizeDouble(value, 4);
but outputs this
0.5484000000001
Why can't I do this?
How to implement such a code ?Why can't you do that?
How to implement this code ?Use a code styler.
And an array must first be declared before it can be accessed: