Andrey Dik: You are doing unnecessary conversions that cause loss of characters.
These are already desperate codes..... I've done it in different ways. But as said above. Probably because of the incorrectly taken I was sinning on the error. Although these variables were glitchy in the code as well.
Thank you all for your help and suggestions. But everything works clearly with float.
Vladislav Andruschenko: It's already desperate codes..... I've done it in different ways. But as said above. Probably because of incorrectly accepted I was sinning a mistake. Although these variables were glitchy in the code as well.
Thank you all for your help and suggestions. But everything works clearly with float.
Float is a number castration that gives you no advantage. It's better to deal with all the losses in conversions and use the highest possible precision - double.
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.
becausehttps://www.mql5.com/ru/docs/convert/normalizedouble
Note that the normalised number when output to the logbook using Print() may contain more decimal places than you expect. For example,
then in the comment the same
void OnStart()
{
double Price1 = 105143;
double Price2 = Price1 - 1 e-11;
Print(TOSTRING(Price1) + TOSTRING(MathFloor(Price1)) +
TOSTRING(Price2) + TOSTRING(MathFloor(Price2)) +
TOSTRING(Price1 > Price2));
}
Thank you. I must have found the right solution after all, but I was worried about a mistake because of the incorrect alignment!
The remainder of one non-normalized number divided by another non-normalized number, the result is in any case non-normalized.
This function should be removed from the language altogether, so as not to traumatize the immature psyche.
I may have found the right solution after all.
The remainder of one non-normalized number divided by another non-normalized number, the result is in any case non-normalized.
This function should be removed from the language altogether, so as not to traumatize the immature psyche.
Well, it's fine with me. That's the tricky part.
Normalize only before you use the results of your calculations directly. Avoid all number conversions and conversions as much as possible beforehand.
You are doing unnecessary conversions that cause loss of characters.
Well, it's fine with me. That's the funny thing.
It's already desperate codes..... I've done it in different ways. But as said above. Probably because of incorrectly accepted I was sinning a mistake. Although these variables were glitchy in the code as well.