Setting up an Expert Advisor on MetaTrader 5

A step-by-step guide to installing an Expert Advisor on MetaTrader 5 — enabling algo trading, attaching it to the XAUUSD chart and fixing a silent EA.

30-day free trialCard requiredCancel before renewal

Start free trial
All insights
MetaTrader 5SetupAutomation

Setting up an Expert Advisor on MetaTrader 5

A step-by-step guide to installing an Expert Advisor on MetaTrader 5 — enabling algo trading, attaching it to the XAUUSD chart and fixing a silent EA.

An Expert Advisor (EA) is a program that runs inside MetaTrader 5 and can analyse the market and place trades automatically under the settings you choose. Getting one running is mostly a matter of four small steps and knowing the handful of settings MT5 hides in non-obvious places. This guide walks through the whole process on an XAUUSD chart.

Before you start: what you need

  • MetaTrader 5, installed from your broker or from the official MetaQuotes website.
  • A trading account logged in to that terminal (a demo account is perfect for the first run).
  • The EA file itself — a compiled .ex5 (or a .mq5 source you compile), plus any license or activation the EA requires.

Step 1 — Enable algorithmic trading

MT5 ships with automated trading switched off. Turn it on globally first: open Tools → Options → Expert Advisors and tick “Allow algorithmic trading”. Then make sure the “Algo Trading” button in the main toolbar is pressed in — it turns green when enabled. Nothing an EA does will execute while that button is grey.

Step 2 — Install the EA file

Open the data folderIn MT5, go to File → Open Data Folder. This opens the exact folder MT5 reads from — safer than guessing the install path.
Drop the file in MQL5\ExpertsCopy your .ex5 (or .mq5) file into the MQL5\Experts subfolder. Sub-folders are fine; MT5 reads them recursively.
Refresh the NavigatorBack in MT5, right-click “Expert Advisors” in the Navigator panel and choose Refresh. Your EA should now appear in the list.

Step 3 — Attach the EA to the XAUUSD chart

Open a chart for the exact gold symbol your broker uses — it may be XAUUSD, GOLD, or a variant with a suffix. Then drag your EA from the Navigator onto that chart (or double-click it). In the dialog that appears, confirm that algorithmic trading is allowed for the EA, set any inputs the EA exposes, and click OK.

Step 4 — Confirm it is actually running

A running EA shows a small smiley face in the top-right corner of the chart. A sad face or a small “disabled” icon means algorithmic trading is off for that chart or globally. Open the Toolbox (Ctrl+T) and watch the Experts tab — a healthy EA logs its startup there, and any errors show up in the Journal tab beside it.

Common reasons an EA will not trade

SymptomUsual causeFix
Sad face on the chartAlgo Trading button offPress the green Algo Trading toolbar button
Smiley, but no tradesWrong symbol or market closedCheck the symbol name and trading hours
“Not enough money” in JournalLot size too large for balanceReduce risk / lot size for the account
EA missing from NavigatorFile in the wrong folderConfirm it is in MQL5\Experts, then Refresh
Trades rejected instantlyAccount permissions or invalid stopsCheck account type and broker stop levels
Quick triage for a silent EA.

Good habits once it is live

  • Run on a machine that stays on. An EA only works while MT5 is open and connected — many traders use an always-on PC or a VPS so a closed laptop does not stop it mid-trade.
  • Do not change inputs while a position is open unless you understand how the EA handles it.
  • Start on a demo account until you have watched a full cycle of the EA’s behaviour, including how it manages a losing trade.

How RSForex Bot streamlines this

The manual steps above are exactly the friction RSForex Bot is designed to remove. It installs as a compiled executor inside MetaTrader 5, and the RSForex dashboard handles license activation, account validation and updates. Before live trading is unlocked, a compatibility check confirms your gold symbol, spread, lot sizing and stop levels on your actual account — so the “will it trade?” troubleshooting above is settled up front rather than by trial and error.

Risk disclosure. Trading involves risk. RSForex Bot does not guarantee profits, account growth, or prop-firm outcomes. Users remain responsible for their own broker, prop-firm, account settings, and trading decisions. Past performance does not guarantee future results.

MetaTrader 5 is a third-party platform developed and owned by MetaQuotes. Download it from your broker or the official MetaQuotes website. RSForex Bot is independent and is not affiliated with MetaQuotes.

Share X LinkedIn
Free trial

Put disciplined gold automation on your MT5.

RSForex Bot runs the XAUUSD strategy locally inside MetaTrader 5 on supported FTMO and OANDA accounts, with built-in per-trade, daily-loss and drawdown limits.