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); }

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 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?!