StructureX

Home › Glossary

What is backtesting?

In one line: Backtesting means testing your trading rules on past charts, one candle at a time, to see how they would have played out.

Trading glossary · Updated 2026-10-21

A simple example

You pick a stock and go back six months on the chart. You hide everything to the right, then move forward one candle at a time, as if it were happening live.

Each time your rules say "trade," you write it down: entry, stop loss, target, result. You keep going until you have 100 trades.

Say the log shows 38 wins of about +2 units each and 62 losses of −1 unit:

38 × 2 = +76. 62 × 1 = −62. Total: +14 units over 100 trades. That's a math example, not a promise. Past charts don't predict future ones, and live trading adds costs and nerves.

Plug your own numbers into the expectancy calculator to see what your log says.

An illustration: replay a past chart candle by candle and log each trade before moving on.
An illustration: replay a past chart candle by candle and log each trade before moving on.

Why it matters

Backtesting teaches you more than a number. It shows whether your rules are clear enough to follow. If you keep thinking "it depends," the rule isn't written down well yet.

It also shows you what losing streaks look like before you live through one. Seeing six losses in a row on paper makes it easier to stay calm when it happens for real.

A common mistake

Peeking. You already know what the chart did next, so it's easy to "see" the perfect entry. That's called look-ahead, and it makes any set of rules look better than it is.

The fix is simple: never look right of the current candle. TradingView's bar replay hides the future for you.

No row, no trade. If a setup isn't written in the log, it didn't happen — even the ones you skipped. A free journal template makes it quick.

The step-by-step method is in how to backtest a trading strategy.

Questions

How many trades should I backtest?

Many traders aim for at least 100. Fewer than that, and a lucky or unlucky streak can fool you.

Is backtesting the same as paper trading?

No. Backtesting uses past charts. Paper trading uses live prices with pretend money.

Can I backtest by hand?

Yes. Manual replay is slow, but it trains your eye in a way automatic tests don't.

Want the next step? We'll walk you through it.

Four free lessons by email, one every few days — each with a 10-minute exercise on a real chart.

Send Me the Free Lessons 4 short emails · No spam · Unsubscribe anytime

Or see the whole method, step by step:

See What’s Inside the Course Try everything free first. Decide when you're ready. · Open the free chart tool (works in the TradingView phone app)

One chart idea a day, in plain English. Follow along:

Follow on XFollow on TradingView