# MT4 EA Installation & Automated Trading: Complete Setup Guide
Why Your EA Won't Load (And How to Fix It)
Expert Advisors (EAs) fail to load for three main reasons: wrong file location, disabled automation settings, or missing DLL dependencies[citation:2][citation:10]. Here's the systematic fix.
Step 1: Install EA Files Correctly
The most common mistake is copying files to the wrong folder.
1. Open MT4 → File → Open Data Folder[citation:1][citation:9]
2. Navigate: MQL4 → Experts folder
3. Copy your EA files (.ex4 or .mq4) into this folder[citation:1]
4. Place any custom indicators into MQL4 → Indicators[citation:2]
5. Restart MT4 completely
> Pro tip: After restart, check Navigator window → Expert Advisors tab. Your EA should appear there.
Step 2: Enable Auto-Trading Settings
Even with files in place, MT4 blocks EAs by default.
- ✓ Allow automated trading
- ✓ Allow DLL imports (if your EA uses external libraries)[citation:3][citation:8]
- ✓ Allow live trading
Click OK and look for the green triangle icon on your chart toolbar—it should be lit.
Step 3: Fix Common Errors
"DLL not found" or "Cannot load library"
Cause: MT4 is 32-bit; all DLLs must be 32-bit versions[citation:3].
Solution:
1. Copy .dll files to MQL4 → Libraries folder[citation:3]
2. Enable "Allow DLL imports" (Step 2 above)
3. Add MT4 folder to antivirus whitelist (some security software blocks DLLs)[citation:3]
"Invalid EA" or "Custom indicator not found"
Cause: Missing dependency files or compilation issue[citation:2].
Solution:
1. Check Terminal → Experts tab for error messages[citation:2]
2. Ensure all custom indicators are in MQL4/Indicators
3. Recompile .mq4 files in MetaEditor if you have source code
EA shows gray face instead of smile
Cause: Auto-trading is disabled or EA not properly attached.
Solution: Click the Auto-Trading button on toolbar (or press Ctrl+Alt+F5). The face should turn yellow/green.
Step 4: Set Up VPS for 24/7 Trading
Running EAs on your personal computer risks downtime from power outages or internet disconnects. A VPS keeps MT4 running continuously[citation:8].
How to set up MT4 VPS:
1. Get VPS credentials (IP address, username, password) from your broker[citation:7]
2. Connect via Remote Desktop:
- Windows: Start → "Remote Desktop Connection" → enter IP[citation:7]
- Mac: Download "Microsoft Remote Desktop" from App Store[citation:7]
3. Install MT4 on VPS (download from broker's website inside VPS)
4. Copy EA files using same folder structure (File → Open Data Folder → MQL4/Experts)[citation:7]
5. Enable auto-trading in MT4 on VPS
6. Place MT4 shortcut in VPS Startup folder for auto-restart after maintenance[citation:8]
Free VPS eligibility (Exness example):
Step 5: Export Account History for Analysis
Track your EA's performance by exporting trade data.
Using ExportCSV script (free from MQL5 Market):[citation:4]
1. Download ExportCSV script to MQL4/Scripts folder
2. Drag script onto any chart
3. Set parameters:
- FromDate: start date
- ToDate: end date
- FileName: "AccountHistory.csv"
4. Click Yes to execute
Output location: `MQL4/Files/AccountHistory_full.csv`[citation:4]
CSV columns include: Ticket, Type, Symbol, Open/Close Time, Lots, Price, Profit, Swap, Commission[citation:4]
Open in Excel to analyze win rate, drawdown, and Sharpe ratio.
Quick Troubleshooting Checklist
| Issue | Solution |
|-------|----------|
| EA not in Navigator | Restart MT4; check file is .ex4 not just .mq4 |
| DLL error | Copy DLL to Libraries folder; enable DLL imports |
| Auto-trading grayed out | Check Tools→Options→EA tab |
| EA loads but no trades | Verify Magic Number matches; check account type (live vs demo) |
| MT4 won't start on VPS | Add to Windows Startup folder; check RDP connection |
Learning MQL4 (For Custom EA Development)
If you want to build your own EAs, the "10 Days Learn MQL4" video series (23 lessons) covers basics from K-line concepts to complete EA structure[citation:5]. Key topics:
---
Reference Sources: Orbex Knowledge Hub (MT4 file structure)[citation:1]; CSDN (Mac MT4 troubleshooting & DLL errors)[citation:2][citation:3]; MQL5 Market (ExportCSV script)[citation:4]; Baidu Baike (MQL4 learning resources)[citation:5]; Weltrade (MT4 mobile trading)[citation:6]; Exness Help Center (VPS setup guide)[citation:7]; Weltrade (VPS configuration steps)[citation:8]; IG Help Centre (EA installation)[citation:9]; CSDN blog (beginner EA troubleshooting)[citation:10]