MQL4 Reference Global Variables of the Terminal GlobalVariableName

GlobalVariableName

Returns the name of a global variable by its ordinal number.

string  GlobalVariableName(
   int  index      // Global variable number in the list of global variables
   );

Parameters

index

[in]  Sequence number in the list of global variables. It should be greater than or equal to 0 and less than GlobalVariablesTotal().

Return Value

Global variable name by its ordinal number in the list of global variables. For more details about the error, call GetLastError().

Note

Global variables exist in the client terminal during 4 weeks since their last use, then they are automatically deleted.