Move object when another object is moved (object set through a script)?

Back to topics list To post a new topic, please log in or register
avatar
14
Jagg 2015.09.15 15:08
 

Hi,

I use a script which I drag & drop to a chart. This script adds an object (text) to chart and places 4 trendlines to the chart (depending on the price where I drop the script). These 4 trendlines depend always on that set/dropped text object.

So when I move that text object my 4 trendlines should also be moved to the new price info where I dragged the text object. Is this possible?

I've read something about CHARTEVENT_OBJECT_DRAG in the mt4 doc but handling these chart events is only possible in an indicator, isn't it?

So my only chance is have the script and writing an extra indicator for that script which only listen to the CHARTEVENT_OBJECT_DRAG event? Or is there another way to do it?

Thanks!

 

avatar
125
zirkoner 2015.09.15 19:23 #
 
Jagg:

Hi,

I use a script which I drag & drop to a chart. This script adds an object (text) to chart and places 4 trendlines to the chart (depending on the price where I drop the script). These 4 trendlines depend always on that set/dropped text object.

So when I move that text object my 4 trendlines should also be moved to the new price info where I dragged the text object. Is this possible?

I've read something about CHARTEVENT_OBJECT_DRAG in the mt4 doc but handling these chart events is only possible in an indicator, isn't it?

So my only chance is have the script and writing an extra indicator for that script which only listen to the CHARTEVENT_OBJECT_DRAG event? Or is there another way to do it?

Thanks!

 

An indicator or an EA. You can code all in an EA.
Back to topics list  

To add comments, please log in or register