Steven Imrich

HomeTrading platforms → Is the TradingView strategy tester accurate?

Is the TradingView strategy tester accurate?

Updated August 27, 2026

Short answer

It's accurate about what it claims to do, which is fill orders against four prices per bar with whatever costs you told it about. The trouble is that the defaults tell it about no costs at all, the fill model guesses at intrabar order, and a percent-of-equity position size compounds every trade into a curve that has nothing to do with an account. Treat the equity graph as arithmetic, not as a forecast, and it's a genuinely useful tool.

Start with how an order actually gets filled

A historical bar is four numbers. The tester has to invent a path through them, and it does, by a documented rule. If the open is closer to the high it assumes price went open, high, low, close. If the open is nearer the low, open, low, high, close. Inside that path it assumes no gaps, so any price in the bar’s range counts as touched.

That rule is fine for a market order. It’s wildly generous for a stop or a limit sitting inside the bar. Your stop and your target were both inside the same candle and the emulator picked an order for you. On a volatile 5 minute bar you have no idea which one you’d really have hit.

Two more mechanics. Orders can’t fill on the tick they’re created, so a signal at a bar’s close fills at the next bar’s open by default. And if price jumped past your level between two bars, the fill happens at the next open, which is at least honest about gaps.

The Bar Magnifier

This is TradingView’s fix for the guessing. Turn on high bar detalization, or write use_bar_magnifier = true in the strategy() declaration, and the emulator pulls lower timeframe OHLC to work out the intrabar sequence properly instead of assuming it.

Two catches. It’s Premium and Ultimate only. And a script can request at most 200,000 bars from a lower timeframe, so on a long intraday test you run out of magnified data and the emulator quietly reverts to the old assumption for the rest. Nothing on screen shouts about it.

If a strategy’s results collapse when you switch the magnifier on, they were never real. That comparison takes ten seconds and it’s the most informative thing on this page.

Where the fantasy numbers come from

Two settings, working against each other.

The Pine default is default_qty_type = strategy.fixed with default_qty_value = 1, and initial_capital = 1000000. One share against a million dollars. So the first thing everyone does is look at a net profit of 0.4% and go fix the position size.

The usual fix is percent of equity, and that’s where it goes sideways. strategy.percent_of_equity with a value of 100 means every trade risks the entire account, and every win increases the size of the next trade. Twenty good trades in a row don’t add up, they multiply. That’s how you get equity curves that go vertical on the right hand side and net profits with too many zeros to read. The strategy might be perfectly ordinary. The compounding is doing the work.

You can see this in about a minute. Take any strategy with a spectacular curve, open Settings > Properties, change Order size from percent of equity to a fixed quantity, and watch the curve go from exponential to roughly straight. If the straight version is still positive you’ve learned something real. It’s usually still positive, just much smaller.

Costs are zero unless you type them in

The documented defaults are commission_value = 0 and slippage = 0. Nothing is deducted. A strategy that trades six times a day for four years and shows a modest profit at zero cost is a losing strategy with extra steps.

Fill both in. Something like this, adapting the numbers to your instrument and broker:

strategy("example", overlay = true,
     initial_capital   = 10000,
     default_qty_type  = strategy.percent_of_equity,
     default_qty_value = 5,                          // 5, not 100
     commission_type   = strategy.commission.percent,
     commission_value  = 0.05,
     slippage          = 2)                          // ticks, not points

Slippage is in ticks and applies to market and stop orders. Two ticks isn’t a punishment, it’s a Tuesday. Also check backtest_fill_limits_assumption, which defaults to 0, meaning limit orders fill the instant price touches the level. Set it to 1 or 2 and price has to move that many ticks past your limit first, much closer to how a real queue behaves.

TradingView’s own strategy publishing rules say commissions “must be enabled for the chosen instrument type” and that “a zero-commission setup is only acceptable if clearly justified in the description”. That’s their bar for a published script. It’s a reasonable bar for your own.

Your sample is smaller than it looks

Chart history is capped by plan. Roughly 5,000 bars at the low end, 10,000 on Essential and Plus, 20,000 on Premium, 25,000 on Expert, 40,000 on Ultimate. On a 5 minute chart 10,000 bars is about two months of a US equity session. Two months is one market regime.

The publishing rules ask for at least 100 trades, with the useful qualifier that “100 trades on weekly data carry more weight than 100 trades on minute data”. A tester showing 23 trades and a 78% win rate is telling you almost nothing.

There’s also a hard limit of 9,000 orders in a standard test, after which earlier ones drop out of the report. Deep Backtesting raises that to a million and covers the full available range, but it’s a paid-plan feature.

Repainting strategies backtest beautifully, which is the problem

If the underlying signal peeks at future data, the tester faithfully fills orders on it. You get entries at the exact bar a move began, a staircase equity curve, and a drawdown column full of near-zeros. It looks like genius and it’s a bug.

calc_on_every_tick = true is its own version of this. The strategy recalculates on every realtime tick but only on bar close in history, so live and backtest aren’t the same strategy. Testing for all of it is covered in how to tell if an indicator repaints. Short version, only read the report on a strategy that passes bar replay unchanged.

One more that gets missed. Results on Heikin Ashi, Renko, Kagi, point and figure and range charts don’t reflect actual market conditions, because the emulator fills at synthetic prices. The docs say so directly. A Renko backtest is not a backtest.

What it is genuinely good for

Comparing two versions of the same idea under identical settings. Counting how often a condition actually occurred instead of guessing. Finding out your setup only ever fired 11 times in three years. Seeing the shape of a drawdown, if not its exact depth. Catching logic errors, because a strategy that never enters a short has a bug you’d never spot by eye.

It’s a calculator that never gets tired and never remembers trades selectively. That’s worth a lot. It just isn’t a preview of your account.

The checklist

Before you believe a single number in that report:

  • Bar Magnifier on, and compare the result to magnifier off.
  • Order size off percent-of-equity, or down to something small like 2 to 5%.
  • Commission filled in at your real rate, per side.
  • Slippage at 2 ticks or more.
  • At least 100 trades, on a standard candle chart.
  • The same test run on a second symbol and a second timeframe, unchanged.
  • Bar replay it once to confirm the entries appear when they claim to.

If the edge survives all seven, it’s worth forward testing. If it dies at step one, you found out cheaply. Most die at step one.

Related questions