← All guides

How to install a trading robot on MetaTrader 5

By Najm FX (NFX) · 7 min read · Basics · Published · Updated

Short answerTo install a robot (Expert Advisor) on MetaTrader 5: File, then Open Data Folder, then MQL5, then Experts; paste the ex5 file, restart the platform, and drag it from the Navigator onto the symbol and timeframe it was built for. It will not place a single trade unless the Algo Trading button in the top toolbar is green and the Allow Algo Trading box is ticked in the Common tab.

A robot (or Expert Advisor) is a program that executes trades on your behalf according to programmed rules. Installing it is easy, but there are two buttons that, if you miss them, will leave you watching a robot that just sits there — with no idea why.

The steps

  1. Open MetaTrader 5.
  2. File → Open Data Folder.
  3. Go into MQL5 → Experts. A robot goes into Experts — not Indicators. This is the most common mistake.
  4. Paste the robot file (ex5 or mq5).
  5. Close the platform and open it again.
  6. In Navigator, open Expert Advisors and you will find the robot.
  7. Drag it onto the chart — onto the symbol and timeframe it was designed for, not any chart.

The two buttons that stop everything

1. The "Algo Trading" button in the top toolbar

It must be enabled (it turns green). If it is red, the robot is installed but forbidden from placing any trade.

2. The "Allow Algo Trading" box in the settings window

When you drag the robot onto the chart, a window appears. Go to the Common tab and make sure the box is ticked. Then OK.

When it is running properly you will see a smiling face 🙂 in the top corner of the chart. A frowning face ☹️ means one of the two buttons is off.

Check these four before you run it

WhatWhy it matters
SymbolA robot built for gold (XAUUSD) can lose consistently on another pair — the price behaviour is completely different.
TimeframeAn M1 robot works with one-minute movement. Run it on H1 and the whole logic breaks.
Minimum depositMany robots (especially grid robots) need enough balance to carry several open trades. Less balance than required = a wiped account.
Lot sizeThe default setting does not suit every account. Reduce it to the smallest value first and raise it after you have seen how it behaves.

Every robot in our library lists these four in the specs table on its page.

Why most people recommend a VPS

The robot only works while the platform is running and the internet is connected. Shut down the computer or lose the connection during an open trade — the robot stops and the trade is out of its control.

A VPS is a remote server that stays on 24 hours a day; you install the platform on it and forget about it. Not mandatory, but if the robot trades on a small timeframe or at night it becomes a practical necessity.

The plain truth about risk

A robot executes rules; it does not understand the market. Any robot — whatever it is — can lose, and can lose a lot on a strong news day. There is no "guaranteed" robot.

The rule that never bends: test it on a demo account for at least two weeks, and watch it on quiet days and on turbulent days. If you move to a real account, start with the smallest possible size and an amount you can afford to lose entirely. This is not investment advice — it is basic protection.

Author: Najm FX (NFX) Arab trader and founder of Yakuzza. He builds trading tools and uses them before publishing them, and shares analysis and tutorials on the Najm Forex YouTube channel.
About YakuzzaYouTube channel

More guides

How to install an indicator on MetaTrader 5 — step by step A complete guide to installing any ex5 or mq5 indicator on MetaTrader 5: where the file goes, why it sometimes does not show up, and how to fix that in a minute. Types of trading robots — and the real risk of each one Grid, martingale, scalping, trend, breakout: how each type works and exactly where it breaks. The plain talk you will not find on sales pages. How to calculate the right lot size — risk management in numbers The formula that sets your trade size from your balance and stop loss, with worked examples, and how to find the pip value of any pair from your platform. Trading gold XAUUSD — why it is different and how to handle it Gold is not a normal currency pair: higher volatility, a wider spread, and a reaction to the dollar and interest rates. What to know before trading it and how to set up for it. How to test a robot on a demo account properly (and how real differs) Opening a demo account on MetaTrader, exactly what to watch during the test, and the four differences that make a demo result different from a real one. Timeframes M1 M5 M15 H1 H4 D1 — which one suits you What each MetaTrader timeframe means, how many signals it gives, how much screen time it needs, and why running a tool on a timeframe it was not built for ruins its result. Smart money and liquidity — what an Order Block and a Liquidity Sweep really are A clear explanation of smart money concepts: order block, liquidity sweep, break of structure, fair value gap — and how to read them on the chart without the jargon. Moving averages and trend indicators — how to use them and where they stop working The difference between SMA and EMA, the crossover method, choosing the period, and most importantly: why trend indicators lag and how to work with that lag. Indicator vs robot (Expert Advisor) — what the difference is and which you need An indicator analyses and tells you; a robot executes for you. The difference explained in detail, which one suits your situation, and why confusing them costs money. Spread, commission and swap — the real cost of every trade The three costs that eat into your profit on every trade, how to see them in your platform, and why they decide whether your strategy is profitable at all. Trading indicators: the 20 that matter and what each tells you A plain guide to the 20 core trading indicators in four families: trend, momentum, volatility and volume. What each one measures, its common settings, and where it fails. Multi-timeframe scalping — trend from above, entry from below How to scalp with multiple timeframes: one for trend, one for the setup, one for entry. Timeframe ratios, session timing, costs, and the repainting trap in MTF indicators.

Everything here is educational, not investment advice. Leveraged trading carries a high risk and you can lose your entire capital. Test any tool on a demo account first, and never risk money you cannot afford to lose.