MQL4 not interpreting formatted outputs correctly
TheHonestPrussian:
The function DoubleToString is adding the decimals. If you want only the integer part, cast the double value to an integer instead of using DoubleToString, you can use IntegerToString.
I could literally scream
I'm sorry but in what universe is MQL4 seeing the following :
as "56.00" and not "56%".
The words "sick" and "tired" do not cut it, especially when this only happens with one currency pair, and no other.
Just why?!
Dominik Egert #:
The function DoubleToString is adding the decimals. If you want only the integer part, cast the double value to an integer instead of using DoubleToString, you can use IntegerToString.
The function DoubleToString is adding the decimals. If you want only the integer part, cast the double value to an integer instead of using DoubleToString, you can use IntegerToString.
Suddenly it's decided to omit the trailing "0". Honestly sometimes I think this thing has a mind of it's won.
#property strict void OnStart() { double a = 56.0; PrintFormat("a = %.0f%%", a); }
I could literally scream
I'm sorry but in what universe is MQL4 seeing the following :
as "56.00" and not "56%".
The words "sick" and "tired" do not cut it, especially when this only happens with one currency pair, and no other.
Just why?!