How to Backtest a Strategy on TradingView
Use the Strategy Tester properly — commissions, slippage, sample size and the settings that turn an impressive backtest into an honest one.
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
1. Backtest on 3+ years and 3+ symbols.
2. Note results. Change nothing.
3. Forward-test on a demo account for 4-6 weeks.
4. Compare live results to backtest expectations.
5. Only then risk money, at the smallest size that matters.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.

Written by
Nikolas MetreveliFounder of SimpleAlgo
Nikolas wrote his first real code at 12 and freelanced software tools and websites for small businesses before finding the markets at 15. He builds and maintains every SimpleAlgo indicator and writes these guides from hands-on use of the tools.
More about Nikolas and SimpleAlgoRelated Articles
How to Use TradingView Bar Replay to Practise Trading
Step through past sessions candle by candle to practise entries, test a setup and build screen time without risking money.
How to Automate TradingView Indicators with Alerts and Webhooks
Turn indicator conditions into automated actions using TradingView alerts and webhooks — what is possible, what is not, and the safe way to set it up.
How to Add an Indicator on TradingView (Step by Step)
The exact steps to add any indicator to your TradingView chart — built-in, community, and invite-only scripts — on desktop and mobile.
Related tools and guides
Next steps on this topic from the rest of the SimpleAlgo library.