MT5 & Expert Advisors
Down from theory into the cockpit. MetaTrader 5 is where trades actually happen — this lesson makes every panel, and the little robots called EAs, feel like home.
10.1The cockpit and the crew
Think of your whole setup as an aircraft. MT5 is the cockpit: the instruments (live prices), the radio to the airline (your ), and the physical controls that actually move the plane (orders). Your Python bot is the flight computer — a separate, smarter machine plugged into the cockpit, doing the analysis and asking the pilot (you) before touching the controls. And an is an autopilot module installed inside the cockpit itself — smaller brain, but it lives where the controls are.
10.2The four panels you'll actually use
MT5 looks intimidating; you need four panels. You met two in Lesson 1 — here's the full cockpit tour:
10.3What an EA actually is — and why you have ten
An Expert Advisor is a program written in (MT5's own language) that lives inside the terminal and can read prices and place orders on its own. Your repo ships ten — IronGate_MA_Crossover.mq5, IronGate_Sentinel.mq5, IronGate_RSI.mq5 and the rest — each one a translation of a Python strategy into cockpit language.
Why keep both lanes? Different strengths. The Python bot has the full brain: recommendation engine, plain-English explanations, the approval gate, news feeds. The EAs have location: they execute with minimal delay, keep running if the Python side is off, and — the reason that matters most for your learning — they're the only lane that can run inside MT5's Strategy Tester.
Every EA (and the Python bot) tags its orders with a — a cattle brand for trades. When several robots share one account, the brand is how each recognises its own cattle. Without unique magic numbers, strategies close each other's trades. IronGate has a whole doc on this (docs/operations/05_magic_numbers.md).
10.4Attaching an EA — the four moves
When you're at your PC, here's the entire ritual (using the demo account, always):
Park the EA in the hangar. In MT5: File → Open Data Folder → MQL5\Experts\ — copy the IronGate_*.mq5 files there (from your repo's mql5\Experts\), then restart MT5 or right-click → Refresh in Navigator. They'll appear under Expert Advisors.
Compile if asked. Double-clicking a .mq5 opens ; press F7. "0 errors" = the autopilot module is built.
Drag it onto a chart. Open a EURUSD H1 chart, drag IronGate_MA_Crossover from Navigator onto it. A settings window appears — the same parameters you know from Python (fast/slow periods, risk %). Tick "Allow Algo Trading" in the Common tab.
Flip the master switch. The button in the top toolbar is the master arm switch — green means EAs may trade. The chart's top-right corner shows the EA's name with a ☺ when it's live, ☹ when blocked. On demo, arming it is safe — that's what demo is for.
10.5The Strategy Tester — MT5's own simulator
You know flight simulators from Lesson 8. MT5 has one built in: (Ctrl+R or View → Strategy Tester). Pick an EA, a pair, a timeframe and a date range, press Start — and it replays history against the EA, exactly like your Python backtester. Two things make it worth learning even though Python is your main lab:
Visual mode. The tester can replay the chart bar by bar at controllable speed while the EA trades on it — you literally watch the strategy work, entries and exits appearing on candles. For a visual learner, ten minutes of this teaches what a spreadsheet never will. And cross-checking: the same strategy tested in two independent simulators (Python and MT5) should tell roughly the same story — a disagreement is a bug-finder, and this cross-validation is exactly what your repo's regression tests do in spirit.
① Copy the EAs into MT5 (moves 1–2 above). ② Attach IronGate_MA_Crossover to a EURUSD H1 chart on demo, arm Algo Trading, watch the ☺ appear. ③ Open the Strategy Tester, run the same EA over the last 6 months in visual mode, and just watch it trade for a while. You'll see Lesson 5's whipsaws and Lesson 7's tanker-turns happen live on the chart.