Discussion of article "Developing the symbol selection and navigation utility in MQL5 and MQL4"

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
203720
MetaQuotes Software Corp.  

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

Symbol list navigation buttons

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

To add comments, please log in or register