Subscribe
EN

Guide · 3 min read

How to backtest a trading strategy for free (and trust the result)

Short answer: You can test a trading idea on past prices for free with the MT5 Strategy Tester, a chart platform, a spreadsheet or a few lines of code. The tool is the easy part. What makes the result worth anything is adding the costs, keeping part of the data unseen and counting the trades.

Published: 24 October 2026.

Free, no sign-up On sale: the Monthly Pass and the Lifetime Pass. See the plans

Four free ways to run a backtest

The MT5 Strategy Tester. It comes with MetaTrader 5 and a free demo account. It can replay your broker's recorded ticks and spreads, which makes it the closest free test for an MT5 robot. Step by step settings are in how to backtest a gold strategy in the MT5 Strategy Tester.

A chart platform. Many have a free tier where you write a short script and see every entry on the chart. It is quick for a first look at a rule. Check what spread and commission it assumes, because many default to none.

A spreadsheet. Download candles, add a column for your rule, a column for the result of each trade and one for the cost. It is slow, but it forces you to see every trade.

A few lines of code. Free libraries read exported candles and run a rule over them. You control everything, including the mistakes, so keep the code short and read the trade list.

Five checks that make a free test honest

  1. Put the costs in.
  2. Keep part of the data unseen.
  3. Count the trades.
  4. Cover different markets.
  5. Read the worst stretch, not the average.
The steps in order, each one explained below.
  1. Put the costs in. Spread, commission and swap. A test with none flatters every rule. See what a real backtest should include.
  2. Keep part of the data unseen. Build the rule on one stretch of prices, then run it once on a later stretch it never saw. If it only works on the first, it was tuned to the past.
  3. Count the trades. Under thirty proves almost nothing. A few hundred is a better floor. Fewer trades can look good by luck.
  4. Cover different markets. Include quiet spells, strong trends and sharp spikes, not only the months that suit the rule.
  5. Read the worst stretch, not the average. Look at the biggest drawdown and the longest losing run, and ask whether you could sit through it. See drawdown.

Free does not mean easy to fool yourself with

The risk with free tools is not the tool. It is trying twenty variations, keeping the one that looks best, and believing it. The more variations you try, the better the best one looks, even when none has an edge. Write down how many you tried. Our guide on why gold EAs pass the backtest and fail live goes through each trap.

After the backtest

A passed test is a reason to run the idea on a demo account, not on real money. Watch it through different conditions, then keep a record. Read demo to live trading and how to keep a trading journal.

Where Baroq fits

Baroq sells software. The Lab in a Baroq AI agent tries variations of your idea on past candles, picks on one part of the data, shows the other part on its own, and gives a luck test for how many variations were tried. Agents trade demo money only, and live trading is coming soon. No BaroqTech strategy has passed our judge yet, and our own ideas sit on the record, turned-down ones included.

The Monthly Pass and the Lifetime Pass are software licences for your own MetaTrader account. They score every robot and strategy you run the same way, with costs inside every number. See the plans.

FAQ

Can I backtest a strategy for free?

Yes. The MT5 Strategy Tester is free with a demo account, chart platforms have free tiers, and a spreadsheet or a few lines of code can test a simple rule on downloaded candles. The tool matters less than the checks you apply.

What is the best free backtesting tool?

For MT5 users, the built-in Strategy Tester, because it can replay the broker's real ticks and spreads. For a quick look at a rule, a chart platform is faster. For full control, code on exported candles.

Why does a free backtest look better than real trading?

Most often the costs are missing, the rules were tuned to the same candles they are shown, or there are too few trades. Add the spread, commission and swap, keep part of the data unseen, and count the trades.

How many trades do I need for a backtest to mean something?

Several hundred is a sensible floor for most rules. Under thirty trades proves almost nothing, because luck can produce any result in a handful of trades.

Does a good backtest mean the strategy will make money?

No. A backtest only shows how a rule would have done on past prices. It is a filter that rejects weak ideas, not a promise about the future.

Can Baroq backtest my idea?

The Lab in a Baroq AI agent tries variations of your idea on past candles, picks on one part of the data and shows the other part on its own. Agents trade demo money only, and live trading is coming soon.

Gold EA Checking Kit, $9

Every check from these articles, on one printable page.

An educational tool. It is not investment advice. Trading leveraged products such as gold CFDs carries a high risk of losing money, and you can lose all of it.

BaroqTech makes software. It is not investment advice and it does not manage money. Trading leveraged products such as gold CFDs carries a high risk of losing money, and you can lose all of it. Results from a test or from a demo account do not predict results on a real account.

Free book · PDF · 6 pages

How to Read a Backtest Without Fooling Yourself

How to read any backtest, ours included: unseen prices, costs, the luck test, curve fitting and the five tricks that make a bad idea look good.

We send the download link to this address and keep the address for this book. Without the tick, that is the only email. The book itself is in English. Privacy: what we store and why.

Keep reading

All 73 guides

Markets in numbers

Compared

Seasonality

Volatility

Price history

Best time to trade

Moving averages

Market correlations

RSI

Limited time offer

20% off

your first month of the Monthly Pass

Offer ends 31 October 2026

We email you the code and one note when the trading system goes on sale. Unsubscribe in any email. Privacy