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().