DoubleToStr - Conversion Functions - MQL4 Reference

MQL4 Reference Conversion Functions DoubleToStr

DoubleToStr

Returns text string with the specified numerical value converted into a specified precision format.

string  DoubleToStr(
   double  value,     // value
   int     digits     // precision
   );

Parameters

value

[in]  Floating point value.

digits

[in]  Precision format, number of digits after decimal point (0-8).

Returned value

Text string.

Example:

  string value=DoubleToStr(1.28473418, 5);
  // the value is "1.28473"

See also

PrintFormat(), StrToDouble(), DoubleToString()