Step-by-Step Tutorials

Tutorial: How to Backtest a Strategy in 5 Steps

A practical guide to testing your strategy on historical data using TradingView's replay mode.

Key rules

  1. Write entry criteria before starting the backtest — not during
  2. Use TradingView Replay: go back 12 months, advance bar-by-bar
  3. Record every qualifying setup — not just the ones you like
  4. Calculate win rate and expectancy after minimum 100 trades
  5. Validate on a separate out-of-sample period

Step 1: Write out your exact setup criteria in advance. Step 2: Select a market and scroll back 6–12 months. Step 3: Use TradingView Replay to advance candle-by-candle. Step 4: Record every qualifying setup in a spreadsheet. Step 5: Calculate win rate, average R, and expectancy after 100+ samples.

Common pitfall: hindsight bias — advance only one candle at a time using Replay to prevent it.

Related lessons