Run your first EA
Welcome to the official EA Builder Pro - How to run your first EA - tutorial. You can have your first trading bot (EA) up and running on your desktop computer within the next 30 minutes, simply by following this step-by-step tutorial.
In short:
- Install MetaTrader and open a demo account.
- Add an EA from a template in EA Builder Pro and export it.
- Copy the EA to MetaTrader and allow automated trading.
- Backtest it in the Strategy Tester, then run it on a chart.
If you already have MetaTrader installed and downloaded your EA, skip to Get EA ready to run.
Getting MetaTrader set up
Section titled “Getting MetaTrader set up”Every broker has its own MetaTrader installer. We will create an account and install MetaTrader with Switch Markets. Unsure why? Read why you should.
-
Sign up and enter your information. From our experience, you won’t be contacted by their sales department, a practice common among many brokers. You will get e-mails though.

Enter your information to open an account -
Upload the additional documents you are asked for. You don’t need a credit card to open an account and test your EAs. If you decide to deposit, you get free bonuses, as discussed before.
-
Once you are logged in, click Downloads and select your OS and MetaTrader version. We recommend MT5. Run the installer.

Download the MetaTrader installer -
Start MetaTrader. It asks you to log in; you get the login details in the next step.

MetaTrader asking for log in information. -
Back on the Switch Markets website, create a Demo account (and a Live account when you’re ready):
- Standard: no commission per lot, but a larger spread.
- Pro (ECN): the smallest spread, with a commission per lot. We prefer a Pro account. The best choice depends on what your EA is optimized for.

Create your MetaTrader account -
You see “Your account [Account number] has been successfully created”, with a password; you also get them by e-mail. Log in to MetaTrader with them. The charts load, and MetaTrader is ready for manual trading. We’ll enable automated trading in a moment.
Create an EA using EA Builder Pro
Section titled “Create an EA using EA Builder Pro ”You don’t need to build your own perfect EA yet: add one of our templates, export it and run it.
Add an EA from a template
Section titled “Add an EA from a template”- Open our webtool. Check that the platform button
in the app bar shows the platform you installed:
MT4orMT5. - Click + Add Expert Advisor and choose Template.
- Choose a template without a Pro label, for example Moving average MT5. Don’t choose Blank: a blank EA doesn’t trade.
- Click Add Expert Advisor. Your EA opens in the EA editor.


See Add a new Expert Advisor for all the options.
Export your EA
Section titled “Export your EA”Click Export to MetaTrader 5 (or 4) and choose:
- Compiled EA (.ex5): ready to run in MetaTrader. Available on every plan.
- MQL Source code (.mq5): the source code, which you compile in MetaEditor. Needs a Pro subscription.


Exported the source code? Double-click the downloaded file: MetaEditor opens it. Click Compile to turn the .mq5 file into an .ex5 file.


See Export to MT4 / MT5 for more.
Copy the EA to MetaTrader
Section titled “Copy the EA to MetaTrader”- In MetaTrader, click File > Open Data Folder.
- Open the
MQL5folder (MT4:MQL4), then theExpertsfolder. - Move the downloaded file into it.
- In the Navigator panel, right-click Expert Advisors and click Refresh. Your EA is in the list.
Get EA ready to run
Section titled “Get EA ready to run”Before you can run your EA, allow MetaTrader to trade automatically.
- In MetaTrader 4, go to Tools > Options and open the Expert Advisors tab.
- Check Allow automated trading. If you leave the Disable … checkboxes checked, the EA is disabled automatically when you do those actions. It’s up to you whether you want that.
- Click OK.


- In MetaTrader 5, go to Tools > Options and open the Expert Advisors tab.
- Check Allow automated trading. If you leave the Disable … checkboxes checked, the EA is disabled automatically when you do those actions. It’s up to you whether you want that.
- Click OK.


Run backtest
Section titled “Run backtest”Now test the EA on past prices in MetaTrader’s Strategy Tester.
- Open the Strategy Tester panel (MT4: Tester). Not visible? Go to View and select it.
- Select your EA, a symbol and a period.
- Enable Visual mode with the display of charts, … to see what the EA does. It’s the best way to see the EA at work, but much slower than without.
- Click Start. The EA opens orders on the chart.


When the test is done, the Backtest tab of the Strategy Tester shows the result.
You can also backtest in the cloud, without MetaTrader and without exporting: click Run backtest in the EA editor. The report shows the result of your EA: the key figures, the balance, when it traded, how long positions were open, and all the statistics and inputs.


See Run a backtest and Read your backtest results.
Run your EA on a chart (Demo/ Live)
Section titled “Run your EA on a chart (Demo/ Live)”Now that we know the EA works, run it on a real-time chart. Do this later for your own EA too, to check that it runs well in real-time trading. Start on a demo account.
-
Drag your EA from the Navigator panel onto a chart.
-
In the window that opens, on the Common tab, check Allow live trading.


Common - Expert advisor MT4 -
Click OK.
-
Check that a happy face shows in the top right corner of the chart.


Expert advisor MT4 successfully running
No happy face? Open the Terminal panel and look at the Experts and Journal tabs: an error message tells you why the EA isn’t running.
-
Drag your EA from the Navigator panel onto a chart.
-
In the window that opens, on the Common tab, check Allow Algo Trading.


Common - Expert advisor MT5 -
Click OK.
-
Check that a blue hat shows in the top right corner of the chart. A gray hat means the EA is disabled.


Expert advisor MT5 successfully running
No blue hat? Open the Toolbox panel and look at the Experts and Journal tabs: an error message tells you why the EA isn’t running.
Having Trouble Running Your EA?
Section titled “Having Trouble Running Your EA?”- Check the Troubleshooting Page: common problems and their fixes.
- Still stuck? Contact us and describe the problem: we’re here to help.
Next steps
Section titled “Next steps”- Build an EA with EA Builder Pro: our deep dive tutorial, to build your own EA
- Get everything you need: free (coaching) bonuses to become a better trader
- Alerts & Notifications: get notified when your EA needs attention
MetaTrader is a registered trademark of MetaQuotes Ltd. EA Builder Pro is not affiliated with MetaQuotes.