MT5: OBJ_HLINE dragging event

 

Hi,

is it possible to capture the dragging process of a horizontal line somehow?
I can get the CHARTEVENT_OBJECT_DRAG event but this event only fires when dragging is finished. I want to capture the dragging itself, like mouse-move that is updating x and y position of the mouse continuosly.

Why this? I want to do some calculation and showing the result to the user, while he is moving a HLINE with the mouse. 

Best regards,
Alex 

 
yes read the values live in OnTimer() Function.
 

I realise this is a rather old question but I'm stuck on the same problem and haven't found a workable solution yet. 

I am trying to run a calculation and display the result as a Horizontal line is being dragged.

The CHARTEVENT_OBJECT_DRAG only arrives once the dragging stops so it appears to be of no use in this case.

My initial thought was to use the CHARTEVENT_MOUSE_MOVE and check if the line is being dragged but I cannot find a way of determining if the line is selected and being dragged.

There appears to be no START_DRAG event nor does it seem possible to use the lines own  OBJPROP_SELECTED  property. In fact this last appears to be miss named as it needs to be set true when the horizontal line is created in order for it to be drag-able so if checked at any time it will always return true.

Has anyone figure out a way of doing this which doesn't use the rather un-elegant way of running a timer and checking a line's position each second or fraction of?  

 
Tony Dawson:

Do not double post!!

I have deleted your duplicate.

 
Keith Watford:

Do not double post!!

I have deleted your duplicate.

Unintentional, no idea how that happened! Thanks for clearing it up.

 
Anthony Eric Gillon Dawson: My initial thought was to use the CHARTEVENT_MOUSE_MOVE and check if the line is being dragged but I cannot find a way of determining if the line is selected and being dragged.

On Mouse move, read the price. It is being dragged if it is selected and the price is changing.

Reason: