MQL4 Reference
Object functions
ObjectDescription
| string ObjectDescription( |
string name) |
Return object description. For objects of OBJ_TEXT and OBJ_LABEL types, the text drawn by these objects will be returned.
To get the detailed error information, one has to call the GetLastError() function.
See also ObjectSetText() function.
Parameters:
Sample:
// writing the chart objects list to the file
int handle, total;
string obj_name,fname;
// file name
fname="objlist_"+Symbol();
handle=FileOpen(fname,FILE_CSV|FILE_WRITE);
if(handle!=false)
{
total=ObjectsTotal();
for(int i=-;i<total;i++)
{
obj_name=ObjectName(i);
FileWrite(handle,"Object "+obj_name+" description= "+ObjectDescription(obj_name));
}
FileClose(handle);
}
|
|
|