Ready to go further
Next: what the spread does to a single trade
The spread page shows how the gap between the buy and sell price becomes a cost on every trade, with the arithmetic.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- A strategy tester in a trading platform runs an expert advisor (EA) over stored past prices and records the trades it would have made. See expert advisor.
- Stored prices can be ticks (individual price changes) or bars (open, high, low and close for a period). Bars hide what happened inside the period.
- Many testers use one fixed spread for the whole run. In the made-up example below, the same 200 trades give $400 at a 1.0 pip spread and $240 at 1.8 pips (calculated by us on 29 Oct 2026, exact).
- Some testers show a modelling quality figure. In general terms it says how much of the test used detailed price data. It does not measure whether the result is realistic.
- A tester result is a model. Check it with a demo account and with the live trades of a small size before trusting a number.
What the strategy tester does
The strategy tester is the part of a platform that feeds old prices to an EA one step at a time and lets the EA open and close trades as if it were live. At the end it prints a report: number of trades, total, drawdown and a curve of the balance. It is fast, which is its value. A year of trading can be replayed in minutes.
The details differ between platforms and versions, and the settings are yours to choose. This page covers the ideas that apply to any such tester. Check what your own platform does before relying on a number. For the wider method see how to backtest.
Tick data versus bar data
A tick is one price change. A bar sums up a period, such as one minute, in four prices: open, high, low and close. If a tester has only bars, it has to invent a path inside each one. It might assume the price moves from open to high to low to close, or some other order. A tester with real ticks does not have to guess.
The guess matters whenever both a take profit and a stop loss sit inside one bar's range, or when an EA acts several times within a bar. The figure below shows the case.
Modelling quality, in general terms
Some testers report a percentage that describes how much of the test period was built from detailed data and how much from rough data. A high figure is a sign that fewer guesses were made. It is not a sign that the strategy is good, and it does not cover the spread, slippage or the quality of the stored ticks themselves. If the stored history has gaps, or came from one source and the account trades on another, a high figure can still sit on top of poor data.
- Short-term bots (scalpers, grids with tight spacing, anything that acts inside a bar) are the most sensitive to this.
- Slow bots that trade once a day on the close are the least sensitive, since the path inside the bar rarely decides their trades.
- Stops close to price are hit or missed depending on the invented path.
The spread setting
History files usually hold prices without a record of the spread at each moment. So many testers ask you for one number and apply it to every trade. Live, the spread widens at quiet hours, around news and at the rollover. A flat setting hides all of that.
The effect is easy to compute. A bot makes 200 trades, and the average move in its favour before the spread is 3.0 pips per trade. Every number is made up. A 0.1 lot trade is worth $1 per pip. Everything was calculated by us on 29 Oct 2026 and is exact.
| Spread setting (pips) | Net per trade (pips) | Total (pips) | Total ($) |
|---|---|---|---|
| 0.0 | 3.0 | 600 | $600 |
| 1.0 | 2.0 | 400 | $400 |
| 1.5 | 1.5 | 300 | $300 |
| 2.0 | 1.0 | 200 | $200 |
| 3.0 | 0.0 | 0 | $0 |
Going from a 1.0 pip setting to a 1.8 pip average live spread takes $160 out of $400, leaving $240. At 3.0 pips the net per trade is zero. The strategy did not change. Only a number the tester let you type changed. The more trades a bot makes, the larger this effect, since the cost is paid on each one.
The fix is to run the test at a spread above your guess, and at a few values, and to take the average live spread from your own account. That is also a job for a trading journal.
Why tester results differ from live
- Fills. The tester usually fills at the price it sees. Live orders meet slippage and sometimes requotes.
- Spread. Fixed in the test, variable live.
- Data. Stored history may not match your account's own prices.
- Overnight charges. Some tests leave out swap, which matters for bots that hold positions for days.
- Optimising. If you let the tester search for the best inputs, it finds a fit to the past. See overfitting.
- Timing. A live EA runs on a computer or a VPS with delays that the tester does not model.
What the tester does not tell you
It does not say how the EA will do on tomorrow's prices. Treat a tester report as a first filter: an EA that fails here should not go further, and one that passes still has to survive forward testing on a demo account.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What is the MT4 strategy tester?
It is the part of the platform that replays stored past prices through an EA and reports the trades it would have made. The word "MT4" names the platform; the same ideas apply to other testers.
What does modelling quality mean?
In general terms, it describes how much of the test was built from detailed price data instead of estimated paths. A high figure means fewer guesses, not a better strategy.
Why is my live result worse than the test?
Usual causes are a wider live spread than the setting, slippage, data that differs from your account, left-out swap, and inputs fitted to the past.
Which spread should I set?
Use a value above your account's average, and test several. Take the average from your own records, because spreads vary by broker and time of day.
Are bar data tests useless?
No. For slow bots that trade on the close they can be adequate. For bots that act inside a bar, they involve guessed paths.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education about testing. The numbers are made up and your platform, data and results will differ.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss