← All guides

How to test a robot on a demo account properly

By Najm FX (NFX) · 7 min read · Robots · Published

Short answerTo test properly on a demo account: open it with a balance close to what you will actually trade with (not $100,000), run the robot on the same pair and timeframe, and watch the largest floating loss and the number of trades, not just the profit. Two weeks is the sensible minimum and a month is better, and the period should include one high-impact news day, some quiet days, and the start of a week. Real trading differs in four ways: slippage, spread, your own psychology, and real market liquidity.

"Test it on demo first" is advice everyone gives. But most people test it wrong: they run the robot for two days, see it in profit, and move to a real account. A proper test has conditions — and limits you need to know about.

Open a demo account in a minute

  1. Open MetaTrader 5.
  2. From the menu: FileOpen an Account.
  3. Pick your broker from the list (or type its name in the search box).
  4. Choose Open a demo account.
  5. Set an opening balance close to your real balance. This is the most important step and the one most often done wrong. If you are going to trade with $500 and you test on a demo holding $100,000, the result means nothing — the risk ratio is completely different.
  6. Set the same leverage you will use on the real account.
  7. Press Finish — the account opens immediately, no documents and no money.

What to watch during the test

The closing balance is not the most important number. These four are:

The numberWhere to find itWhy it matters
Largest floating lossWatch the Equity field while trades are openThis is the number that wipes an account out. If Equity dropped 40% on demo, expect worse on a real account.
Longest losing streakThe History tabIt tells you whether the robot doubles down after a loss, and whether you can stomach it.
Number of tradesHistory10 trades is not a sample. Under 50 trades the result can easily be chance.
Its behaviour on a news dayWatch it on a high-impact data dayThis is where you find out whether it actually has protection or not.

How long should the test run?

The sensible minimum is two weeks, and a month is better. What matters is that the period includes:

  • A high-impact economic data day (US rates, the jobs report).
  • Quiet, sideways days.
  • The start of a week (which sometimes opens with a price gap).

A robot that wins for two weeks in a quiet market has not been tested against a single difficult condition.

The four differences between demo and real

1. Slippage

On demo, orders usually fill at exactly the requested price. On a real account, during fast moves, the trade opens at a worse price. That difference hits scalping hardest.

2. The spread

Some demo accounts use a fixed spread that is tighter than reality. A robot that wins on a one-pip spread can lose on a three-pip one.

3. Your psychology

Losing an imaginary $300 is one thing; losing $300 of your own money is something else entirely. Most people stop the robot at the worst possible moment — exactly when it is at its largest floating loss and right before it recovers.

4. Real market liquidity

On demo your order competes with no one. On a real account, at certain times, it may simply not fill at the price you wanted.

The test is over — what now?

  1. Move to a real account with the smallest lot possible (0.01), even if your balance allows more.
  2. Keep it at that size for a full month. Compare the result with the demo — if the gap is large, the cause is usually spread or slippage.
  3. Do not increase the size until you have seen a consistent real result, and then increase it gradually.

A demo protects you from a technical mistake (a broken robot, a wrong setting, the wrong pair). It does not guarantee profit — markets change, and a robot that worked for 3 months can fail in the fourth.

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. How to install a robot (Expert Advisor) on MetaTrader 5 and run it properly Installing an Expert Advisor step by step, enabling algo trading, the button that keeps the robot idle if you miss it — and what to check before running it with real money. 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. 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.

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.