CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Most retail investor accounts lose money when trading CFDs. PipTax is educational and compares costs; it is not investment advice.

HomeLearn › Tutorials

How to Install and Configure an EA on MT4

Updated 14 July 2026 · 8 min read · PipTax education

Trader configuring an expert advisor on the MT4 platform with chart and settings window visible

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:

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.

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.

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.

Step 6: Move to Live Carefully

Once you're confident the EA behaves as expected on demo:

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>
Want the real number for how you trade? Audit your MT4/MT5 statement free — see your true all-in cost and the genuinely cheapest broker for your style.

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.

Keep going: Audit Index Index Methodology