A million charts on the screen. It looks like a blob of every known currency pair with a mix of every time frame added for good measure. You, my friend, suffer a nightmare juggling the EA settings on all these charts.
The idea of running a single Expert Advisor that trades all charts and multiple time frames stands out as an obvious solution. It’s not a good one, though. The way that MetaTrader 4 is designed prevents this setup from working smoothly.
The start() function in MQL4
MQL4 Expert Advisors only run in one of three different ways. The init() function is called when you load the EA onto a chart. The deinit() function operates whenever you remove the EA. That leaves the start() function. It’s like the beating heart of all MQL4 programs.
Incoming ticks tell the chart to notify an attached expert advisor about the updated price. When that occurs, the expert advisor runs the start() function. That function contains all of the code that traders associate with expert advisors: placing trades, implementing trailing stops, etc. All of those actions depend on incoming ticks.
The organization of MQL4 creates a problem for the goal of creating an EA that places trades for all charts. Expert advisors only update when a tick comes in. If I wanted to trade the GBP/JPY from a chart attached to the EUR/USD, any delay in EUR/USD ticks causes a delay in executing GBP/JPY trades.
This probably does not seem like a big deal. It isn’t a big deal – most of the time. It can, however, create a nagging problem of wondering why a noticeable percentage of trades seem to execute late. Traders on one minute charts would even notice missed signals. Although it’s not frequent, even the major pairs often go longer than one minute in between ticks.
One idea to reduce the number of open charts while ignoring the incoming tick problem is to create an EA that trades on multiple time frames for the currency pair where it’s attached. If I wanted to trade the AUDCAD on M30, H1, H4 and D1 charts, then I could place the EA on one of the those charts but have it look for trades on the selected time frames. This type of solution could decrease the number of open charts by 75% or more.
The idea of controlling everything from a single chart is very similar to the market scanning indicator that we created several months ago. There is really no difference between that indicator and the expert advisor proposed here. I feel that missing an indicator signal is of far less consequence than missing trade signals. Expert advisors are more likely to perform extra, ongoing operations like trailing stops that indicators completely ignore. The consequence of delayed ticks is far less significant for an indicator than it is for an EA.