How to move two objects at the same time.

 
I tried chartevent_,object_drag, the use objectgetinteger to get the distance then use objectsetinteger to set them.

But this method makes the movement lag, is there a faster way?
 
Habib Adeyemi:
I tried chartevent_,object_drag, the use objectgetinteger to get the distance then use objectsetinteger to set them.

But this method makes the movement lag, is there a faster way?
Try object.move() as the two objects move functions should be called simultaneously within a function
This should work as you are moving object1 using above function and same for object2 
This should work
 
Zyad Nhra #:
Try object.move() as the two objects move functions should be called simultaneously within a function
This should work as you are moving object1 using above function and same for object2 
This should work
Objectmove doesn't move the xdistance and ydistance it only moves the price and time
 
Habib Adeyemi #:
Objectmove doesn't move the xdistance and ydistance it only moves the price and time
https://www.mql5.com/en/docs/chart_operations/charttimepricetoxy