MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Global variables  GlobalVariableCheck

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
bool GlobalVariableCheck( string name)
Returns TRUE if the global variable exists, otherwise, returns FALSE. To get the detailed error information, one has to call the GetLastError() function.
Parameters:
name   -   Global variable name.
Sample:
  // check variable before use
  if(!GlobalVariableCheck("g1"))
    GlobalVariableSet("g1",1);