How to Install and Configure an EA on MT4
If you want to install and configure an EA on MT4 correctly, the process is mostly mechanical — but the small settings you tick or skip can be the difference between a robot that trades as intended and one that quietly does something you never asked for. This guide walks through the whole workflow, from copying files into the right folder to running a proper demo test before any real money is involved.
What an EA Actually Is (and Why Setup Matters)
An Expert Advisor (EA) is an automated trading script that runs inside MT4 and executes trades based on rules coded by its developer. It can open, manage and close positions without you clicking anything — which is exactly why installation and configuration deserve care.
A few things to understand before you install one:
- EAs are only as good as their settings. Default inputs are rarely tuned for your account size, symbol or broker's execution model.
- They depend on your platform running. If MT4 closes, or you lose internet, the EA stops managing trades — most retail setups aren't running on a VPS by default.
- Execution costs affect results. Spreads, commissions and swaps eat into any strategy's edge, so always check live costs on the [PipTax cost tool](/audit.html) rather than assuming a backtest reflects real trading conditions.
- Not all EAs suit all brokers. Scalping-style EAs, for example, may behave very differently between an ECN account and a standard spread-only account — compare setups on the [brokers page](/brokers/index.html) before committing.
Step 1: Get the EA File and Check It's Genuine
Before touching MT4, make sure you have the correct file type and a legitimate source.
- EAs come as .ex4 (compiled, ready to run) or .mq4 (source code you compile yourself in MetaEditor).
- Only download EAs from a source you trust — a vendor's official site, a regulated marketplace, or your own coding. Unverified files can contain hidden logic.
- Note the minimum account size, leverage or broker requirements the developer specifies, if any.
- Keep a copy of the original file somewhere safe in case you need to reinstall after a platform update.
Step 2: Install the EA into MT4
This is the core mechanical step, and it's the same on every MT4 build:
1. Open MT4 and click File > Open Data Folder. This opens the platform's actual working directory (different from your desktop shortcut location). 2. Navigate to MQL4 > Experts. 3. Copy your .ex4 or .mq4 file into this folder. 4. If the EA comes with extra files (indicators, libraries, set-files), place them in their matching folders — Indicators, Libraries, or leave .set files in MQL4/Presets. 5. Close MT4 completely and reopen it — a simple refresh sometimes isn't enough for MT4 to register 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 it into the *Data Folder* version of MQL4, not a random folder on your PC.
Step 3: Attach the EA to a Chart and Set Permissions
Installing the file isn't the same as running it — MT4 needs explicit permission to let an EA trade.
- Drag the EA from the Navigator onto the chart of the instrument it's designed for (timeframe matters too, if the strategy is timeframe-specific).
- A settings window opens with three key tabs:
- - Common — tick Allow live trading and Allow DLL imports if the EA requires it (only enable DLL imports if you trust the source).
- - Inputs — this is where you configure lot size, risk %, stop-loss/take-profit logic, and any strategy-specific parameters.
- - Dependencies — confirm any required indicators are present.
- Once attached, check the top-right corner of the chart: a smiley face icon means the EA is running; a frowning face means something is disabled (usually AutoTrading or live trading permission).
- Also confirm the master AutoTrading button in the toolbar is switched on — this is a platform-wide switch that overrides individual EA settings.
Step 4: Configure Inputs Properly
This is where most avoidable mistakes happen. Don't just accept default values.
| Setting | What to check | |---|---| | Lot size / risk % | Match to your actual account balance, not the developer's example account | | Stop-loss / take-profit | Confirm units (pips vs points) match your broker's quoting convention | | Max spread filter | Set sensibly using real spread data from the [cost tool](/audit.html), not guesswork | | Magic number | Keep unique per EA if running more than one, so they don't interfere with each other's trades | | Trading hours filter | Align with the sessions the strategy was designed for |
Save your configured inputs as a .set file (Save button in the Inputs tab) so you don't have to re-enter everything if you reinstall or move to another chart.
Step 5: Test on Demo Before Going Live
Never attach a newly configured EA directly to a live account.
- Run it on a demo account with the same broker and account type you intend to trade live — execution and spreads can differ between brokers, and even between account types at the same broker.
- Use the Strategy Tester (Ctrl+R) to backtest across different market conditions, but treat backtest results as directional, not guaranteed — historical fills rarely match live slippage exactly.
- Watch the Experts and Journal tabs at the bottom of MT4 for error messages — these reveal permission issues, broker rejections, or coding errors immediately.
- Give it enough time on demo to see it handle a range of conditions, not just one calm week.
Step 6: Move to Live Carefully
Once you're confident the EA behaves as expected on demo:
- Start with a small position size, even if your risk settings allow more.
- Re-check the Common tab settings — permissions don't always carry over cleanly between charts or after platform updates.
- Monitor the account daily at first, particularly after news events or low-liquidity sessions.
- Revisit your broker's execution and cost profile periodically via the [cost tool](/audit.html) — spreads and commissions aren't static, and they directly affect an EA's real-world performance versus its backtest.
Conclusion
Learning to install and configure an EA on MT4 is straightforward once you've done it once: copy the file into the Experts folder, attach it to the right chart, set permissions correctly, configure inputs to match your account, and test thoroughly on demo before any live exposure. Automation doesn't remove risk — it just changes where you need to pay attention. For the parts fabricated numbers can't help with, like your actual spread or commission costs on a given broker, use PipTax's tools rather than the EA vendor's marketing claims.
Trading with an EA carries the same risks as manual trading, plus the added risk of software errors or misconfiguration — never risk money you can't afford to lose.
Key takeaways
- <UNKNOWN>
Frequently asked questions
- Do I need a VPS to run an EA on MT4?
- Not strictly, but if your computer or internet connection goes down, the EA stops managing trades. A VPS keeps MT4 running 24/5 so the EA can respond to the market even when your device is off.
- Why doesn't my EA show a smiley face after I attach it to a chart?
- A frowning face usually means either 'Allow live trading' wasn't ticked in the Common tab, or the master AutoTrading button in the toolbar is switched off. Check both settings.
- Can I run more than one EA at the same time on MT4?
- Yes, on different charts or even the same chart, but give each a unique magic number in its inputs so they don't interfere with each other's trade management.
- Should I trust an EA's backtest results?
- Treat backtests as a rough guide, not a guarantee. Historical fills, spreads and slippage rarely match live conditions exactly, so always confirm real costs using PipTax's cost tool before scaling up.
- What's the difference between .ex4 and .mq4 files?
- .ex4 is a compiled file ready to run in MT4. .mq4 is the source code, which you can open and compile yourself in MetaEditor if you want to inspect or modify the logic.
- Is it safe to enable DLL imports for an EA?
- Only if you trust the source completely. DLL imports let the EA interact with external files or programs, which can be a security risk if the EA isn't from a verified developer.