All guides · Trading bots

Testing a Bot on a Demo Account

Why every trading bot should run on a demo account before real money, and how to set one up in MetaTrader.

What it is

A demo account is a practice account with virtual money and real prices. Running a bot on demo, also called forward testing, shows how it behaves with your broker's real spreads, swaps, trading hours and order execution, without risking anything.

Step by step

  1. In MetaTrader, open File → Open an Account and pick your broker.
  2. Choose a demo account and set the balance to roughly what you'd trade with for real.
  3. Install the bot on the demo account and attach it to the right symbol.
  4. Let it run for a few weeks, or long enough for at least a handful of trades.
  5. Compare what it did with what the strategy says it should do, and with the backtest.

Why it matters

A backtest uses history; a demo test uses today's market and your actual broker. It catches problems a backtest can't: a different symbol name, a broker's day starting at a different hour, wider spreads at night, or orders being rejected.

Good to know

Treat the demo like real money: same balance, same settings, no restarting when it loses. If the demo results look nothing like the backtest, find out why before going live.

Common mistakes

Using a huge demo balance that makes risk look small; stopping after two trades; and changing settings mid-test.

Related