Bug in documentation about ObjectMove function

 

In here:

https://docs.mql4.com/objects/objectmove

written:

ObjectMove
The function changes coordinates of the specified anchor point of the object at the specified chart. There are two variants of the function:

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

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

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

The first parameter is mistake, I thinks must be chart_id.


ObjectMove - Object Functions - MQL4 Reference
ObjectMove - Object Functions - MQL4 Reference
  • docs.mql4.com
ObjectMove - Object Functions - MQL4 Reference
 
NabiKAZ: In here: https://docs.mql4.com/objects/objectmove written: The first parameter is mistake, I thinks must be chart_id.

Yes, the MQL4 documentation is incorrect. The are two versions of the function and the one option of the function should be:


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

You can use the MQL5 documentation as a reference for the correction to the MQL4 documentation: https://www.mql5.com/en/docs/objects/objectmove

The second option is as the MQL4 documentation specifies:


Documentation on MQL5: Object Functions / ObjectMove
Documentation on MQL5: Object Functions / ObjectMove
  • www.mql5.com
ObjectMove - Object Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: