MQL4 Reference Object Functions ObjectType

ObjectType

The function returns the object type value.

int  ObjectType(
   string   object_name   // object name
   );

Parameters

object_name

[in]  Object name.

Returned value

The function returns the object type value. To get the detailed error information, one has to call the GetLastError() function.

Example:

  if(ObjectType("line_object2")!=OBJ_HLINEreturn(0);

See also

Object types