MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Object functions  ObjectFind

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
int ObjectFind( string name)
Search for an object having the specified name. The function returns index of the windows that contains the object to be found. If it fails, the returned value will be -1. To get the detailed error information, one has to call the GetLastError() function. The chart sub-windows (if there are sub-windows with indicators in the chart) are numbered starting from 1. The chart main window always exists and has the 0 index.
Parameters:
name   -   Object name to search for.
Sample:
if(ObjectFind("line_object2")!=win_idx) return(0);