Most Forex traders do not know that MetaTrader 4 trading terminal can’t run more than one Expert Advisor on the same chart. This limitation comes from MT4 terminal itself, which simply means you are not allowed to attach multiple EAs on the same chart window. So how do others run several Forex robots on the same MT4 terminal?

Actually, it’s quite simple to run many Forex EA on the same MetaTrader 4 terminal. You need to open a new chart for each Expert Advisor.

In this tutorial, I will clear up any doubts about this subject and will teach you how to set up more than one EA on your MT4.

MetaTrader 4 is designed so that only a single Forex robot (EA) or script can be attached to one chart.

However, MT4 allows running up to 100 Expert Advisors on the same trading terminal. You just need to open multiple chart windows. This allows you to run many Expert Advisors by attaching each of them to a different chart.

You can have multiple charts of the same currency pair and time frame and run a robot on each of them.

You can also have multiple charts of different currency pairs and time frames and even any other trading instrument your broker has to offer.

Basically, any combination would work.

If reading is not your thing then you can watch this MT4 video tutorial below How To Run More Than One Expert Advisor In The Same MT4 On Different Time Frame Of Same Currency.

If you prefer reading, then continue. The tutorial below has a bit more information than the video 🙂

Below is the screenshot of my MT4 with multiple charts of different instruments and time frames.

MT4 Terminal with multiple chart windows open of different instruments and time frames.
MT4 Terminal with multiple chart windows of different instruments and time frames.

Important to note that with indicators this is different. You can attach multiple indicators to any single chart.

How To Open Multiple Charts On MT4

First, let me show you how to open multiple charts on MetaTrader 4.

There are a few ways to open a chart in MT4.

1) Opening MT4 chart from the “Market Watch” panel

In the image below I illustrate how to open a chart window from the Market Watch panel. If you do not see Market Watch panel in your MT4 then open it from the top menu View->Market Watch or Ctrl+M.

Find the instrument you want to open, click a right mouse button on it and choose “Chart Window” from the menu. You can repeat this as many times as you want to open multiple charts or the same or different instrument.

Opening MT4 chart from the Market Watch panel
Opening MT4 chart from the Market Watch panel

2) Opening MT4 chart from the File menu

You can also open a new chart of any symbol from the File->New Chart menu. For me, this one is less convenient, but it helps when you want to open non-Forex pair like CFD, metals, cryptocurrencies, etc. It is because in the instrument list window you can see categories like “ECN Forex”, “CFD Index”, and so on. Note that every broker has different categories and some might have none.

Opening MT4 chart from the File menu
Opening MT4 chart from the File menu

3) Open MT4 chart of any instrument and then switch it to the one you actually need

If you are having a hard time finding some instrument in that long list in the Market Watch, then you’ll find this trick very helpful.

Open an MT4 chart of any instrument without a second thought and then switch it to the right instrument and timeframe by entering its name in the bottom section of that chart.

Use the 1st or the 2nd method described above to open any MT4 chart.

Then, press ENTER or double-click the left mouse button in the bottom-left corner of that new chart.

You’ll see a white area appears at the bottom of the chart where you can type a new symbol name, timeframe, date, or time.

You will see example parameters changing to the right of the white area giving you a hint of what you can type in there.

mt4-chart-symbol-edit-parameters

Watch this animation below to see how I am switching between different symbols and timeframes.

mt4-chart-symbol-timeframe-switch

This will not work for the symbols that are hidden from the Market Watch. In other words, the symbol you want to switch to must be actually visible in the Market Watch.

Enabling All MT4 Currency Pairs

Can’t see all the currency pairs on MT4?

It might happen that you won’t see all available currency pairs and instrument on MT4. Many brokers hide most of the instrument by default but you can easily add and hide symbols in MetaTrader 4.

In the Market Watch, you can use “Show All” and “Hide All” to show and hide all symbols.

Show All and Hide All menus in the MT4 Market Watch
Show All and Hide All menus in the MT4 Market Watch

When you hide all, MT4 will still keep showing instruments for those charts that are currently open or were closed just recently.

When you show all, MT4 will show all available instruments for that broker.

You can also open Symbols window from the Market Watch and then pick symbols to show/hide one by one.

Show/Hide symbols one by one in the Symbols list window
Show/Hide symbols one by one in the Symbols list window

Running the same Forex EA on multiple charts

Now that you know how to open multiple charts, let’s discuss an example.

We want to run the same Expert Advisor on 4 different instruments. To do this we simply open 4 chart windows and attach EA to each of them.

This is as easy as it sounds.

mt4-running-four-expert-advisors-on-multiple-charts

When you run the same EA on multiple charts they may conflict with each other, it all depends on the EA and how it’s programmed.

As a rule of thumb, you should be using a different magic number for each EA instance you attach on the same MT4.

But if EA was not designed for multiple charts or it does not have magic number parameter, then it may think that the trades on EURUSD belong to it while actually, EA is running on USDCHF or another pair. When EA on USDCHF gets a signal to close its trades you may be surprised that EA will close all of the trades you have running on an MT4 account, including manually opened trades and trades from other EAs.

If you see such discrepancies you should contact EA developer for help.

Remember, that well programmed EA should not interfere with the trades from other EAs or even the same EA running on another instrument.

Running two different EAs on the same instrument

Now what if you want to run two different EAs on the same instrument, for example, EURUSD?

To do this you simply need to open two chart windows for the EURUSD pair, and you will then be able to attach both MT4 robots. To be exact, the first Forex EA should be attached to the first EURUSD chart and the second EA should be attached to the second EURUSD chart.

However, keep in mind that EURUSD trades opened on the 1st EURUSD chart will also be visible on each other EURUSD chart on the same MT4 account. Even if those charts are of different time frames but have the same instrument, they will all display EURUSD trades.

Two USDCHF chart windows on MT4 terminal share the same trades.
Two USDCHF chart windows on MT4 terminal share the same trades.

This means that 1st EA will be able to access the trades generated by the 2nd EA and the 2nd EA will be able to access the trades generated by the 1st EA.

So how do each EA know which trades belong to itself and which ones came from other EAs?

Using multiple Expert Advisors without conflict on an MT4 trading platform usually requires Magic Number, so better use it.

For each EA to be able to identify its trades a special ID is used, which is called Magic Number. Each trade has a Magic Number and it’s here for just one reason – to make it easy for each EA to detect its own trades.

So when you will be running multiple EAs on the same MT4 account you should always have different Magic Number for each EA instance. Even if it’s the same EA on two or more instruments, you should always have different Magic Number set for each EA instance.

There’s a way to use the same Magic Number if you’re running each EA instance on different instruments, but for this to work properly you should understand what you are doing. Basically, you need to be sure that your EA is designed in such a way that it can handle trading using the same Magic Number on different instruments.

For example, Trendline Trader EA can run on multiple different symbols even with the same Magic Number, each EA instance will not interfere with each other. But I must say not all EAs are created that way and you should know how your EA operates before using it on your MT4 account.

It is important to know how each of your EA works if there are multiple instances of the same EA or even multiple instances of other EAs. If EA is coded incorrectly it may conflict with the other instances of the same or other EAs.

You should check if the EA uses Magic Number to detect its trades and to avoid confusing them with the trades from other EA instances, other Forex robots, or manually opened trades.

Installing many EA on the same MT4 terminal

Installing many EAs is literally the same as installing a single EA. The Expert Advisor file (.ex4 or .mq4) should be copied into the \MQL4\Experts\ folder which is located inside “Data Folder” of your MT4 trading terminal.

Data Folder” can be opened from your MT4 platform by going to “File -> Open Data Folder“.

You can have an unlimited number of EAs installed on any MT4, but note that only 100 EAs can be actively running on 100 separate chart windows in the same MT4 terminal.

And if you have many EAs running on the same account here’s a good article I wrote some time ago about how to analyze over 100 trading strategies on a single MT4 account.

The important thing to mention is that each EA you install into MT4 might need custom indicators to work properly. It’s not that each EA is designed to work with custom indicators, but you should always know what other files must be installed together with each of your EAs.

If you run EA that uses a custom indicator and it does not exist on your MT4 terminal, the EA will fail to work properly. The tricky part is that EAs usually do not give you any alerts if required indicator files are missing, but you should find an error message generated in the EXPERTS tab at the bottom of MT4 window.

However, it can take hours or even days before EA gets an entry signal and prints error message after it fails to load the required indicator.

Why run many Forex robots on the same MT4 terminal?

One of the reasons to run many Forex robots on the same MT4 is that this way you can test many automated strategies at the same time and without the need to run many MT4 terminals.

MT4 allows running 100 Expert Advisors. This means instead of running 100 MT4 terminals with just one Forex robot attached inside you can have one MT4 terminal with 100 robots.

We teach this technique in Forex Robot Academy and it’s the main reason why I found success in automated Forex trading.

Here’s how one of our test MT4 accounts look like:

MyMT4Book analysis of Forex EA
MyMT4Book analysis of Forex EA

Another good reason to run more than one Expert Advisor on MT4 is to copy its trades to other MT4 accounts. This can be done using the Local Trade Copier software.

You simply run your EA on one chart and the Server EA from Local Trade Copier on another chart. The Server EA will detect any trading actions and send them to other MT4 accounts where LTC Client EA is running and repeat each trading action accordingly.

This way you can copy all trades from one MT4 to other MT4 accounts automatically non-stop.

Conclusion

Can I run more than one EA at the same time? Sure you can!

Now you know there is a way of running multiple EAs on multiple pairs for the same account.

But before you start loading multiple EAs onto MetaTrader 4, I highly recommend you to read the instructional manual of each EA you are going to use. I would even say it’s mandatory to read instruction manual so that you learn about EA requirements and limitations.

If that doesn’t tell you anything you may want to contact EA developer and simply ask if this EA can work together with other Expert Advisors on the same MT4 account.

You should find out if the EA uses a Magic Number to identify its own trades and if EA checks to see if it is managing only the trades from the same instrument that it is attached to.

So tell me, how many EAs you are running on the same MT4 account?


Rimantas Petrauskas
Rimantas Petrauskas

First I am a father, a husband and then the author of the book “How to Start Your Own Forex Signals Service”. I am also a Forex trader, a programmer, an entrepreneur, and the founder of ea-coder.com Forex blog. I have created two of the most popular trade copiers and other trading tools for MT4 that are already used world wide by hundreds of currency traders.

    49 replies to "How to Run Multiple Expert Advisors (EA) on MT4 Terminal"

    • John Western

      Rimantas Petrauskas. Thank you. After trawling the internet for hours, you have finally answered my question. Much obliged. Cheers, Steelpig.

    • EA Coder

      John, i am glad my information was helpful to you.

    • Alex

      Hi
      Very useful information
      Thanks Rimantas

    • jacck

      i want to coder angry bird scalper for stop loss. it dose not have in-built stop loss order.
      can u please help me

    • Mac

      Thank you! Great info

    • Carlito

      Hi,

      I am running the same EA on x2 charts, 1. 15Min and 1. 30min chart. I have two different magic numbers 2222 and 2223.

      What I am finding is when I look at chart one (15min) it also shows the trades for chart 2 (the 30min). I am running the same EA on only on one currency pair.

      Is there a way just to show trades for one EA on one chart? without seeing the others trades from chart 30min? frustrating…..

      • Rimantas Petrauskas

        Hi, no, you cannot hide trades that way. MT4 is designed to work in a way that you see all trades of the current chart symbol no matter the magic number.

      • DR MOHAMMAD AREEF

        how you are running the same EA on x2 charts? please describe, i want to do so

        • Rimantas Petrauskas

          Have you read the article? I explain how it’s done 😉
          You need to open two empty charts and add EAs on each.

          • DR MOHAMMAD AREEF

            I have done so. I have opened EUR/USD and GBP/USD charts, attached my same EA on both, but only getting signal for the first EUR/USE pair. Please tell how to make the GBP/USD chart making trades.

            • Rimantas Petrauskas

              I cannot answer your question because I am not familiar with what EA you are using. Contact EA developer.
              Or maybe you just need to be more patient enough and wait for GBPUSD trades. Or, your EA is not designed to trade GBPUSD so you won’t get any trades on it.

    • azam

      great infos.tq

    • Cesar

      Thank you!

    • Massimiliano Papera

      Thank you very much for this information. I was running the same EA on two difference chart/markets and the EA started to take one trade after another no stop and I could not figure out one. Now I know I need to use two different magic number for each implementation of the EA!

    • Chris Padgett

      Nice article. I’m not a coder myself – just a trader. I only know enough about coding to get myself into trouble. I get asked about running multiple EAs on the same chart often, though. Someone recently asked me about doing this with the break even EA I wrote about on my site. I guess as long as one of the EAs use magic numbers, that method should still work right?

      • Rimantas Petrauskas

        Any MT4 can run multiple EAs, but you cannot run them on the same chart. MT4 allows only one EA per chart.
        But you can always open new empty chart and attach additional EAs in there.
        Say if you want to run 5 EAs on MT4 you simply open 5 empty charts and attach EAs one by one to each of them.
        This should work with your EA too, but of course magic number part is important here. Normally each EA should use different EA, but it depends on the EA and what it does.
        If it’s an EA that is trading and you run multiple instances of that EA on MT4 then it should have different magic number for each instance (for each chart so to speak).
        If the EA is a trade manager (like your break even EA), then normally you need to run only one instance of such EA on the account. But of course there could be cases when EA is able to manage trades by a specific set magic number and in such case you can run multiple instances on different charts and of course assign different magic numbers.

        Hope this helps.

        • KarolisP

          Do magic numbers impact trade execution time?

          • Rimantas Petrauskas

            No, magic numbers do not impact trade execution time.

            • KarolisP

              Would magic numbers sort out error 141 “too many requests”? Because from what I understand MN would assign a number to the trade which would separate 2 trades even if they are the same but the EA has different settings which (because of volatility) coincided at the same time.

            • Rimantas Petrauskas

              No, magic numbers have nothing to do with that error. To avoid that error your EA must be coded in a way so that it does not send too many requests to the broker.

    • John

      I have deployed 19 EAs on one MT4 terminal. I receive numerous errors for trade failures with the note “Trade Context is busy.” I have searched for a solution to this problem, but it looks like I will need to learn MQL5 to get around it? Is there any other way?

      • Rimantas Petrauskas

        Yes, there’s a way around it. You run less EAs (8 max in your case), or you can learn how we create EAs to not have this problem. However, this training is paid as we have put lots of effort to create the videos and the extra code you need to be able to run even 100 EAs on the same account without “Trade Context is busy” error.
        You need to join the Portfoliolizer Crash Course to learn this technique of running many Forex EAs on the same MT4.

        • John

          Fair enough! I have viewed your Portfoliolizer course video and it looks like good-quality stuff. I am sending you an email with questions. 🙂

          I would only recommend that you mention potential problems such as this in your original blog post and also present your solution (link to your course), because without leaving a post regarding the matter, I would never have learned of the course/solution. ThanX! (No shame in promoting your course within your blog post!)

    • DR MOHAMMAD AREEF

      fantastic guidance

    • Brian Jones

      So just to be clear in case the other comment didn’t cover it.. Lets say I want to run the same EA on the same currency pair however I want different values per time frame. So just for an example: Lets say we are trading EUR/USD and I want 15m time frame TP 20 pips 1HR TP 25 pips 4HR 30 pips. Even though i open multiple charts in different time frames and I even tried re naming the EA 1-3 and inserting them. Same EA but EA1.ex4 EA2.ex4 etc it wont matter because the limitation is with mt4 itself?

      • Rimantas Petrauskas

        Brian, you need to use a different magic number for each EA. If your EA does not have it then probably you cannot run multiple instances of it, at least on the instrument.

        • Brian Jones

          Ok. I’ll review the code tonight and give it a shot thanks for the feedback!

    • Khomas

      So MT4 can attach LTC client to copytrade from another account on one chart window and attach LTC server to send trades signal on another chart window?

    • Laurentiu

      Hi!

      Let’s say I have many robots (for example 200) and I want to use them all on the same broker

      Could i use 100 robots for one instance of mt4 and the rest 100 on the second instance of mt4 (different magic numbers of course…) with the same broker on the same pairs?

      Thank you!

      • Laurentiu

        If the topic has been discussed before and I could not notice, i apologize.

      • Rimantas Petrauskas

        Yes, you can do that. MT4 limit is 100 EAs per instance.
        I would recommend however 25 EAs per MT4. It makes easier to manage them.

    • Bean

      “Another good reason to run more than one Expert Advisor on MT4 is to copy its trades to other MT4 accounts. This can be done using the Local Trade Copier software. You simply run your EA on one chart and the Server EA from Local Trade Copier on another chart. The Server EA will detect any trading actions and send them to other MT4 accounts where LTC Client EA is running and repeat them accordingly. ”

      Hi, such a great info after I had found so hard from the web. Many Thanks! I got a question, from the above statement in your last paragraph, in order for Local Trade Copier software to copy trade from one chart with own EA, so both server EA and own EA have to put the same magic number, like that the server only can detect the own EA’s orders, is it correct?

      • Rimantas Petrauskas

        Bean, by default Server EA will detect all orders. But in case you need to copy just the trades with a certain magic number then you can setup Server EA to do that.

        • Bean

          thanks for your reply! Great! I will try that out!

    • JMC11

      Hi Rimantas. I understand that you can run multiple EAs within the client terminal on one pc as described above. However, I am trying to work out if it is possible to get two EAs to communicate with each other on two different PCs. I have been running into trouble with the EA being down because of power cut or lose of internet on my PC. What I want to do is to have a second EA run on a different PC which can monitor the first and kick in when the first is no longer functioning or transmitting a signal. I’m wondering if this can be done by using Global Variables on the Terminal. However, I’m not sure if GVs only exist within the terminal on one PC or if they can be accessed through terminal on a second PC. Would appreciate your thoughts or ideas. Note, I use MT4 terminal. Also I have also tried using a VPS but did not find it reliable enough as the EA needs to be running 24/7. Cheers, J.

      • Rimantas Petrauskas

        Global Variables on the Terminal is not the solution here. They exist only on that terminal where they created. They will not appear on another terminal on another computer even if it’s logged into the same MT4 account.
        What you need is a web-server and then have both EAs exchange information through web-server. Or it is possible to create TCP/IP connections between 2 EAs.
        However, that’s complicated, hard to create and expensive.
        The solution is VPS. If you had a bad experience with VPS then you were using a wrong VPS provider.
        Try http://vpsforextrader.com because they are very reliable. We are using them for 5+ years and they have never let us know.
        We have probably 100 MT4s with 1000’s of EAs trading and we could not do this without VPS servers.

    • john

      most EAs are coded…

      total=OrdersTotal();
      if(total<0)

      is there a way to check if the magic number trade is live?

      great video by the way

      • Rimantas Petrauskas

        You have to use “for” loop and filter trades by your specific magic number using the OrderMagicNumber() function.

    • Chris

      Hi- I’m curious whether running multiple EAs in seperate charts on the same instrument (say, EUR/USD) would allow opposite direction trades to be placed.

      In other words, would an open short position with one EA would prevent a long position with another? (I’m using a U.S.-based Oanda MT4 account.)

      Thanks!

      • Rimantas Petrauskas

        If the MT4 account does NOT allow hedge positions (like the U.S. based Oanda MT4 account) then there’s nothing you can do to have opposite direction trades placed on the same instrument. It does not matter if you try to open them by EAs on separate charts or manually, etc. The broker will deny them.

    • Ali

      Hi Ramantas, Great work? If master server use EA to trade and we want to use copier from that master server to clients, how can we attach two EA (one is main EA for trading maf other is copier ) in master server MT4 account ?

      Clients will need only one EA (copier ) with each chart which is fine. BUT master MT4 need two EAs at same time with each chart ( one is to creat trades and other is to copy same trade to clients MT4)

      I will be very grateful for your reply

      • Rimantas Petrauskas

        The short answer is that you open two empty charts on the master MT4 and attach Server EA and your EA on these charts.
        I am very surprised you are asking this question in the comment below the MT4 tutorial which answers your question in detail 🙂
        Please read this tutorial above and you’ll know how to run multiple EA on the same MT4.

    • Richard

      I’m beginning to think Magic numbers are wasted on US brokers like Oanda. Probably better not to use them in many cases. Especially with Oanda since they have a bug where their server occasionally changes the Magic number to zero! Thus leaving the EA thinking it has no trades. And in trouble when it opens new ones. (Saw this happen again just yesterday.)

      Because of the Fifo rules it seems better to limit EAs to one per symbol on an account. Thus the Fifo rule won’t leave you unable to close positions. Loop on orders by symbol instead of by Magic number. Fixes many things.

      Thanks.

    • David Enegwero

      Good morning Sir, great job, but I need to ask, can I run my EA on multiple mt4 trading accounts of different brokers? Or this can be done using a (LTC) local trade copier?

      • Rimantas Petrauskas

        Yes, you can run the same EA on multiple MT4 accounts of different brokers, but expect different results. That happens because different brokers have different spreads, different price feeds, different time zones, different price bars (candles), and because of these factors indicators and price action would show different patterns and values on each account. As a result of this EA will get different entry signals or not get them at all. EA on one broker might get an entry while the same EA on another broker might not get that same entry or get it later or earlier. So the results will be pretty much different in most cases.
        With the trade copier, you can solve that problem because all trades would be copied from one MT4 account that you choose to operate as a master account and have your EA running on it. So even if the client account broker has a different time zone, different prices, and different spreads the trades will be opened at the same time. The entry might differ by a few pips, which is normal, but entries and exits will happen at the same time.

Leave a Reply

Your email address will not be published.