How to Install and Configure an EA on MT4
If you want to install and configure an EA on MT4 correctly, the process comes down to getting the file in the right folder, enabling AutoTrading properly, and checking the EA's settings before you let it near real money. This guide walks through each step in order, plus the checks most traders skip and later regret.
What You Need Before You Start
Before touching any files, make sure you have the basics in place:
- MetaTrader 4 installed and working, ideally the version supplied by your broker (Pepperstone and IG both offer their own MT4 downloads, which are pre-configured with their server details).
- The EA file itself — usually a
.ex4file (compiled, ready to run) or a.mq4file (source code, which MT4 compiles for you). - A demo account to test on first. Never install an unfamiliar EA straight onto a live account.
- Basic understanding of the strategy the EA runs — what it trades, on which timeframe, and what risk settings it expects.
It's also worth knowing that an EA is only ever as good as the account it runs on. Spreads, commissions and swap charges eat into automated strategies just as they do manual trades, so before you go live, it's worth running your intended broker through /audit.html to see the real cost impact over a typical month of EA trading.
Finding and Opening the MT4 Data Folder
MT4 stores EAs in its Data Folder, not in the general Program Files location, which is where most installation mistakes happen.
To find it:
1. Open MT4. 2. Click File in the top menu. 3. Select Open Data Folder. 4. A Windows Explorer window opens — this is where MT4 actually looks for EAs, indicators and scripts.
Inside the Data Folder, navigate to:
`
MQL4 > Experts
`
This is the folder where EA files belong. Any .ex4 or .mq4 file placed elsewhere simply won't appear in MT4's Navigator panel, no matter how many times you restart the platform.
Installing the EA File
Once you're in the correct Experts folder:
1. Copy the EA file (.ex4 or .mq4) into this folder.
2. Close MT4 completely if it's open.
3. Reopen MT4 — this forces the platform to rescan the Experts folder.
4. Open the Navigator panel (Ctrl+N if it's not visible).
5. Expand Expert Advisors — your EA should now be listed by name.
If it doesn't appear:
- Double-check the file went into
MQL4 > Experts, not a subfolder or the main Data Folder. - Confirm the file extension is
.ex4or.mq4— some downloads accidentally save as.txt. - If it's a
.mq4file, MT4 needs to compile it first via the MetaEditor (open the file there and press F7).
Attaching the EA to a Chart
With the EA visible in the Navigator, drag it onto the chart of the currency pair it's designed to trade.
A settings window will open with several tabs:
- Common — this is where you tick Allow live trading (essential — without this, the EA will not place any orders) and optionally Allow DLL imports if the EA requires it.
- Inputs — the EA's configurable parameters: lot size, stop loss, take profit, magic number, and any strategy-specific settings. Read the EA's documentation here; guessing values is how accounts get blown.
- Dependencies — any extra files (like custom indicators) the EA relies on.
Click OK once everything is checked. You should see the EA's name appear in the top-right corner of the chart with a small icon.
Enabling AutoTrading Correctly
This is the step most new EA users miss. AutoTrading needs to be switched on in two places:
1. Globally — the AutoTrading button on MT4's main toolbar. It should show green when active. 2. On the chart itself — confirmed via the Common tab tick box mentioned above.
Check the icon in the chart's top-right corner:
| Icon | Meaning | |---|---| | Smiley face | EA is running and AutoTrading is enabled | | Frown/red X | AutoTrading is off, or an error is blocking the EA | | No icon at all | EA didn't attach — check installation steps above |
If you see a frown face, click the global AutoTrading button first, then re-check the chart settings. It's a two-switch system by design, as a safeguard against accidentally running an EA you didn't mean to.
Testing Before You Go Live
Once the EA is running, don't walk away and assume it's working correctly.
- Open the Terminal window (Ctrl+T) and check the Experts tab for log messages — errors, rejected orders, or connection issues show up here first.
- Check the Journal tab for broader platform messages, including any server-side rejections.
- Watch the Trade tab to confirm positions are opening and closing as expected.
- Run the EA on a demo account for several weeks minimum, ideally across different market conditions, before considering real funds.
Keep notes: which settings you used, what dates you tested, and how results compared to what the EA's documentation claimed. This is the same discipline PipTax recommends for manual strategies too — see /school/index.html for broader risk and testing frameworks.
Common Mistakes and How to Avoid Them
Even experienced traders trip up on EA setup. Watch out for:
- Wrong timeframe — many EAs are built for a specific timeframe (e.g. M15 or H1). Running them on the wrong chart timeframe can produce very different results.
- Ignoring magic numbers — if you run multiple EAs on the same account, mismatched or duplicate magic numbers can cause them to interfere with each other's trades.
- Not checking broker execution type — some EAs, particularly scalping strategies, need fast execution and tight spreads to function as intended. Compare execution models and live costs across brokers via /brokers/index.html before committing.
- Skipping the demo phase — always confirm an EA behaves as expected before funding it with real capital.
- Forgetting VPS/uptime — an EA only trades while MT4 is running and connected; if you close your laptop, it stops working unless you're using a VPS.
Learning to install and configure an EA on MT4 properly takes twenty minutes the first time and seconds thereafter — but it's the checking and testing around that installation that actually protects your account. For a full picture of how spreads, commissions and swaps affect an EA's real-world results, run your setup through /audit.html, and see our /methodology.html page for how those cost comparisons are built.
Key takeaways
- To install and configure an EA on MT4, you must copy the EA file into the correct Data Folder location, not just anywhere on your computer.
- AutoTrading must be enabled both globally (toolbar button) and on the individual chart (Common tab) or the EA will sit idle.
- Always check the EA's required inputs, timeframe, and symbol before switching it on — wrong settings are a common cause of unexpected losses.
- Test any new EA on a demo account for at least a few weeks before considering real money.
- Broker execution, spreads and swaps affect EA performance as much as the strategy itself — use /audit.html to compare real costs.
- Keep a written log of EA settings, dates enabled/disabled, and results so you can review performance honestly.
Frequently asked questions
- Do I need MT4 or MT5 to run an EA?
- EAs are platform-specific. Files written for MT4 (.ex4/.mq4) will not run on MT5, and vice versa. Check which platform your broker, such as Pepperstone or IG, offers and download the matching EA version.
- Why does my EA icon show a red X or frown face?
- This usually means AutoTrading is disabled, either globally via the toolbar button or on that specific chart under the Common tab settings. Enable both and the icon should turn to a smiley face.
- Can I run an EA on a demo account first?
- Yes, and you should. Demo testing lets you confirm the EA installs correctly, trades as expected, and matches your risk tolerance before any real money is involved.
- Why isn't my EA placing any trades?
- Common causes include AutoTrading being off, the chart symbol or timeframe not matching what the EA expects, insufficient account margin, or the broker's execution settings blocking certain order types. Check the Experts tab in the terminal for error messages.
- Does the broker I choose affect EA performance?
- Yes. Spreads, commissions, swaps and execution speed all affect the real return of an automated strategy. Two brokers running the identical EA can produce different results purely from cost differences, so it's worth comparing on /audit.html.