How to Backtest a Strategy on TradingView
TradingView has a built-in Strategy Tester. It is genuinely useful and extremely easy to fool yourself with, so the settings matter more than the result.
Run your first backtest
Trade markers appear on the chart, so you can click any trade in the list and jump to it.
Set the properties honestly
Open the strategy's settings and go to the Properties tab. This is where most backtests go wrong.
Read the numbers that matter
The traps
Repainting. If the script uses future data or recalculates on historical bars, its backtest is fiction. Forward-test on live bars before believing it.
Curve-fitting. Tuning inputs until the equity curve is beautiful on one symbol produces a strategy that works on exactly that symbol, in exactly that period. Test on other markets and other date ranges.
Survivor bias on limited history. The free plan restricts how far back strategies can calculate. A backtest that only covers a bull market has not been tested.
Ignoring the bar-magnifier problem. On higher timeframes the tester assumes an order fill sequence within the candle. Intrabar reality can differ.
A sensible testing routine
```text
```
Frequently Asked Questions
Does TradingView have a backtesting tool?
Yes. The Strategy Tester panel runs any Pine Script strategy over historical data and reports net profit, drawdown, profit factor and the full trade list.
Is TradingView backtesting accurate?
It is accurate to the settings you give it. Without realistic commission and slippage, and with recalculation options enabled, results are optimistic. It also cannot see intrabar order sequence on higher timeframes.
Can I backtest indicators, not just strategies?
Not directly — indicators do not place orders. You either convert the logic into a strategy script or step through history manually using Bar Replay.
How much history do I need for a valid backtest?
Enough for at least 100 trades, across more than one type of market. Three years covering a trend, a range and a crash is a reasonable target.
Verified results instead of a blank tester
SimpleAlgo publishes its own backtest results across major markets rather than asking you to build the test yourself, and the signals are non-repainting, so what you see on history is what fires live. Access starts from $5.77/week on the annual plan, with a 7-day money-back guarantee. See the results.
