VASA Traders
Back to Blog
Indicator Guides

How to Backtest a Trading Strategy on TradingView: Step-by-Step Guide

Learn how to backtest your trading strategy on TradingView. Step-by-step guide covering strategy tester, replay mode, interpreting results, and avoiding common backtesting mistakes.

8 min read

Don't put real money behind a strategy you haven't tested against the past. Backtesting means running it over historical data to see how it would've behaved, and TradingView puts that within reach of anyone — no coding degree required. It's the difference between a trading plan and a hunch.

What backtesting tells you

A decent backtest forces a strategy to answer for itself:

  • Does it actually make money across a stretch of time?
  • How deep a drawdown should you brace for?
  • How many losses in a row are normal?
  • What's the win rate, and the profit factor?
  • Does it hold up when conditions change?

Skip this step and you're not trading a strategy — you're gambling and calling it one.

Method 1: the Strategy Tester

TradingView's built-in Strategy Tester runs the numbers automatically on any script set up as a strategy:

Add a strategy

  • Open a chart and click "Indicators"
  • Search for strategies — they carry a different icon than indicators
  • Add one to the chart

Read the results

  • Open the "Strategy Tester" tab at the bottom
  • Start with the Overview for the headline numbers
  • Dig into the Performance Summary for the detail
  • Scan the List of Trades to see the individual results

The numbers that matter

  • Net Profit — the total over the test window
  • Profit Factor — gross profit divided by gross loss; above 1.5 is healthy
  • Max Drawdown — the worst peak-to-trough drop; you want it under 20%
  • Win Rate — the share of trades that won
  • Average Win/Loss — how your typical winner sizes up against your typical loser
  • Sharpe Ratio — return adjusted for risk; above 1.0 is good

Method 2: Replay mode

Replay walks you through history candle by candle, as if it were unfolding live:

Turn it on

  • Click "Replay" at the top of the chart
  • Pick a start date
  • The chart rewinds to that point

Step forward

  • Hit play, or advance one candle at a time
  • Watch the indicator print signals as they'd have appeared
  • Log each one and whether you'd actually have taken it
  • Note how each trade turned out

It's slower than the automated tester, but nothing gives you a better feel for how a strategy trades when you can't see the future.

Reading the output honestly

Healthy results tend to show:

  • Profit factor above 1.5
  • Max drawdown under 20%
  • Win rate somewhere between 40-65%, depending on the strategy type
  • An equity curve that climbs without wild lurches
  • Similar behavior across different conditions

Warning signs:

  • Profit factor under 1.2 — barely breathing
  • Max drawdown over 30% — too much risk to sit through
  • A win rate over 80% paired with a weak profit factor — that's curve-fitting, not skill
  • Nearly all the profit from a couple of monster trades — not repeatable
  • Works in only one regime, trending or ranging but not both

The traps everyone falls into

Curve fitting

Tuning the settings until they fit the past perfectly. It looks brilliant in the tester and dies in live trading. The fix is out-of-sample testing — hold back data the optimization never saw.

Survivorship bias

Testing only on stocks that are still around. The companies that failed aren't in your data, which flatters the results. Test on indices or futures instead.

Forgetting slippage and commissions

Backtests love to assume perfect fills at the exact price. Reality charges you. Bake in a pip or two of slippage and realistic commissions.

Too short a window

Six months doesn't cover enough kinds of market. Run it over at least two or three years so it sees a few different regimes.

One instrument

Something that prints on EUR/USD can fall flat on gold or Bitcoin. Test across several instruments and timeframes before you trust it.

Then forward test

A backtest is a start, not a green light. After it, prove the thing forward:

  1. Paper trade it on a demo account for a month or two
  2. Go live small, minimal size, for another month
  3. Scale up only once steps 1 and 2 have held together

VASA Trend AI runs across multiple markets and timeframes, but we'd still tell you to paper trade for a couple of weeks first, just to get used to how the signals behave before real capital is involved.

The one thing to remember

Testing your strategy against history isn't optional. Use TradingView's tools, but keep the pitfalls above in mind, and always follow a backtest with paper trading before you risk a cent. Past results never guarantee future ones — but a strategy that can't even make money in a backtest has no business getting your money in real life.

Ready to Trade Smarter?

Get AI-powered buy/sell signals directly on your TradingView charts with the VASA Trend AI.

View Pricing Plans

Related Articles