All guides · Trading bots
How to Install an EA in MT4
Step-by-step: copy an Expert Advisor into MetaTrader 4, compile it, attach it to a chart and switch on AutoTrading.
What it is
Installing an EA in MetaTrader 4 works like MT5 with different folder and button names: the file goes in MQL4 → Experts, and trading is switched on with the AutoTrading button. MT4 bots use .mq4 (source) or .ex4 (compiled) files; MT5 files won't work in MT4.
Step by step
- In MetaTrader 4, open File → Open Data Folder.
- Open the MQL4 folder, then Experts, and copy your bot's file (.mq4 or .ex4) into it.
- If you have the source file (.mq4), open MetaEditor (press F4), find the file under Experts, and click Compile (F7). Check that there are no errors.
- Back in MetaTrader 4, open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh.
- Open a chart of the market the bot was built for and drag the bot onto it.
- In the Common tab, tick Allow live trading. Review the Inputs tab and click OK.
- Switch on the AutoTrading button in the toolbar. A smiling face in the top-right corner of the chart means the bot is running.
Why it matters
MT4 is still offered by many forex brokers. A missed step, like a compile error or AutoTrading being off, is the most common reason a new bot never trades.
Good to know
Run it on a demo account first and keep the terminal open. The Experts and Journal tabs show what the bot is doing and any errors it hits.
Common mistakes
Using an MT5 (.mq5) file in MT4; forgetting to compile; leaving AutoTrading off (the face in the corner frowns); and running two copies of the same bot on the same symbol.