Automated tradingUpdated 3 min readBy the FXNOD team
How to test a trading bot before using real money
Test a trading bot on a demo account before using real money. Use the same stake and limits you plan to use live, run at least 100 trades across several sessions, and record the win rate, the average win and loss, the longest losing streak and the deepest drop in balance. Go live only if you would accept those numbers in real money.

Set the test up so it can fail
A demo account often arrives with a balance of thousands. Testing a stake of 1 against 10,000 tells you nothing, because no losing streak can hurt. Decide the amount you would really deposit, treat that as your balance, and stop the test when the demo has lost it, however much virtual money remains.
The test plan
Write down what you expect
Before the first trade, note the win rate and result you think the bot will produce. The gap between this and reality is the most useful thing you will learn.
Change nothing during a run
One set of settings per test. If you adjust the bot after every loss you are testing your reactions, not the bot.
Run at least 100 trades
For bots that trade rarely, run for longer. For strategies with a very high or very low win rate, run several hundred, because the rare outcome is the one that decides the result.
Spread it over several sessions
Run at different times and on different days. One good hour is an anecdote.
Record the four numbers
Use the table below and fill it from the run history, not from memory.
The four numbers
| Number | How to get it | What it tells you |
|---|---|---|
| Win rate | Wins divided by total trades | Only meaningful beside the next row |
| Average win and average loss | Total won divided by wins; total lost divided by losses | Whether the wins are large enough to pay for the losses |
| Longest losing streak | Count it in the trade list | What your stake sizing has to survive |
| Maximum drawdown | The largest fall from a peak in the balance to the low that followed | The loss you must be able to sit through |
Do the sum
Expected result per trade equals the win rate multiplied by the average win, minus the loss rate multiplied by the average loss. With a 55% win rate, an average win of 0.90 and an average loss of 1.00, that is 0.55 x 0.90 minus 0.45 x 1.00, which is 0.495 minus 0.45, or about 0.045 per trade. If the answer is negative after a few hundred trades, more trades will not rescue it.
What a demo cannot tell you
- How you will behave when the money is yours. Most people interfere with a live bot in ways they never did on demo.
- Anything about the future. A test describes the period it covered.
- Whether a recovery strategy is safe. A Martingale that survived 500 trades has simply not met its streak yet.
Moving to real money
Start with the minimum stake and the same limits, and compare the first hundred live trades with the demo numbers. If they differ sharply, stop and find out why before raising anything.
Questions people ask
- How long should I test a trading bot?
- Count trades, not days. One hundred is a floor, and several hundred is better for strategies that win very often or very rarely. Spread them over several sessions.
- Is demo trading the same as real trading?
- The bot follows the same rules on both. What differs is you: real losses change behaviour, and a real balance is usually far smaller than a demo one.
- What is the difference between backtesting and demo testing?
- Backtesting replays a strategy on past prices. Demo testing runs it forward on live prices with virtual money. Demo testing is slower but cannot be accidentally fitted to the past.
Run a bot that keeps its limits
FXNOD's bots run on its servers and will not start without a stop loss, so your limits hold when your device is off. Build one in Bot Forge or start a ready-made one in Auto Hub, on your Deriv demo account first.
Get started