MQL4 Reference
Object functions
ObjectName
| string ObjectName( |
int index) |
The function returns the object name by its index in the objects list.
To get the detailed error information, one has to call the GetLastError() function.
Parameters:
| index |
- |
Object index in the objects list. Object index must exceed or equal to 0 and be less than ObjectsTotal(). |
Sample:
int obj_total=ObjectsTotal();
string name;
for(int i=0;i<obj_total;i++)
{
name=ObjectName(i);
Print(i,"Object name is " + name);
}
|
|
|