Eventhandling in Tester environment
Hmm - Du wählst das deutsche Forum und schreibst englisch?
Aber zu Deinem Problem: Studiere doch einmal die Lösung, die hier mit Tasten auf dem Chart angeboten und erklärt hat: https://www.mql5.com/de/articles/5348
- www.mql5.com
Vielen Dank, nicht gecheckt, dass dieses Forum nur Deutsch ist.
In diesem Programm sind die Buttons direkt in der Applikation, da habe ich kein Problem, drauf zuzugreifen. Aber es ist eine gute Idee, in einer bestehenden Applikation zu suchen.
Wenn ich ein Panel erzeuge, fehlt mir eine Referenz auf die Buttons.
In Tester the onChartEvent() function does not work. You have to put event handling into the onTick() function.
If you define the buttons in OnInit() the event handling works.
Problem: If there is some graphic from the chart behind the button it does not work.
I wanted therefore to put the buttons in a panel. But there is the same problem, event handling does not work in onChartEvent(). I have to reference the buttons in the panel from the onTick() function.
Question: How can I reference the button object from the onTick() function?
I just have an ExtDialog reference, I have not CAppWindowThreeButtons reference.
If I create an instance of the class in onTick()
CAppWindowThreeButtons caw;
it does not work.
Anybody has an idea howto event handling from panels in tester?