Skip to content
TMTradeMaster

Academy › Level 6: Automated Trading › AutoBot on MT5

Lesson 2 of 4  8 min read · 4 videos

How to Set Up AutoBot on MT5: Step by Step

Most automation problems are not caused by the bot; they come from a terminal that is closed, a button that is off or a symbol name that does not match. Follow this step-by-step setup and checklist and your MT5 will be ready to execute signals while you are away.

What do you need before you start?

RequirementWhy it matters
A Windows PC or Windows VPSAutomation runs inside the MT5 desktop terminal, which must stay switched on
MT5 desktop terminalThe mobile app and web terminal do not run automated trading
An MT5 account with your brokerDemo or live, logged in with the trading password
Algo Trading turned onWithout it, MT5 blocks every automated order
A stable internet connectionNo connection, no orders

A VPS (virtual private server) is a Windows computer in a data centre that runs around the clock. You connect to it remotely, install MT5 there and close your own laptop without stopping anything. It is the simplest way to stay active 24/5.

Step 1: install MT5 and log in to your trading account

Install the MT5 desktop terminal from your broker, open it and use File > Login to Trade Account. Enter your account number, your trading password and the correct server name from your broker.

Watch out for one common trap: MT5 accounts also have an investor password, which is read-only. You can see the account with it, but no trade can be placed, manually or automatically.

Then check the connection indicator in the bottom-right corner of the terminal. A ping figure in milliseconds means you are connected. Messages such as No connection or Invalid account mean the login or server is wrong. The Journal tab in the Toolbox (Ctrl+T) shows the login messages in detail.

Step 2: turn on Algo Trading and connect AutoBot

Click the Algo Trading button on the MT5 toolbar so it shows as enabled. Then open Tools > Options > Expert Advisors and make sure Allow algorithmic trading is ticked.

In the same Options tab, MT5 can be set to switch algorithmic trading off automatically when you change account or profile. If you switch between accounts, check the button again afterwards. If it is off, automated orders are rejected with return code 10027, autotrading disabled by the client terminal.

Next, connect AutoBot to your MT5 account by following the setup steps on the AutoBot page. Do the remaining checks below before you leave it running.

Step 3: match symbol names and lot limits

Brokers name the same market differently. Gold might be XAUUSD, XAUUSD.m, XAUUSDm or GOLD. The Dow might be US30, DJ30 or US30.cash. A signal for XAUUSD cannot be placed on an account where the tradable symbol is called something else, so check exactly what your broker uses.

Open Market Watch (Ctrl+M), right-click and choose Symbols to see every instrument your account offers. Right-click a symbol and choose Specification to see the details that matter for automation:

  • Contract size: usually 100 ounces per lot on gold, but indices in particular vary by broker.
  • Minimum volume: often 0.01 lot.
  • Maximum volume: the largest single order allowed.
  • Volume step: the increment lots must follow, often 0.01.

An order outside these limits is rejected with return code 10014, invalid volume.

Step 4: check your risk against the minimum lot

Automated sizing can only go as small as your broker's minimum lot. On gold, with a pip counted as a $0.10 move, 0.01 lot (1 ounce) is worth $0.10 per pip. A 100-pip stop at 0.01 lot therefore risks $10, the smallest possible risk on that trade.

On a $2,000 account risking 1% ($20), that same signal sizes to 0.02 lot. Fine. On a $300 account risking 1% ($3), the trade cannot be sized that small at all. Either the account needs more funds or the risk setting needs to be realistic for the account size. Run your own numbers with the position size calculator.

Check the trading hours in the Specification window too. Gold and indices have daily breaks, and every market closes at the weekend. Orders sent while a market is closed are rejected.

The checklist before you leave it running

  1. MT5 desktop is open, logged in with the trading password, and the connection indicator shows a ping.
  2. Algo Trading is on, and Allow algorithmic trading is ticked in Options.
  3. AutoBot is connected, following the steps on the AutoBot page.
  4. The symbols you trade are visible in Market Watch with the correct names.
  5. Your risk setting is above what the minimum lot allows on typical stops.
  6. There is enough free margin for the trades you expect.
  7. Your PC will not sleep (Windows power settings set to never sleep), or MT5 runs on a VPS.
  8. Windows updates will not restart the machine during trading hours.
  9. After the first signal, the position appears in the Trade tab with stop loss and take profit filled in.

Tick every line on the MT5 execution checklist before the next session, and order sent vs order filled shows how to confirm that first trade.

Key takeaways

  • Automation runs in the MT5 desktop terminal, so it needs a Windows PC or VPS that stays on.
  • Log in with the trading password, not the read-only investor password, and confirm the connection ping.
  • Turn on the Algo Trading button and allow algorithmic trading in Options, or orders fail with code 10027.
  • Match symbol names and suffixes, and check minimum volume, maximum volume and volume step in Specification.
  • Run the pre-launch checklist and confirm the first trade in the Trade tab.

How TradeMaster uses this

Once this checklist is done, TradeMaster's AutoBot takes over the execution: each signal lands on your MT5 with entry, stop loss and take profit, sized to your risk. With 15-20 Price Action signals every day and every result posted publicly by a bot, you get full automation without giving up transparency. Start with the 7-day free trial and the AutoBot setup guide. Try it free for 7 days.

Quick check: 3 questions

1. Which password must you log in with for automated trades to work?

The investor password is read-only, so no trades can be placed with it.

2. Your broker lists gold as XAUUSD.m. What does that mean for automation?

Symbol names and suffixes differ by broker, and orders must use the exact tradable symbol.

3. A gold signal has a 100-pip stop and the minimum lot is 0.01. What is the smallest risk possible on that trade?

0.01 lot is 1 ounce, worth $0.10 per pip, so 100 pips risks $10.

Questions traders ask

Can I run an MT5 trading bot on a Mac?

Automated trading in MT5 runs in the Windows desktop terminal. The simplest way for Mac users is a Windows VPS: you connect to it from your Mac, install MT5 on the VPS and let it run there around the clock. That also solves the problem of a laptop going to sleep, which would stop any automation running on it.

Why is the Algo Trading button turning off by itself?

MT5 has settings under Tools > Options > Expert Advisors that can disable algorithmic trading automatically when you change account, change profile or make certain other changes. If you switch accounts or reload a profile, the button can turn off. Check those options, and always look at the Algo Trading button after changing anything in the terminal.

Does an MT5 bot keep trading if I close the terminal?

No. Automated trading in MT5 only runs while the desktop terminal is open, logged in and connected. Closing MT5, shutting down the PC or letting it sleep stops any new orders from being placed. Trades already open keep their stop loss and take profit on the broker's server, but new signals will be missed until the terminal is running again.

7 DAYS FREE

Learn here. Trade it live with 17,000+ traders.

The TradeMaster Discord turns these lessons into live trades: 15 to 20 Price Action signals every day, executed on your MT5 by AutoBot, every result posted publicly by the bot. Last 30 days: 92.3% win rate.