I created groups of objects (say 5 gann lines with different ratios).
And I want to detect when user selects/deselects one of them, to select other 4 lines automatically.
Since there's only click object event, and I don't know what was the state before the click, or if it was double click, or if the property "Select objects by single mouse click" is checked or not....
I was wondering if this event could be added, if project managers see this event as general interest.
For me it would be very very useful.
Is there a way to achieve what I need with current MQL5?
Although I am not too proficient with these methods yet (nor with much of MQL in general), I would suggest one concept.
Give your object group a "handle" of sorts which you define as a button somewhere, which tracks all of your Gann objects. When this object is clicked, select/unselect the linked objects.
Aside from this I really have no practical way of helping. :) Good luck, and I'd like to hear back what method you choose.
it's a good idea.
But the pb is that there can be many groups of objects,
and therefore i would need a button for every group.
Which number of groups is uncertain.
So I would have to create a button everytime a group of objects is created.
But it's a good idea for a single group of objects. Thank you for this.
I will ask again if selected event will be / is planned in MQL5 someday.
I will check this out. Thank you for suggestion.
Anyhow, is CHARTEVENT_OBJECT_SELECTED event planned for a future version of MQL5?
Or has this event a chance to be a part of MQL5 in the future?
I want to know this, to plan for the future.
Thanks again for suggestion.
I think existing events are quite enough to solve your task. See EventChartCustom
Value of the id parameter
Value of the lparam parameter
Value of the dparam parameter
Value of the sparam parameter
Event of a mouse click in a graphical object belonging to the chart
the X coordinate
the Y coordinate
Name of the graphical object, on which the event occurred
You can detect mouse click on a chart object and then check if this object is selected - https://www.mql5.com/en/docs/constants/objectconstants/enum_object_property
Object in the background
Object is selected