GarZed9:
. . .
Why? Why? Why? Why? Why?
You are performing math operations on integers, and only after the operations are complete, the integer is cast to a double. See Typecasting.
Just use a double in the calculation.
Try:
double za = 100*67/750.0, zb = 100*142/250.0; Alert(DoubleToString(za,2), " ", DoubleToString(zb,2));
(Notice that I used 750.0 instead of 750 and 250.0 instead of 250)
GarZed9:
On MT4 v434, division quotient don't give floating point values(Bug??) - MQL4 forum
double za = 100*67/750, zb = 100*142/250;
The program shows me: za = 8.00 and zb = 56.00
Thirteen:
You are performing math operations on integers, and only after the operations are complete, the integer is cast to a double. See Typecasting.
Just use a double in the calculation.
Try:
(Notice that I used 750.0 instead of 750 and 250.0 instead of 250)
Really thanks to all!

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
The program shows me: za = 8.00 and zb = 56.00
instead my calculator displays: za = 8.93 and zb = 56.80
Why? Why? Why? Why? Why?