![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
New article Developing the symbol selection and navigation utility in MQL5 and MQL4 has been published:
Experienced traders are well aware of the fact that most time-consuming things in trading are not opening and tracking positions but selecting symbols and looking for entry points. In this article, we will develop an EA simplifying the search for entry points on trading instruments provided by your broker.
Adding a response to button pressing
So far, the buttons added to the chart are just a decoration. Nothing happens when pressing them. Let's instruct them on how to respond to pressing.
Unfortunately, the standard OnChartEvent function is of no help to us here, since it reacts only to the events that happened on a chart the EA is launched on, while the buttons are added to a new chart.
Perhaps, there are some more convenient ways. I came up with only one way to respond to changes that occurred on another chart. It involves the OnTimer standard function. If the chart features the buttons, we will check if some of them is pressed. If yes, a necessary action is performed.Author: Roman Klymenko