FXRobotEasy
EcoSystemChartsTools
AI BotsTradingBrokers
  1. Courses
  2. Automated Trading (MT5)
  3. Lesson 5
Back to CourseBack to Lesson 4
Beginner12–18 min

Lesson 5. Install & Basic Configure an EA on MT5 — Step by Step

Place EA files correctly, attach to a chart, enable AutoTrading, check status/logs, load presets, set lot/risk and time filters, and understand GMT/server time and magic numbers.

You learned how MT5 'holds' robots. Now let's install and run one safely on a demo account.

5.1. Place EA files correctly (MQL5/Experts) and refresh

File Placement Steps
  1. In MT5: File → Open Data Folder.
  2. Navigate to MQL5/Experts. Put your EA file here:
  3. • If you have .ex5 (compiled) → copy to MQL5/Experts.
  4. • If you have .mq5 (source) → copy to MQL5/Experts, then compile in MetaEditor (F7) to produce .ex5.
  5. Go back to MT5: in Navigator → Expert Advisors, right-click → Refresh. If the EA doesn't appear, restart MT5.
  • Keep EAs from trusted sources only.
  • Do not enable DLL imports for unknown EAs.

5.2. Attach EA to a chart and enable trading (global + local)

Attach & Enable Steps
  1. Open a chart (e.g., EURUSD M15).
  2. Global switch: toolbar "AutoTrading" must be ON (green).
  3. Attach EA: Navigator → Expert Advisors → drag EA to chart.
  4. In the settings dialog:
  5. • Common/Inputs tabs vary by EA; ensure "Allow algo trading" is checked (EA-level permission).
  6. • DLL/WebRequest only if you trust and need them (off by default).

Status Check:

MT5 shows EA name and a small status icon/label on the chart; also see Experts tab for startup logs.

Common Pitfalls:

  • Global AutoTrading OFF → no trades.
  • EA-level "Allow algo trading" OFF → no trades.
  • Market closed → no ticks → EA idle.

5.3. Inputs & presets: lots, risk %, magic number, time filters

Position size mode

Fixed lot (e.g., 0.10) or Risk % per trade (e.g., 0.5%). For beginners: risk % (0.25–1%) is safer.

MagicNumber

Unique identifier per EA instance; use a different number on each chart (e.g., 5001 for EURUSD M15, 5002 for XAUUSD H1).

Time/session filters

Trading allowed hours/days; avoid rollover (broker midnight) and high-impact news windows.

Others

Max spread, slippage, order comment, ATR/dynamic stops (if present).

Presets (.set files)

Load/Save .set files from Inputs tab ("Load…" to apply presets; "Save" to reuse settings).

Safety Notes:

  • Keep risk small (0.25–1%).
  • Never share .set files that contain API keys or personal URLs.

5.4. Time matters: server time vs GMT, rollover and news

Server Time & Filters
  • MT5 shows server time in charts and logs; it can differ from GMT by several hours and may change with DST.
  • To set time filters correctly:
  • • Check your broker's server time now (see bottom status bar / Market Watch time).
  • • Calculate offset from GMT (e.g., server = GMT+2 in winter).
  • • Set EA trading windows in server time (e.g., avoid 23:50–00:10 server time for rollover).
  • High-impact news (NFP, CPI, rate decisions) can widen spreads/slippage; many EAs provide "blackout" minutes before/after news — use them if available.

5.5. Logs & diagnostics: Journal vs Experts, common errors

Experts

Toolbox → Experts

EA logs (initialization, signals, order results, errors).

Journal

Toolbox → Journal

Terminal/broker connection and trade events/errors.

Common Messages & Fixes
ErrorFix
"AutoTrading disabled"Turn ON global and EA-level permissions.
"Trade is not allowed"EA permission off; market closed; symbol trade disabled; Tools → Options → Expert Advisors global settings.
"Invalid stops"SL/TP too close; check symbol's minimum stop distance in Symbol Specification.
"Not enough money"Lot too large; reduce risk/lot size.
"No prices" / "Market closed"Wait for session open; try a different symbol.
Tip: If nothing happens, look here first.

5.6. Multiple instances: unique magic numbers on several charts

Running Multiple EA Instances
  • You can run the same EA on multiple charts/symbols/timeframes.
  • Each instance must have a unique MagicNumber to avoid order-mixing.
  • Example: Attach EA to EURUSD M15 (Magic 7001) and XAUUSD H1 (Magic 7002). Each instance manages its own trades only.
Using the same magic on parallel charts can cause conflicts (EA may try to manage both).

5.7. Practice: install, attach, configure, verify (10–15 min)

Lesson 5 Quiz

Test your understanding with 3 questions. Pass with 2/3 correct.

What's Next?

You've installed an EA, attached it to a chart, configured key inputs like magic number and risk, and verified logs. Next, we'll run honest backtests — the first real test of whether your strategy has potential.

Next: Honest Backtests in MT5
Educational content only. Not financial advice. Trading involves risk of capital loss. Backtests and past performance do not guarantee future results. Start on demo; keep risk small.
EB
EASY Bots Academy

Master MT5 algorithmic trading with our comprehensive, practical course.

Learn

  • Course Curriculum
  • Learning Paths
  • Resources

Company

  • About Us
  • Privacy Policy
  • Terms of Service

Support

  • support@fxroboteasy.com
  • EcoSystem
  • Ai Bots

© 2025 EASY Bots Academy. All rights reserved.

Risk Warning: Trading involves risk. Past performance does not guarantee future results.