← All platforms

M MetaTrader 5 — full setup

An Expert Advisor (EA, written in MQL5) that runs inside MetaTrader 5's own automation engine. No API keys, no Python — it trades through your MT5 broker account.

⚠️ The available symbols depend on your broker (MT5 is a broker platform, not an exchange). If your broker doesn't list the symbol you picked, you can't trade it there. Test on a demo account first.

1 · Install MetaTrader 5

  • Download MT5 from your broker, or from metatrader5.com/download, and log in with your broker account (a demo account is ideal to start).

2 · Download the EA & open MetaEditor

  1. From your Stragenius dashboard, download stragenius_mql_<SYMBOL>.mq5.
  2. In MT5, open MetaEditor: menu Tools → MetaQuotes Language Editor, or just press F4.

3 · Put the EA in the right folder

  1. In MetaEditor's left panel (Navigator), right-click the Experts folder → Open Folder.
  2. Copy the downloaded .mq5 file into that folder (…\MQL5\Experts\).
  3. Back in MetaEditor, right-click Experts → Refresh — your EA now appears in the list.

4 · Compile it

  1. Double-click your EA in the list to open it, then click Compile (or press F7).
  2. Success shows "0 errors, 0 warnings" at the bottom. This creates the runnable .ex5 file automatically.

5 · Attach the EA to a chart

  1. Switch back to MT5. In the Navigator (left panel), open Expert Advisors — your EA is there (right-click → Refresh if not).
  2. Open a chart for your symbol on the M1 (1-minute) timeframe. Brokers name symbols differently: the EA made for BTCUSDT runs on your broker's Bitcoin symbol (often BTCUSD).
  3. Drag the EA onto the chart (or double-click it). A settings box opens.
  4. In the Common tab, tick Allow Algo Trading. The Inputs tab lists every setting of your strategy (leverage, margin, and the calibrated values such as _B_TP or _SLOPE_BAND). Don't change them — they were fitted to this coin; changing them changes the strategy. Click OK.

6 · Turn on AutoTrading (the step everyone forgets)

  1. Click the big AutoTrading button in the top toolbar — it must turn green. If it's red/grey, the EA analyses but never places a trade.
  2. Also check Tools → Options → Expert Advisors → "Allow Algo Trading" is ticked.
  3. Confirmation: a small smiling face 🙂 and the EA's name appear in the top-right corner of the chart. A sad face 🙁 means AutoTrading is still off.

7 · Watch it, and how to stop

  • The Experts and Journal tabs (bottom "Toolbox" panel) show the bot's messages and any trades it opens with their stop-loss / take-profit.
  • Stop-loss and take-profit are attached to each order, so your broker enforces them even if MT5 is closed.
  • The EA only manages its own trades (it tags them with its magic number), so your manual trades on the same symbol are left alone. Re-attaching the EA or restarting MT5 keeps its open trade and its timer.
  • Signal skipped: position too small for this broker means your margin per trade is below the broker's minimum lot; the line tells you the minimum. Generate the script again with a larger budget.
  • To stop: click the AutoTrading button again (turns red), or remove the EA (right-click chart → Expert Advisors → Remove). Quiet markets with no trades are normal.

8 · Demo → live, and always-on

  1. Run on a demo account first. When you trust it, log MT5 into your live account and attach the EA there.
  2. MT5 must stay open to trade. For 24/7, rent the built-in MetaTrader VPS (in the Navigator, right-click your account → Register a Virtual Server; some brokers pay for it), or use a cheap cloud server.
  3. Test before demo: open View → Strategy Tester (Ctrl+R), choose the EA, your symbol, M1 and "Every tick based on real ticks", and run a few months.

Common problems

  • Sad face 🙁 on the chart → AutoTrading is off. Click the AutoTrading toolbar button until it's green (step 6).
  • EA not in Navigator → it wasn't compiled or is in the wrong folder. Redo steps 3–4 and Refresh.
  • "Trading is disabled" / no orders → tick "Allow Algo Trading" in the EA's Common tab and in Tools → Options.
  • "Unsupported filling mode" or "Invalid stops" → an old script. Download it again from your dashboard; current EAs use your broker's filling mode and stop distance.
  • Symbol not found → your broker doesn't list that symbol. Pick one it offers.