MT5 Expert Advisors: A Beginner's Setup Guide
By Sandra Brooks — Head of Trading & Execution · Published October 16, 2026 · 7 min read
An MT5 Expert Advisor (EA) is a program that runs inside the MetaTrader 5 trading terminal and can open, manage and close trades automatically on a chart. Setting one up takes five steps: copy the file into the Experts folder, switch on algorithmic trading, allow any web addresses it needs, attach it to the right chart, and check that it is running. It only works while your terminal is open and connected, so where and how you run MT5 matters as much as the advisor itself.
This guide covers each step in plain terms, then explains how the AlgolaneBots Gold Breakout advisor fits in and what to do when something does not work.
What MetaTrader 5 and Expert Advisors are
MetaTrader 5 is a trading platform made by MetaQuotes and offered by many brokers for trading currencies, gold, indexes and other markets, often through contracts for difference (CFDs). You install the terminal on your computer, log in to an account with your broker, and see charts, prices and your open trades.
MT5 runs three kinds of add-on programs, written in a language called MQL5:
| Type | What it does | Can it trade? | How long it runs |
|---|---|---|---|
| Indicator | Draws lines or values on a chart | No | While attached to the chart |
| Script | Performs one task, then stops | Yes, once | A single run |
| Expert Advisor | Watches prices and manages trades by its rules | Yes, continuously | While attached and the terminal is running |
An EA is the only one designed to trade on its own over time. It reacts to each new price tick or on a timer, applies its rules, and sends orders through your broker account.
Step 1: put the advisor in the Experts folder
Advisors come as files ending in .ex5 (compiled) or .mq5 (source code). To install one:
- In MT5, open the File menu and choose Open Data Folder.
- Open the MQL5 folder, then the Experts folder.
- Copy the advisor file into it.
- Back in MT5, find the Navigator panel, right-click Expert Advisors and choose Refresh. The advisor should now appear in the list.
Only install advisors from sources you trust. An EA can place trades in your account, so it deserves the same caution as any other software with that power.
Step 2: switch on algorithmic trading
MT5 has a master switch for automated trading, and it is off by default on many installs.
- Open Tools, then Options, then the Expert Advisors tab.
- Tick Allow algorithmic trading.
- Close the window, then check the Algo Trading button on the main toolbar. It should show as enabled (green).
If this button is off, no EA will trade, even if everything else is set up correctly. It is also a quick manual stop: turning it off halts all advisors in that terminal.
Step 3: allow the web addresses the advisor needs
Some advisors work only from prices inside MT5. Others, like the AlgolaneBots advisor, also need to talk to an outside server to receive signals or instructions. MT5 blocks this unless you approve each address.
- In the same Expert Advisors tab under Tools > Options, tick Allow WebRequest for listed URL.
- Add the web address given by the advisor's provider. For AlgolaneBots this is the site address shown in your setup instructions.
- Click OK.
If the address is missing or mistyped, the advisor will load but fail to connect, and the Experts tab of the Toolbox will show web request errors.
Step 4: attach the advisor to the right chart
An EA runs on one chart at a time and usually trades that chart's symbol.
- Open a chart of the market the advisor is built for. For gold this is usually called XAUUSD, but brokers sometimes add a suffix or use a different name, so check your broker's symbol list.
- Drag the advisor from the Navigator onto the chart.
- In the window that opens, on the Common tab, make sure algorithmic trading is allowed for this advisor.
- On the Inputs tab, fill in the settings the advisor asks for.
- Click OK.
Step 5: confirm it is running
Look at the top right corner of the chart. A small icon shows the advisor's state: when it is active and allowed to trade, the icon appears in colour; if it is greyed out or crossed, trading is blocked. Then open the Toolbox at the bottom of the screen and check the Experts and Journal tabs for messages. A healthy advisor usually prints a line saying it has started or connected.
Setting up the AlgolaneBots Gold Breakout advisor
Gold Breakout is the one AlgolaneBots strategy that runs through MT5. It checks gold every hour, waits for prices to go quiet, and then trades a breakout in the direction of the long-term trend. It can buy or sell short, uses a stop-loss that follows the price, and closes at a profit target or when momentum fades. Our post on the gold breakout strategy explains the idea in more detail.
The setup follows the five steps above, with three specific parts:
- Download the advisor from your AlgolaneBots account and install it in the Experts folder.
- Allow web requests to the AlgolaneBots site address, so the advisor can receive instructions.
- Paste the one-time token from your account into the advisor's inputs. This links that terminal to your AlgolaneBots account.
You also choose a risk per trade of 1%, 2%, 3% or 5%. That setting controls how much of the account each trade can lose if its stop is hit, and it changes the strategy's behaviour enormously, as the table below shows. During the free trial the advisor works on demo accounts only. The MT5 route is not offered in India or in sanctioned countries, though paper trading of all five strategies works everywhere.
If you ever need to stop everything, the AlgolaneBots kill switch stops every broker order and tells MT5 to close its trades.
What the risk setting did in the backtest
These figures come from a historical backtest, a computer test on gold prices from June 2004 to November 2026. Nobody earned them, and future results will differ. Gold Breakout's caveat applies to every row: doubling trading costs cuts its yearly result roughly in half.
| Setting | Yearly return | Worst fall | $10,000 became |
|---|---|---|---|
| 1% risk | +7.7% | 23% | $52,821 |
| 2% risk | +15.1% | 41% | $232,463 |
| 3% risk | +22.1% | 55% | $860,933 |
| 5% risk | +33.4% | 74% | $6,317,565 |
| Gold held (benchmark) | +11.0% | 45% | $103,201 |
At 2% risk, the deepest fall was 41%, from May 2018 to October 2019, and it took until March 2023 to recover, 41 months after the bottom. Higher risk settings raised the backtest return but also the worst fall, and a 74% fall at 5% risk would need a gain of nearly 300% just to get back to even. Our post on risk per trade goes through these trade-offs, and choosing among them is your decision, not a recommendation from us.
Keeping the terminal running
An EA only acts while MT5 is open, logged in and online. If your computer sleeps, restarts for updates or loses its connection, the advisor stops watching the market. Stop orders already sent to the broker generally remain, but a stop that is meant to follow the price will not be moved until the advisor is running again.
People handle this in a few ways:
- A computer that stays on, with sleep disabled and updates scheduled for weekends.
- A virtual private server (VPS), a remote computer that runs MT5 around the clock. Many brokers and providers offer these for a monthly fee.
- Regular checks of the Experts tab, so problems are noticed quickly.
Gold trades nearly around the clock on weekdays, as our XAUUSD guide explains, so an advisor that is offline for a day can miss trades or leave decisions waiting.
Troubleshooting common problems
| Problem | Likely cause | What to check |
|---|---|---|
| Advisor not in the Navigator | File in the wrong folder | MQL5 > Experts, then Refresh |
| Advisor attached but no trades | Algo Trading off | Toolbar button and the Common tab setting |
| Web request errors in the log | Address not allowed | Tools > Options > Expert Advisors list |
| "Invalid token" message | Token mistyped, or replaced by a newer one | Copy it again, or create a new token in your account (the old one stops working) |
| Nothing happens on weekends | Gold market closed | Wait for the market to reopen |
| Trades on the wrong market | Advisor on the wrong chart | Attach to your broker's gold symbol |
Key takeaways
- An MT5 Expert Advisor is a program inside MetaTrader 5 that trades automatically while it is attached to a chart and the terminal is running.
- Setup is five steps: install in MQL5 > Experts, allow algorithmic trading, allow needed web addresses, attach to the right chart, and check the logs.
- The AlgolaneBots Gold Breakout advisor also needs web requests to our site and a one-time token, and works on demo accounts only during the free trial.
- The risk setting matters most: in the historical backtest, 1% risk had a 23% worst fall and 5% risk a 74% worst fall, against 45% for gold held.
- Keep the terminal running reliably, and use the kill switch if you need everything closed at once.
This is general information, not personal advice.
Try Gold Breakout on paper first
You can watch Gold Breakout trade with real prices before installing anything. AlgolaneBots runs all five strategies on a $10,000 paper account during a free 90-day trial with no card needed. Sign up and connect a demo MT5 account whenever you are ready.
Where the numbers come from: every strategy figure is from AlgolaneBots's own historical backtests, run on past prices with the method on how we test. Nobody earned them, and future results will differ. General market facts are checked against regulator and company sources. This guide is general information, not personal advice. Read the risk disclosure and how we write our guides.