The function searches for an object having the specified name. There are two variants of the function:
The function searches the object with the specified name:
[in] Chart identifier.
[in] The name of the object to find.
If successful the function returns the number of the subwindow (0 means the main window of the chart), in which the object is found. If the object is not found, the function returns a negative number. To read more about the error call GetLastError().
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.