Search code examples
mql4

MQL4: can't workout how to get decimal value of 1/6


Can't work out why 1/6 keeps returning me 0 and how to resolve it.

Print(1/6);
Print(DoubleToString((1/6),8));

Prints 0.00000000


Solution

  • You need one double number in expression. Try: Print(1/6.0);