Download MetaTrader 5

ObjectMove

The function changes coordinates of the specified anchor point of the object.

bool  ObjectMove(
   long      chart_id,        // chart identifier
   string    name,            // object name
   int       point_index,     // anchor point number
   datetime  time,            // Time
   double    price            // Price
   );

Parameters

chart_id

[in]  Chart identifier. 0 means the current chart.

name

[in]  Name of the object.

point_index

[in]  Index of the anchor point. The number of anchor points depends on the type of object.

time

[in]  Time coordinate of the selected anchor point.

price

[in]  Price coordinate of the selected anchor point.

Return Value

If successful, returns true, in case of failure returns false. To read more about the error call GetLastError().


Updated: 2015.12.03