MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Common functions  Print

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
void Print( ...)
Prints a message to the experts log. Parameters can be of any type. Amount of passed parameters cannot exceed 64.

Arrays cannot be passed to the Print() function. Arrays should be printed elementwise.

Data of double type are printed with 4 decimal digits after point. To output more precisely, use the DoubleToStr() function.
Data of bool, datetime and color types will be printed as their numeric presentation.
To print values of datetime type as string, convert them with the TimeToStr() function.
See also Alert() and Comment() functions.
Parameters:
...   -   Any values separated by commas. It can be up to 64 parameters.
Sample:
  Print("Account free margin is ", AccountFreeMargin());
  Print("Current time is ", TimeToStr(TimeCurrent()));
  double pi=3.141592653589793;
  Print("PI number is ", DoubleToStr(pi,8));
  // Output: PI number is 3.14159265
  // Array printing
  for(int i=0;i<10;i++)
    Print(Close[i]);