How to Install and Configure an EA on MT4
If you want to install and configure an EA on MT4, the process is mostly mechanical: copy files into the right folder, restart the platform, drag the EA onto a chart, and tick a couple of boxes. The bit traders usually get wrong is the configuration step afterwards — leaving default inputs in place, forgetting to enable automated trading, or not checking how their broker's execution actually affects the strategy. This guide walks through both parts properly.
What You Need Before You Start
Before touching any files, get the basics sorted:
- A working MT4 account — either live or demo, doesn't matter for setup practice. Most brokers, including Pepperstone and IG, offer MT4 alongside their own platforms.
- The EA files — usually a
.ex4file, sometimes with a.setfile for pre-configured inputs, and occasionally a.dllif it needs external libraries (rare, and worth being cautious about). - Knowledge of the strategy — what pairs it trades, what timeframe, what the inputs mean. Never run an EA blind.
- A demo account — always test new EAs here first, no exceptions.
It's also worth checking your broker's execution model and typical spreads before you commit an EA to a live account. Scalping-style EAs in particular are sensitive to slippage and commission structure, so run your numbers through the [cost audit tool](/audit.html) first.
Installing the EA Files
1. Open MT4 and go to File > Open Data Folder. This opens the actual folder MT4 uses, which is different from where the program is installed.
2. Navigate to MQL4 > Experts. This is where .ex4 files go.
3. If there's a matching .set file, that goes in MQL4 > Presets (not essential — you can also just load it later from within the EA's settings window).
4. Copy the EA file(s) into the Experts folder.
5. Close MT4 completely and reopen it. MT4 only scans these folders on startup, so skipping this step is the single most common reason an EA doesn't show up.
6. Open the Navigator window (Ctrl+N if it's hidden) and expand Expert Advisors. Your EA should now be listed.
If it's still not there, double-check you copied it into MQL4/Experts and not just MQL4, and that the file extension is .ex4 (compiled) rather than .mq4 (source code, which needs compiling in MetaEditor first).
Attaching the EA to a Chart
Once it's visible in the Navigator:
1. Open a chart for the pair the EA is designed to trade, on the correct timeframe. 2. Drag the EA from the Navigator directly onto the chart, or right-click it and choose Attach to chart. 3. A settings window pops up with several tabs — Common, Inputs, and sometimes Dependencies or Notifications. 4. In the Common tab, tick Allow live trading (labelled slightly differently depending on your MT4 build, but it's the automated-trading permission box). 5. Click OK.
You'll know it's attached correctly if you see a smiley face icon in the top-right corner of the chart. A sad face or red icon means something's blocking it — usually the global AutoTrading button being switched off.
Enabling Automated Trading Globally
MT4 has a master switch separate from the per-chart setting. Look at the toolbar for the AutoTrading button:
- Green = automated trading enabled platform-wide
- Red = disabled — no EA will place trades, even if attached correctly
Click it to toggle. Also check Tools > Options > Expert Advisors tab and confirm:
- Allow automated trading is ticked
- Allow DLL imports is ticked only if the EA genuinely needs it (don't tick this blindly for unknown EAs — it's a security consideration)
- Allow WebRequest is configured if the EA needs to phone out to a URL (e.g. for notifications)
Configuring the Inputs Properly
This is where most traders rush and shouldn't. Go back into the EA's settings (right-click chart > Expert Advisors > Properties) and open the Inputs tab.
Common settings you'll typically find, and what to check:
| Setting | What to check | |---|---| | Lot size / risk % | Match to your account size — don't leave a default that assumes a much larger balance | | Stop loss / take profit | Confirm units (pips vs points) match your broker's quote precision | | Magic number | Unique per EA/pair combination so trades don't get mixed up | | Max spread filter | Set sensibly against your broker's typical spread — check via [the cost tool](/audit.html) | | Trading hours | Some EAs need session filters to avoid illiquid periods |
If a .set file came with the strategy, load it via Load in this tab rather than typing everything manually — it's faster and less error-prone.
Testing Before Going Live
Never attach a newly configured EA straight to a live account. Instead:
- Run it on demo for at least several weeks, ideally covering different volatility conditions.
- Use MT4's built-in Strategy Tester (View > Strategy Tester, or Ctrl+R) to backtest against historical data and sanity-check that trades are opening/closing as expected.
- Watch the Experts and Journal tabs at the bottom of MT4 for error messages — these will tell you about rejected orders, invalid stops, or permission issues immediately.
- Confirm the EA behaves consistently across a restart of MT4 or the VPS it's hosted on, since some EAs lose track of open positions if not coded defensively.
Getting the Broker Side Right
An EA can be installed and configured perfectly and still underperform if the trading conditions don't suit it. Things worth checking on your broker account, whether that's Pepperstone, IG, or elsewhere:
- Execution model — market execution vs instant execution changes how slippage is handled
- Spread type — fixed or variable, and how it behaves during news
- Commission structure — some account types charge per-lot commission on top of spread
- Swap rates — relevant if the EA holds trades overnight
None of these are things to guess at — compare them properly using the [cost audit tool](/audit.html) and the [broker comparison pages](/brokers/index.html), and read up on execution basics in the [trading school](/school/index.html) if any of the terms above are unfamiliar.
Conclusion
Learning how to install and configure an EA on MT4 properly takes twenty minutes the first time and becomes routine after that — the key steps are placing files in the right folder, restarting MT4, attaching the EA with automated trading enabled both globally and per-chart, and taking the time to set inputs correctly rather than leaving defaults. Test thoroughly on demo, watch the Journal for errors, and remember that even a well-configured EA is only as good as the broker conditions it's trading under, so check spreads, commissions and swaps before committing real money.
Key takeaways
- EAs must go in the correct MQL4/Experts folder and MT4 needs a restart before they appear in the Navigator
- Automated trading has to be enabled both globally in MT4 and on the individual chart via the EA's Common tab
- Always run a new EA on a demo account first and check the Journal and Experts tabs for error messages
- Input settings like lot size, stop loss and magic number should match the strategy's documentation, not be left on defaults
- Broker execution model, spreads and swaps affect EA performance just as much as the code itself, so check these with the cost tool
- Backtesting in the Strategy Tester before going live helps catch obvious configuration mistakes
Frequently asked questions
- Why can't I see my EA in the Navigator window after installing it?
- This is almost always because MT4 hasn't been restarted after the files were copied into the MQL4 folder, or the files were placed in the wrong subfolder. Close MT4 completely, reopen it, and check under Navigator > Expert Advisors. If it's still missing, confirm the .ex4 file is in MQL4/Experts, not just MQL4.
- Do I need to enable AutoTrading every time I open MT4?
- The AutoTrading button in the toolbar can switch off if MT4 restarts, loses connection, or after certain updates. It's worth checking this button is green before you leave an EA running, especially after a platform or VPS restart.
- Can I run more than one EA at the same time on MT4?
- Yes, you can run different EAs on different charts, or even the same EA on multiple pairs, as long as each has a unique magic number so they don't interfere with each other's trade management.
- Will an EA work the same on any broker's MT4?
- The code will run the same, but real-world results depend on your broker's spreads, commissions, swaps and execution speed. Two brokers with identical MT4 builds can still produce different outcomes for the same EA, which is why it's worth comparing costs on brokers such as Pepperstone or IG using a proper cost tool rather than assuming.
- What's the safest way to test a new EA before going live?
- Run it on a demo account for at least a few weeks across different market conditions, then use MT4's Strategy Tester with historical data to sanity-check the logic. Only move to a live account once you understand every input setting and have set conservative position sizing.