| / | Forum |
|
cleon
2006.01.18 15:49
Hello,
MQL rounds decimal numbers like 112.80 to 112.8 automatically (at least it looks like), but I need the value to be shown like 112.80 (with the zero), so I tried to use normalizedouble function with 2 digits (or 4 to the other pairs), but it only shows 1 digits when the last digit is a 0 (zero). How can I force to always show .00 or .0000 in any value in any currency ? I already used "Digits" on NormalizeDouble so it can match the current pair and nothing. Thank you. Cleon |
|
An alternative use of the Sleep() function in the realization of pauses between EA's actions is proposed. The approach under consideration allows a smart use of machine time. |
|
Michal
2006.01.18 19:36
cleon: Use DoubleToStr() function.Hello, MQL rounds decimal numbers like 112.80 to 112.8 automatically (at least it looks like), but I need the value to be shown like 112.80 (with the zero), so I tried to use normalizedouble function with 2 digits (or 4 to the other pairs), but it only shows 1 digits when the last digit is a 0 (zero). How can I force to always show .00 or .0000 in any value in any currency ? I already used "Digits" on NormalizeDouble so it can match the current pair and nothing. Thank you. Cleon |
|
cleon
2006.01.20 14:19
But when converting it to a string I can not use it in calculations, because it's
a string?
Thank you. |
|
Michal
2006.01.21 01:39
cleon: But for calculations it does not matter if it is 112.80 or 112.8, does it? Or I'm
missing something.But when converting it to a string I can not use it in calculations, because it's a string? Thank you. |