What You Need Before Starting
Before installing an Expert Advisor on MetaTrader 4, verify that you have the correct terminal version and compatible robot files:
- MetaTrader 4 Desktop Terminal: Automated robots run on the Windows or macOS desktop build of MT4—not inside mobile MT4 apps.
- Compatible EA File: An MT4 compiled binary (
.ex4) or MQL4 source file (.mq4). MT5.ex5files will not load in MT4. - Active Demo or Live Account: Use a demo account first to confirm order permissions, lot sizing, and error-free execution.
- Optional Preset File: Any accompanying
.setsettings file should go intoMQL4/Presets.
Step-by-Step MT4 Installation Process
MetaTrader 4 stores user-installed programs inside a per-profile Data Folder rather than inside the main Program Files directory. Always use the built-in menu shortcut so files land in the active terminal instance:
- Locate the Downloaded EA File: Extract any ZIP archive first so you can access the standalone
.ex4(or.mq4) file directly. - Open the MT4 Data Folder: Launch MetaTrader 4, click File in the top-left menu, and select Open Data Folder.
- Open MQL4 > Experts: In the file explorer window that opens, double-click MQL4 and then open the Experts subfolder.
- Paste the EA File: Copy your
.ex4or.mq4file intoMQL4/Experts. If the EA includes custom indicators, place those separately insideMQL4/Indicators. - Refresh or Restart MT4: Return to MT4, open the Navigator panel (
Ctrl+N), right-click Expert Advisors, and click Refresh (or restart MT4 completely). - Enable Global AutoTrading Permissions: Open Tools > Options > Expert Advisors, check Allow automated trading, and click OK. Only enable Allow DLL imports if the EA documentation specifically requires it from a trusted developer.
- Attach the EA to Your Target Chart: Open the exact symbol and timeframe chart required by the strategy, drag the EA from Navigator onto the chart, confirm Allow live trading on the Common tab, adjust your risk settings on the Inputs tab, and click OK.
- Verify the Smiley Face Icon: Confirm that the EA name appears in the top-right corner of the chart followed by a smiley face icon and that the toolbar AutoTrading button is green.
Common MT4 Installation Issues and Fixes
| Symptom | Likely Cause | Fix |
|---|---|---|
| EA missing from Navigator | File pasted into Program Files or still inside a ZIP archive | Extract the archive, paste into File > Open Data Folder > MQL4 > Experts, and refresh Navigator. |
| Frown / sad face next to EA name | Global AutoTrading or chart-level live trading is disabled | Click the green AutoTrading toolbar button and press F7 > Common > check Allow live trading. |
| EA loads then removes itself immediately | Compile error, license check, or missing dependency indicator | Inspect the Experts and Journal tabs at the bottom of the Terminal window for the exact reason code. |
| No trades placed despite smiley face | Market closed, wide spread filter triggered, or no entry signal yet | Verify live quote ticks in Market Watch and review spread/session filters in the EA Inputs tab. |
ACTION CHECKLIST
- Locate the downloaded EA file: Extract any archive and locate the .ex4 or .mq4 Expert Advisor file on your computer.
- Open MetaTrader 4 Data Folder: Launch MT4, click File in the top menu, and select Open Data Folder.
- Navigate to MQL4 Experts: Open the MQL4 folder and double-click the Experts subfolder.
- Copy the EA file: Paste the .ex4 or .mq4 file into MQL4/Experts (and any .set presets into MQL4/Presets).
- Refresh Navigator or restart MT4: Press Ctrl+N, right-click Expert Advisors in Navigator, and choose Refresh or restart MetaTrader 4.
- Enable automated trading: Go to Tools > Options > Expert Advisors, check Allow automated trading, and confirm the toolbar AutoTrading button is active.
- Attach EA to the chart: Drag the EA onto the target symbol and timeframe chart, verify Allow live trading in Common, configure Inputs, and click OK.
- Confirm the smiley face icon: Check the top-right corner of the chart for a smiley face next to the EA name and verify the Experts tab shows no errors.