How to Install and Configure an EA on MT4
If you want to know how to install an EA on MT4, the good news is it's a five-minute job once you've done it once — the part traders usually get wrong is the configuration afterwards, not the copy-paste. This guide walks through the full process step by step, from finding the right folder to setting risk parameters that won't blow up your account on the first bad week.
Before You Install: What You Need Ready
Get these sorted first so you're not hunting for files halfway through:
- The EA file itself — usually a
.ex4(compiled, ready to run) or.mq4(source code you compile yourself in MetaEditor). Only run.ex4files from sources you trust. - A demo account — never test an unfamiliar EA on live money. Pepperstone and IG both offer free MT4 demo accounts that mirror live server conditions closely enough for a proper trial run.
- AutoTrading enabled in MT4's toolbar (the button near the top — it should show green, not red).
- Your broker's contract specs — lot sizing, minimum stop distance, and margin requirements differ by broker, and most EAs have inputs that assume certain defaults. Check these on your broker's own specification pages before you touch the EA's settings.
- Knowledge of the EA's strategy type — grid, martingale, trend-following, scalping — because this determines which settings actually matter and how much capital it realistically needs.
If any of this is missing, pause. Installing an EA blind, with AutoTrading off or on the wrong account type, is the single most common reason traders think "the EA doesn't work" when actually it was never running properly.
Step-by-Step: Installing the EA File
1. Open MT4 and go to File > Open Data Folder. This opens the actual folder MT4 reads from — not your Program Files install, which is a common mix-up.
2. Navigate to MQL4 > Experts. Copy your .ex4 or .mq4 file into this folder.
3. If the EA came with an .ex4 and a .set file (a saved settings file), copy the .set file into MQL4 > Presets — you'll load it later.
4. If the EA uses custom indicators, drop those into MQL4 > Indicators at the same time. Missing indicator files are the #1 cause of an EA failing silently.
5. Close MT4 completely and reopen it. MT4 only scans these folders on startup — a simple restart is required, refreshing the Navigator window alone won't pick up new files.
6. In the Navigator panel (Ctrl+N), expand Expert Advisors. Your EA should now appear in the list.
If it doesn't show up, double-check you copied into the Data Folder path and not a different MT4 install on your machine — it's easy to have more than one.
Attaching the EA to a Chart
- Drag the EA name from the Navigator straight onto the chart you want it to trade.
- A properties window opens with several tabs: Common, Inputs, and Dependencies (if applicable).
- On the Common tab, tick Allow live trading — without this, the EA attaches but never places a single trade.
- Decide whether to tick Allow DLL imports — only needed if the EA specifically requires it (check the vendor's documentation); leave it unticked otherwise.
- Click OK. You should see a small icon in the top-right corner of the chart — a smiling face means it's active and trading; a sad face or red cross means something's blocking it (AutoTrading off, live trading not allowed, or an error).
Check the Experts tab in the Terminal window (Ctrl+T) immediately after attaching. Any error messages — wrong symbol, insufficient margin, invalid input — show up here first, before you waste time wondering why nothing's happening on the chart.
Configuring the Inputs Correctly
This is the step that separates a properly tested EA from a gamble. On the Inputs tab you'll typically find:
| Setting | What it controls | Common mistake | |---|---|---| | Lot size / risk % | Position sizing per trade | Left on a default meant for a $50,000 account | | Stop loss / take profit | Exit points in pips or price | Set below broker's minimum stop distance | | Magic number | Identifies the EA's trades separately from manual ones | Left identical across multiple EAs on one account, causing conflicts | | Max spread filter | Blocks trades when spread widens | Set too tight for the broker's typical spread, so it never trades | | Trading hours | Restricts activity to certain sessions | Left in the vendor's timezone, not yours or the broker's |
If you have a .set file, click Load and select it rather than re-typing every field manually — but still review each value against your actual account size and broker conditions. A .set file built for one broker's spread and execution model won't necessarily suit another.
This is also where broker-specific costs start to matter. Spreads, commissions and swap rates directly affect whether an EA's strategy is even viable — a scalping EA that looks profitable in a backtest can be wiped out by real-world costs. Run your setup through PipTax's cost tool at /audit.html before committing real capital, so you know the actual spread and commission drag you're working with, and compare it against listed brokers at /brokers/index.html.
Testing Before Going Live
- Use MT4's Strategy Tester (Ctrl+R) to backtest the EA on historical data first — pick a date range covering at least one full market cycle, not just a quiet trending month.
- Run it forward on a demo account for at least a few weeks in real market conditions, watching for slippage, requotes, and whether the max spread filter is actually appropriate.
- Check that the EA behaves the same on your broker's demo as on the vendor's marketing screenshots — execution speed and spread vary meaningfully between brokers, which is why the same EA can perform differently on, say, a Pepperstone Razor account versus an IG standard account.
- Keep a simple log: date, EA version, settings used, and outcome — this makes troubleshooting far easier than trying to remember what changed three weeks ago.
Common Installation Problems and Fixes
- EA attached but not trading — check AutoTrading is green, "Allow live trading" is ticked, and there's no error in the Experts tab.
- "Not enough money" error — lot size input too large for account equity; reduce it or check margin requirements with your broker.
- EA disappears after restart — it was saved with the chart but not genuinely installed in the Experts folder; redo the copy step.
- Multiple EAs conflicting — give each a unique magic number so they don't interfere with each other's positions.
- Works on demo, not on live — often down to different spread, execution speed or symbol naming (e.g. "EURUSD" vs "EURUSD.a") between accounts.
Final Checklist Before Trading Live
Installing and configuring an EA on MT4 is straightforward once you've been through it properly — the real work is verifying it, not copying the file. Before switching from demo to live:
- Confirm AutoTrading is on and the smiley face is showing.
- Re-check inputs against your actual live account size, not the demo's.
- Run current numbers through /audit.html so you understand the real cost impact on the strategy.
- Compare execution conditions across brokers at /brokers/index.html rather than assuming one broker suits every EA.
- Start with a small lot size regardless of what the
.setfile recommends.
Remember that no EA removes the risk of trading — it automates execution, not certainty, so treat every new setup as an experiment with money you can afford to lose.
Key takeaways
- <parameter name="value">["MT4 only scans for new EA files on startup
- so you must restart the platform after copying files into the Experts folder."
- "AutoTrading must be enabled and 'Allow live trading' ticked on the EA's properties
- or it will attach but never place a trade."
- "Use unique magic numbers for each EA so multiple automated strategies don't interfere with each other's positions."
- "A .set file built on one broker's spread and execution model may not suit another — always review inputs against your actual account."
- "Backtest in the Strategy Tester
- then forward-test on demo for several weeks before risking live capital."
- "Run your setup through PipTax's cost tool at /audit.html
- since spreads and commissions directly affect whether an EA's strategy is actually viable."]