Actually MT5/mql5 doesn't work the same way.
Alain Verleyen:
Actually MT5/mql5 doesn't work the same way.
Thank you for your reply. I've edited my first post and I would like you to move the topic into the MQL4 thread.
Actually MT5/mql5 doesn't work the same way.
Petr Nosek:
This is the solution. Make event object selectable and selected and all remaining objects !selected and !selectable.
The solution to set the horizontal line unselectable (OBJPROP_SELECTABLE = false) is not applicable to me.
SanjayBalraj:
This is the solution. Make event object selectable and selected and all remaining objects !selected and !selectable.
This is the solution. Make event object selectable and selected and all remaining objects !selected and !selectable.
Thank you for your effort but in the first post I wrote:
The solution to set the horizontal line unselectable (OBJPROP_SELECTABLE = false) is not applicable to me.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
At the very first I know that this thread is about MQL5 and I've attached MQL4 code but I think this problem is the same in MQL4 or MQL5 (maybe I'm wrong).
EDIT: I've tried in MQL5 and this problem doesn't exist in MQL5
I create (by code) several objects on the chart and the first one is clearly over the second one even the first one has a higher zorder than the second one, if I click on the first object that click belongs to the right object (you can see that in the terminal) but the second object changes its selection state. You can try with attached indicator. If you click on the text or label you can see in the terminal that this click belongs to the right object but the click changes selection state for the horizontal line at the same time. Can I avoid this selection/deselection on the horizontal line that is bellow clicked object? The solution to set the horizontal line unselectable (OBJPROP_SELECTABLE = false) is not applicable to me.
So far I deal with buffering all object state and check in OnChartEvent(). Maybe is there an easier solution?