Documentation
The long-awaited program of the website beta testing has been launched. For some time the website operation may be inconsistent. The website developers are filling up its contents now doing their best to make it maximum convenient for you. Please accept our apologies for the temporary inconvenience.
MQL5 ReferenceObject Functions 

Object Functions

This is the group of functions intended for working with graphic objects relating to any specified chart.

Function

Action

ObjectCreate

Creates an object of the specified type in a specified chart

ObjectName

Returns the name of an object of the corresponding type in the specified chart (specified chart subwindow)

ObjectDelete

Removes the object with the specified name from the specified chart (from the specified chart subwindow)

ObjectsDeleteAll

Removes all objects of the specified type from the specified chart (from the specified chart subwindow)

ObjectFind

Searches for an object with the specified ID by the name

ObjectGetTimeByValue

Returns the time value for the specified object price value

ObjectGetValueByTime

Returns the price value of an object for the specified time

ObjectMove

Changes the coordinates of the specified object anchor point

ObjectsTotal

Returns the number of objects of the specified type in the specified chart (specified chart subwindow)

ObjectGetDouble

Returns the double value of the corresponding object property

ObjectGetInteger

Returns the integer value of the corresponding object property

ObjectGetString

Returns the string value of the corresponding object property

ObjectSetDouble

Sets the value of the corresponding object property

ObjectSetInteger

Sets the value of the corresponding object property

ObjectSetString

Sets the value of the corresponding object property

Every graphical object should have a name unique within one chart, including its subwindows. Changing of a name of a graphic object generates two events: event of deletion of an object with the old name, and event of creation of an object with a new name.

After an object is created or an object property is modified it is recommended to call the ChartRedraw() function, which commands the client terminal to forcibly draw a chart (and all visible objects in it).