How to Install an Expert Advisor on MetaTrader 5
If you want to install an Expert Advisor on MetaTrader 5, the process is mostly mechanical: you're copying a file into the right folder, restarting the platform, and switching on automated trading. The tricky bit isn't the installation itself - it's making sure your broker actually supports what you're trying to do, and that you understand what the EA will do with your money once it's running.
This guide walks through the full setup, from finding the right folder to the checks worth doing before you let anything trade live.
What You Need Before You Start
Before touching any files, make sure the basics are in place:
- MetaTrader 5 installed - not MT4. The two platforms use different programming languages (MQL4 vs MQL5) and EAs built for one won't run on the other.
- An account with a broker that supports MT5. Many UK-accessible brokers, including Pepperstone and IG, offer MetaTrader platforms, but exact availability and account types can change - confirm current support directly on the broker's site or via /brokers/index.html.
- The EA file itself, usually with a
.ex5extension (compiled) or.mq5(source code you'd need to compile in MetaEditor). - A demo account to test on first. This is non-negotiable if you've never run the EA before.
It's also worth knowing whether the EA needs any special permissions - internet access (WebRequest) or DLL imports are the two most common. Legitimate EAs usually document this clearly. If an EA asks for DLL access with no explanation, be cautious.
Step-by-Step: Installing the EA File
1. Open MetaTrader 5.
2. Go to File > Open Data Folder. This opens a Windows Explorer window pointing at your specific MT5 installation's files - not the general Program Files folder.
3. Navigate to MQL5 > Experts.
4. Copy your .ex5 (or .mq5) file into this Experts folder. You can create subfolders here too if you want to keep things organised.
5. Close MetaTrader 5 completely and reopen it.
6. Open the Navigator panel (Ctrl+N if it's not already visible).
7. Expand Expert Advisors - your EA should now appear in the list.
If it doesn't appear, double-check you copied the file into the Experts folder specifically (not MQL5 root), and that the file extension matches what MT5 expects.
Attaching the EA to a Chart
Once the EA shows up in the Navigator:
- Open the chart for the instrument the EA is designed to trade (check its documentation - running it on the wrong pair or timeframe is a common mistake).
- Drag the EA from the Navigator onto the chart, or double-click it.
- A settings window will open with several tabs: Common, Inputs, and sometimes Dependencies.
- On the Common tab, tick Allow Algo Trading for this chart. If the EA needs internet access, tick Allow WebRequest and add the required URL if prompted.
- On the Inputs tab, review the EA's parameters - lot size, risk settings, stop distances, etc. Don't just accept defaults blindly; understand what each setting controls.
- Click OK.
Turning On AutoTrading
Attaching the EA to a chart isn't enough on its own - MT5 has a master switch.
- Look for the AlgoTrading (sometimes shown as "AutoTrading") button in the main toolbar.
- It needs to be enabled (usually shown green/active) for any EA to actually place trades.
- If it's off, every EA on every chart is effectively paused, even if attached correctly.
A quick way to confirm everything's working: check the Experts tab in the Toolbox (bottom panel) for log messages confirming the EA has initialised without errors. A smiling face icon in the top-right corner of the chart also indicates the EA is active and running.
Testing Before You Go Live
This is the step most new EA users skip, and it's the one that matters most.
- Run the EA on a demo account for at least a few weeks, ideally covering different market conditions.
- Use MT5's Strategy Tester to backtest against historical data, but treat backtest results with scepticism - real execution, spreads, and slippage rarely match perfectly.
- Watch for unexpected behaviour: unusually large lot sizes, trades opening outside expected hours, or the EA failing to close positions correctly.
- Only move to a live account once you've seen consistent, expected behaviour over a reasonable sample size.
Remember: automation doesn't remove risk. It just means decisions happen without you clicking the button - which can be good or bad depending on the strategy and how it's configured.
Confirming Broker Support and Real Costs
Not every account type at every broker treats EAs the same way, and execution quality genuinely matters for automated strategies that might trade frequently or rely on tight timing.
- Check platform availability first: confirm your broker offers MT5 (not just MT4) and permits automated trading on your account type. Pepperstone and IG both provide MetaTrader access on FCA-regulated accounts, but always verify current details on their own sites rather than assuming.
- Understand the execution model: market execution vs instant execution can affect how an EA's orders fill, particularly around news events.
- Check leverage rules: FCA retail leverage is capped at 30:1 on major FX pairs, and this applies to EA-driven trades exactly as it does to manual ones.
- Run the real cost numbers: an EA that trades frequently can rack up spread and commission costs fast. Use PipTax's cost tool at /audit.html to see the all-in cost impact based on your actual trade volume, and compare broker options at /brokers/index.html.
Keeping the EA Running: VPS Basics
MT5 needs to stay open and connected to keep an EA active. For most people trading manually this isn't an issue, but EAs often need to run continuously, including overnight.
- A VPS (virtual private server) hosts a live MT5 session on remote hardware that stays on 24/5, independent of your own computer.
- This matters most for strategies trading multiple sessions, scalping setups, or anything sensitive to being offline even briefly.
- Some brokers offer VPS services bundled with certain account types - worth checking directly with your broker rather than assuming it's included.
Final Checks Before You Commit
To install an Expert Advisor on MetaTrader 5 correctly, the file-copying part takes minutes. The judgement calls - trusting the EA's source, understanding its settings, confirming your broker genuinely supports it, and testing properly on demo - take longer, and they're the part that actually protects your account. Slow down on those steps, and treat the installation itself as the easy part.
Key takeaways
- Installing an EA on MT5 means copying the .ex5 file into the correct MQL5/Experts folder, then restarting the platform so it appears in the Navigator
- Always enable AlgoTrading/AutoTrading in MT5 and allow the EA's URL/DLL permissions if it needs them
- Confirm your broker actually offers MT5 and permits EAs before you build a workflow around it - check Pepperstone or IG's own platform pages, then verify live costs with PipTax's cost tool
- Test any EA on a demo account first, and understand that automated trading does not remove risk - it just automates decisions
- A VPS keeps your EA running when your computer is off, which matters for strategies that trade outside your normal hours
- FCA retail leverage is capped at 30:1 on major FX pairs, and this cap applies whether you trade manually or via an EA
Frequently asked questions
- Do I need MT5 specifically, or will MT4 work for my EA?
- It depends entirely on how the EA was coded. MT4 uses MQL4 and MT5 uses MQL5, and the two are not directly compatible. Check the EA's documentation for which platform it's built for, and confirm with your broker - such as Pepperstone or IG - which platforms they actually support before you commit to a workflow.
- Why can't I see my EA in the Navigator window after installing it?
- The most common cause is not restarting MetaTrader 5 after copying the file into the Experts folder. Close the platform fully and reopen it, then check the Navigator panel under Expert Advisors. If it's still missing, you may have copied it into the wrong subfolder or the file extension isn't .ex5.
- Is it safe to enable DLL imports or WebRequest access for an EA?
- Only allow these permissions for EAs from a source you trust, since DLL access in particular gives the EA broader access to your system. If an EA insists on DLL imports without a clear reason in its documentation, treat that as a red flag and verify the source before proceeding.
- Will an Expert Advisor work if I turn my computer off?
- No - MT5 needs to stay open and connected for an EA to keep trading. If you want it running continuously, including overnight or while you're away, you'll need a VPS (virtual private server) that keeps a live MT5 session running 24/5.
- Does using an EA change my trading costs?
- The EA itself doesn't change your spread, commission or swap rates - those come from your broker and account type. But because EAs can trade more frequently than a manual trader might, it's worth running your expected trade volume through PipTax's cost tool at /audit.html to see the real all-in cost impact.