MQL4 Reference
Global variables
GlobalVariableName
| string GlobalVariableName( |
int index) |
The function returns the name of a global variable by its index in the list of global variables.
To get the detailed error information, one has to call the GetLastError().
Parameters:
| index |
- |
Index in the list of global variables. It must exceed or be equal to 0 and be less than GlobalVariablesTotal(). |
Sample:
int var_total=GlobalVariablesTotal();
string name;
for(int i=0;i<var_total;i++)
{
name=GlobalVariableName(i);
Print(i,": Global variable name - ",name);
}
|
|
|