Installing an expert advisor takes two minutes once you know where the files go. Most "the EA doesn't work" messages come from three things: the file is in the wrong folder, Algo Trading is off, or the symbol name does not match. This guide covers MT5 and MT4 step by step.
- EA files go into File → Open Data Folder → MQL5 → Experts (MQL4 → Experts in MT4).
- After copying, refresh the Navigator or restart the terminal, then drag the EA onto a chart.
- Two switches must be on: Allow Algo Trading in the EA settings and the Algo Trading button in the toolbar.
- Check symbol suffixes such as XAUUSD.m or GOLD — a wrong name is a common reason for no trades.
- The Experts and Journal tabs explain almost every error.
- A VPS keeps the EA running when your computer is off.
EA file types
| File | Platform | What it is |
|---|---|---|
| .ex5 | MT5 | Compiled EA or indicator — ready to run |
| .mq5 | MT5 | Source code — compile in MetaEditor |
| .ex4 | MT4 | Compiled EA or indicator |
| .mq4 | MT4 | Source code |
| .set | Both | Saved input settings (presets) |
An .ex5 file never runs in MT4 and an .ex4 file never runs in MT5. If you downloaded a product from the MQL5 Market, the terminal installs it automatically under Experts\Market or Indicators\Market.
Installing an EA in MT5
- In MetaTrader 5 click File → Open Data Folder.
- Open
MQL5→Experts(for indicators:MQL5 → Indicators). - Copy the
.ex5file into this folder. - Back in the terminal, open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh — or restart the terminal.
- Open a chart of the symbol and timeframe the EA requires.
- Drag the EA from the Navigator onto the chart.
- On the Common tab tick Allow Algo Trading; if the vendor says so, also allow DLL imports.
- Set the inputs on the Inputs tab (or Load a .set file) and click OK.
- Make sure the Algo Trading button on the top toolbar is green.
In MT5 a small blue hat icon in the top-right corner of the chart means the EA is attached and allowed to trade. If the icon is grey, Algo Trading is disabled for the terminal or for that EA.
Installing an EA in MT4
- File → Open Data Folder → MQL4 → Experts.
- Copy the
.ex4file there and refresh the Navigator or restart. - Drag the EA onto a chart.
- On the Common tab tick Allow live trading.
- Turn on the AutoTrading button in the toolbar. A smiling face in the chart corner means the EA is active.
Inputs and presets
Every EA has inputs: lot or risk %, stop-loss, take-profit, trading hours, filters. Start with the vendor's defaults on a demo account. When you find settings you like, use Save on the Inputs tab to create a .set file — it makes reinstalling or moving to a VPS easy and lets you compare versions.
⚙Check the lot size your EA will useFree Position Size and Margin calculators→Common errors and how to fix them
| Message or symptom | Cause | Fix |
|---|---|---|
| EA not in Navigator | Wrong folder or wrong platform file | Put .ex5 in MQL5/Experts, refresh |
| “AlgoTrading disabled” | Toolbar button off | Turn Algo Trading / AutoTrading on |
| Grey hat / sad face on chart | Live trading not allowed in EA settings | Tick Allow Algo Trading on Common tab |
| “Trade is disabled” | Investor (read-only) login or market closed | Log in with the trading password |
| “Invalid stops” | SL/TP too close for the broker | Increase SL/TP or check stop level |
| “Not enough money” | Lot too big for margin | Lower lot or risk % |
| No trades on XAUUSD | Symbol has a suffix (XAUUSD.m, GOLD) | Set the symbol name in inputs |
| Works in tester, not live | Different server time or filters | Check time offset and trading hours |
When in doubt, open the Toolbox → Experts and Journal tabs: every EA error and rejected order is logged there with a reason.
Understanding the EA settings window
When you attach an EA, MetaTrader opens a window with several tabs. Knowing what each one does prevents most beginner mistakes.
| Tab | What you set | Tip |
|---|---|---|
| Common | Allow Algo Trading, DLL imports, signal settings | Untick DLL unless the vendor requires it |
| Inputs | Strategy parameters: lot, risk, SL/TP, hours | Save your settings as a .set file |
| Dependencies (MT5) | Libraries and indicators the EA uses | Missing files show here |
Magic numbers and running several EAs
Every EA marks its trades with a magic number. If you run two EAs — or the same EA on two charts of one symbol — give each a different magic number in the inputs. Otherwise one EA may manage, modify or close the other's positions. Manual trades have a magic number of 0, which is how most EAs know to leave them alone.
Updating an EA safely
- Save the current inputs to a .set file.
- Wait until the EA has no open positions, or note them down.
- Replace the .ex5 file in the Experts folder and refresh the Navigator.
- Reattach the EA to the chart, load your .set file and check the Experts tab for messages.
On MQL5 Market products, updates arrive through the terminal's Market tab and install automatically.
Installing indicators and scripts
Indicators and scripts follow exactly the same steps, only the folder changes: MQL5\Indicators or MQL5\Scripts (and MQL4\... in MT4). Indicators are dragged onto a chart and never trade; scripts run once and stop.
Running EAs 24/5 on a VPS
An EA only trades while the terminal is running and connected. If your computer sleeps or the internet drops, trades are not opened or managed. A Virtual Private Server keeps the terminal online around the clock; MT5 also offers a built-in virtual hosting service that migrates your charts and EAs with one click. Choose a server location close to your broker's trade server to minimise latency.
A safe first setup
- Install the EA on a demo account first.
- Add a news filter and an account-level daily loss monitor.
- Run it for several weeks and compare results with the vendor's description.
- Go live with the minimum risk and scale up gradually.
Frequently asked questions
Educational content only, not financial advice. Leveraged trading carries a high risk of loss. Past performance does not guarantee future results. Broker and prop-firm rules change — always check the current conditions of your provider.



