MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Global variables  GlobalVariableGet

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
double GlobalVariableGet( string name)
Returns the value of an existing global variable or 0 if an error occurs. To get the detailed error information, one has to call the GetLastError() function.
Parameters:
name   -   Global variable name.
Sample:
  double v1=GlobalVariableGet("g1");
  //---- check function call result
  if(GetLastError()!=0) return(false);
  //---- continue processing