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 a file, restart the platform, drag the EA onto a chart, tick a few boxes — but getting every step right matters, because a missed setting is the number one reason "my EA isn't trading." This guide walks through the full workflow, from file placement to the real-money checks most tutorials skip.
What You Need Before You Start
Before touching any files, make sure the basics are in place:
- MT4 installed and working — able to log into a demo or live account and see live prices.
- The EA file itself, usually a
.ex4file (compiled, ready to run) or a.mq4file (source code you compile yourself in MetaEditor). - Any accompanying files the EA needs — set files (
.set), include files, or DLLs, which should come with instructions from whoever built the EA. - A broker that permits automated trading on the account type you're using. Most FCA-regulated brokers, including Pepperstone and IG, allow EAs on their MT4 offerings, but always confirm on the specific account you'll be trading — check current terms on the [brokers page](/brokers/index.html).
- A demo account to test on first. Never install a new EA straight onto a live account.
It's also worth knowing what the EA is actually meant to do — scalping, grid, martingale, trend-following — since that shapes the settings you'll need to check later, particularly around lot sizing and risk.
Step 1: Copy the EA File Into the Correct Folder
MT4 looks for expert advisors in a specific data folder, not wherever you downloaded the file:
1. Open MT4, then go to File > Open Data Folder.
2. Navigate to MQL4 > Experts.
3. Copy your .ex4 (or .mq4) file into this folder.
4. If the EA came with a .set file, place it in MQL4 > Presets so it's easy to find later.
5. Close and restart MT4 completely — a simple refresh sometimes isn't enough for new files to register.
If you're compiling from .mq4 source code yourself, open the file in MetaEditor (accessible from MT4's toolbar) and press Compile. Fix any errors shown in the log before proceeding — a failed compile means the EA won't appear as usable in the Navigator.
Step 2: Enable Automated Trading in MT4
MT4 has a master switch for automated trading that overrides everything else:
- Click the "Algo Trading" (older builds: "AutoTrading") button in the top toolbar so it turns green.
- Go to Tools > Options > Expert Advisors tab and confirm:
- - "Allow automated trading" is ticked.
- - "Allow DLL imports" is ticked if the EA requires it (check the EA's documentation).
- - "Allow WebRequest for listed URL" is set up if the EA sends data externally (rare, but some do).
If this toolbar switch is off, no EA will trade, regardless of its own internal settings — this is the single most common install issue.
Step 3: Attach the EA to a Chart
Once the file is in place and automated trading is enabled:
1. Open the Navigator window (Ctrl+N if it's hidden). 2. Expand Expert Advisors — your EA should now appear in the list. 3. Open the chart for the correct currency pair and timeframe (check the EA's instructions — many are timeframe-specific). 4. Drag the EA from the Navigator onto the chart. 5. A settings window will pop up automatically — don't close it yet, this is where configuration happens.
A small icon appears in the top-right corner of the chart once attached: a smiling face means it's active and permitted to trade, a sad or grey face means something is still blocking it (usually Step 2).
Step 4: Configure the EA's Settings
This is where most of the real decision-making happens, and it's specific to each EA, but common fields include:
- Lot size / risk per trade — fixed lots or a percentage-of-balance calculation.
- Stop loss and take profit (in points or pips) — some EAs manage this internally instead.
- Magic number — a unique ID so this EA's trades don't get mixed up with another EA or manual trades on the same account.
- Trading hours/session filters — restrict activity to certain times if the strategy is session-specific.
- Allow live trading — a checkbox inside the EA's own "Common" tab; tick this alongside the platform-wide toggle.
Load a .set file here if one was provided, rather than guessing at inputs — it saves time and reduces the risk of misconfiguring a parameter you don't fully understand. Save your own settings as a new .set file once you're happy, so you can reapply them after any platform update.
Backtesting and Forward Testing
Never assume an EA works simply because it installed correctly. Before going near real money:
- Use MT4's Strategy Tester (View > Strategy Tester) to run the EA against historical data on the intended pair and timeframe.
- Check the quality of tick data used — poor data produces misleading backtest results.
- Run the EA on a demo account in real time for at least several weeks to see how it behaves in live market conditions, including news events and low-liquidity periods.
- Compare backtest assumptions (spread, slippage) against what you'll actually pay — this is where broker choice starts to matter. Get the real, current numbers from the [PipTax cost tool](/audit.html) rather than relying on the EA vendor's marketing claims.
Our [methodology page](/methodology.html) explains how we source and verify comparison data if you want to see how we approach cost accuracy generally.
Going Live: Final Checks
Once you're confident in testing results, moving to a live account needs its own checklist:
- Confirm your broker and account type allow EAs — some cent or swap-free accounts have restrictions.
- Start with smaller lot sizes than backtested, until you've confirmed live execution matches expectations.
- Set up a VPS if the EA needs to trade outside your normal hours — MT4 must stay open and connected to trade at all.
- Monitor spread and commission drag on live results versus backtest assumptions; even small differences compound over hundreds of trades.
- Keep a trading journal of live EA performance separate from manual trades, so you can judge it fairly.
If you're new to automated trading concepts generally, the [PipTax school](/school/index.html) has broader lessons on risk management and platform mechanics worth reviewing alongside this guide.
Conclusion
Learning to install and configure an EA on MT4 is straightforward once you know the sequence: file into the Experts folder, automated trading enabled at platform level, EA dragged onto the right chart, settings configured and saved, then tested thoroughly before any live capital is involved. The technical install rarely goes wrong twice — it's the configuration and cost-checking steps afterwards that separate a properly tested automated strategy from an expensive guess. Trading with an EA doesn't remove risk; it just automates the execution, so treat every setting change and every broker's real costs with the same scrutiny you'd apply to a manual trade.
Key takeaways
- Installing an EA on MT4 means copying a file into the correct data folder, then attaching it to a chart via the Navigator window.
- Always tick 'Allow automated trading' both in the platform toolbar and inside the EA's own settings tab.
- Backtest and forward-test on a demo account before risking real money, and check your broker allows EAs/automated trading.
- Spreads, commissions and swap costs directly affect an EA's live results — confirm real numbers with the PipTax cost tool before going live.
- Keep VPS/PC uptime in mind: an EA only works while MT4 stays connected and running.
- Review and adjust lot size, stop loss and magic number settings so multiple EAs don't clash on the same account.
Frequently asked questions
- Do I need a paid EA to get started on MT4?
- No. Many free EAs exist for testing the workflow, and MT4 also ships with sample expert advisors under Experts > Examples. Use these to practise installing and configuring before buying or coding anything custom.
- Why won't my EA place any trades after installation?
- The most common causes are: automated trading not enabled in the toolbar, 'Allow live trading' unticked in the EA's own settings, the smiley face icon in the chart corner showing grey/sad rather than a smiling green face, or the broker/account type not permitting EAs. Check each in turn.
- Can I run more than one EA at once on MT4?
- Yes, either on separate charts or the same chart with different magic numbers so trades don't overlap or interfere with each other. Keep an eye on total exposure and margin use across all running EAs.
- Does my broker's spread or commission affect EA performance?
- Yes, significantly. An EA's backtest results assume certain trading costs, and real spreads, commissions and swaps can differ by broker and account type. Use the PipTax cost tool to compare live costs before deciding where to run an EA.
- Is a VPS necessary to run an EA on MT4?
- Not strictly, but an EA only trades while MT4 is open and connected to the internet. A VPS keeps the platform running 24/5 without relying on your own PC staying on, which matters for EAs that trade outside your normal hours.