MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Object functions  ObjectDescription

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
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:
name   -   Object name.
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);
    }