From what I saw now (because my code doesn't work as expected anymore),
when clicking a button, MT5 generates event for clicking button, but generates also even for clicking chart.
I don't see the point honestly.
Moreover, I don't know how to discriminate between the two.
I mean, I have to make discrimination between this cases:
1. when only click on chart, then do code1
2. when only click on some category of buttons, then do code2
If I click a button, case 1 will fire too.
Right now I cannot think of a solution.
I really would need some help with this, because I'm quite confused.
If you click any object on the chart you will receive two events:CHARTEVENT_OBJECT_CLICK and CHARTEVENT_CLICK. It definitely helps GUI developers.I don't know what exactly you are doing in your code, but you should correct event processing.