Tradelyze

Guide

TradingView backtest accuracy

Last reviewed: 15 September 2026·Tradelyze

TradingView backtest accuracy is how closely the Strategy Tester's simulated trades match the fills you could actually have gotten. The Strategy Tester replays your Pine Script rules faithfully on chart bars, but by default it guesses how price moved inside each bar. Comparing a second backtest's trades with yours, one by one, shows where those guesses change the result.

In plain English

Your TradingView report is one computer's account of what your strategy would have done in the past. Tradelyze runs the same script again and lines the two trade lists up side by side. If nearly every trade lines up, both are testing the same strategy. If many do not, a setting or the data differs, and every later result describes a different strategy.

New to this? Start with exporting TradingView trades and price data.

What do Match Rate, Matched, TV Only and BT Only mean?

Match Rate is the share of trades that Tradelyze's re-run and your TradingView export agree on. The re-run is Tradelyze backtesting your Pine Script a second time, on the price file you uploaded. Match Rate is the large percentage on the Conversion Result card. A higher figure means the two backtests are more likely to be testing the same strategy.

Tradelyze counts two trades as a match when both go the same direction and their entry times are within five minutes of each other. TradingView times are read on the chart timezone you chose. Trades from before the other side's first trade are set aside as warmup, the stretch where indicators were still collecting bars. TradingView trades that entered after your price file ends are left out, because the re-run had no bars for them.

Match Rate = Matched / the larger of (re-run trades in the comparable window, TradingView trades in the comparable window)
What each label on the Conversion Result card counts
LabelWhat it counts
Match RateMatched divided by the larger of the two in-window trade counts, as a percentage. Colored green, amber or red.
MatchedPairs of trades with the same direction and entries within five minutes of each other.
TV OnlyTradingView trades inside the comparable window with no matching re-run trade: trades your TradingView report took that the re-run did not.
BT OnlyRe-run (backtest) trades with no matching TradingView trade, including re-run trades from before TradingView's first exported trade.
TV TradesEvery trade in your TradingView export, including trades set aside as warmup or after the price data ends.
BT TradesEvery trade the re-run backtest took.
Match TypeThe per-trade label in the Trade Details table: MATCHED, BT ONLY or TV ONLY.
… before warmup alignmentA small line under Match Rate, shown only when the figures differ: the same match with every re-run trade counted, early ones included.

TV Trades includes trades that Match Rate sets aside, so Matched plus TV Only does not always add up to TV Trades. At a 100% match the card drops the counts and shows the line "Every backtest trade matched TradingView".

Worked example of a Conversion Result card. Constructed illustration, not measured data
LabelShowsHow it is reached
TV Trades130All exported trades; the last 4 entered after the price file ends.
BT Trades128All re-run trades; the first 6 came before TradingView's first exported trade.
Matched118Same direction, entries within five minutes.
TV Only8126 TradingView trades in the window, minus 118 matched.
BT Only10122 re-run trades in the window minus 118 matched, plus the 6 early trades.
Match Rate93.7%118 / 126, the larger in-window count.
Before warmup alignment92.2%118 / 128, counting every re-run trade.

In that constructed example, 93.7% shows green. Yet 8 TradingView trades never happened in the re-run, and 4 re-run trades inside the window have no TradingView partner. Open Review comparison, or the Trade Details table on the Conversion Result card. Look for a pattern in those trades: the same session hour, the same exit type, or the start of the file.

What match rate is good enough?

No published standard says what match rate is good enough. Tradelyze's colors for Match Rate are a display choice: green at 90% or more, amber at 80% or more, and red when lower.

How Tradelyze colors Match Rate, and a reasonable reading of each color
ColorMatch RateReasonable readingSource
Green90% or moreThe two backtests mostly agree; still check what the unmatched trades were.No primary source; a Tradelyze display choice.
Amber80% to under 90%A setting or data difference is likely; find it before optimizing.No primary source; a Tradelyze display choice.
RedUnder 80%The re-run is probably not the strategy you tested; check the chart timezone, script defaults and price file first.No primary source; a Tradelyze display choice.

The colors are separate from the decision to halt a run, which uses the required match stated on the Optimization stopped card. They are also separate from Tradelyze's below-target email, which any match under 100% can trigger. The number of trades matters as much as the color. A green 90% of 40 trades leaves 4 unexplained trades, while 90% of 2,000 trades leaves 200.

What the unmatched trades were matters most. Suppose the TV Only trades include the biggest winners or the worst losing days. The re-run's profit and drawdown can then differ sharply from TradingView's, even with a green figure.

Why don't my trades match TradingView?

Trades usually fail to match TradingView because of a setting or the data, not because either backtest is broken. Check these causes roughly in the order they are quickest to rule out:

  1. Chart timezone. Tradelyze's upload form asks for "The zone shown in your TradingView chart's bottom-right corner", because both uploaded files are stamped in that zone. In one internal Tradelyze test, a 1,275-trade export measured 100.00% on its chart timezone (India Standard Time) and 16.24% read as UTC. The backtest had reproduced it trade for trade; only the clock differed. That was a single test, not a general accuracy rate. The separate Exchange Timezone field sets where trading days start for prop-firm rules. The export guide's timezone section shows which zone to choose.
  2. Indicator warmup. Indicators need a run of bars before they give values; a 200-bar moving average has nothing to say on bar 50. If your price file starts at a different point from TradingView's chart history, the two backtests start trading at different times. Tradelyze sets those early trades aside from Match Rate, and TV Comparable From marks where the comparison becomes fair.
  3. Properties or Inputs changed only in TradingView. Tradelyze takes initial capital, commission, slippage, order size, pyramiding and input values from the script itself. They come from the strategy() header and the input() defaults. Did you change them in TradingView's Properties or Inputs tab? Then the upload form tells you to "update the defaults in your script to match and upload it again." TradingView strategy properties explains what commission, slippage and pyramiding each change. The export guide explains why script defaults must match what you ran.
  4. Price data for a different range or timeframe. The price file must be for the same instrument and timeframe as the chart you exported from. TradingView trades after the file's last bar are left out of Match Rate. If the two files cover separate dates, no trade can match.
  5. Extra timeframe files for request.security(). When a script reads another timeframe, the upload form asks for a price file for that timeframe as well. Tradelyze has not yet confirmed that extra-timeframe data is applied correctly in every case. With a multi-timeframe script and a low match, check this early: compare trades around the higher timeframe's bar changes.
  6. Fill settings. Bar Magnifier, process_orders_on_close and similar settings change which bar and price an order fills at. A setting that exists only in TradingView's Properties window is not in the script you upload.

Fill settings cause the most disagreement when a stop and a target both sit inside one bar. A chart bar records only four prices, its open, high, low and close. Those four prices cannot show which level price reached first.

One price bar, two possible paths: stop hit first or target hit first Constructed illustration, not measured data. Two panels show the same price bar for a long trade entered at 1,000, with a stop at 980 and a target at 1,030. The bar opens at 990, has a low of 975 and a high of 1,035, and closes at 1,020. Panel A follows the path open, low, high, close: price falls through the stop at 980 before it reaches the target, so the trade closes with a 20-point loss. This is the order TradingView's broker emulator assumes when a bar opens nearer its low than its high, as this bar does. Panel B follows the path open, high, low, close with the same four prices: price reaches the target at 1,030 first, so the trade closes with a 30-point gain. The bar's open, high, low and close alone cannot show which path really happened. A. Open → low → high → close What TradingView assumes: this bar opens nearer its low Target 1,030 Entry 1,000 Stop 980 H 1,035 L 975 O 990 C 1,020 O L H C time inside the bar → Stop hit first: −20 points B. Open → high → low → close Just as possible with the same four prices Target 1,030 Entry 1,000 Stop 980 H 1,035 L 975 O 990 C 1,020 O H L C time inside the bar → Target hit first: +30 points
Constructed illustration, not measured data. The same bar, with the same open, high, low and close, can turn a long trade into a 20-point loss (path A) or a 30-point win (path B). TradingView assumes path A for a bar that opens nearer its low; Bar Magnifier uses lower-timeframe prices to decide instead.

After fixing a cause, submit the strategy again so Baseline Matching measures the corrected setup. What to fix first when trades do not match walks through a timezone example step by step.

Why does Tradelyze re-run my backtest before optimizing?

Tradelyze re-runs your backtest first because every later result is useful only if it tests the strategy you tested on TradingView. Backtest trade matching is how that is checked: the re-run's trades are compared with your TradingView export, trade by trade. The first stage of every run is Baseline Matching, which the app describes as "Checking the converted strategy against your TradingView trades".

At Baseline Matching, Tradelyze backtests your Pine Script once on the price file you uploaded. It uses the script's own strategy() and input() defaults. The backtest runs on Tradelyze's own Pine Script backtester, and no AI rewrites your script. The app still calls this re-run the "converted strategy". Its trade list is lined up against the trade list you exported from TradingView's Strategy Tester. The guide to exporting TradingView trades and price data covers both files.

If the match is lower than the figure Tradelyze requires, the run stops before optimizing anything. An amber card titled Optimization stopped shows the measured match and three counts: Matched, Backtest trades and TradingView trades. It also names the clock the trades were compared on. The explanation on that card normally states the percentage required. Two buttons follow: Continue anyway and Review comparison.

What happens if I click Continue anyway?

Continue anyway lets a run that stopped at Baseline Matching go on to optimize Tradelyze's re-run of your strategy as it is. The Optimization stopped card states the consequence: "Every number the run reports will describe that build, not the one your TradingView export came from."

Clicking Continue anyway opens the optimization dialog. The run you submit from it skips the match check and nothing else. Optimization, walk-forward analysis, robustness scoring and prop-firm evaluation then all run on the re-run build.

Continue anyway is reasonable once Review comparison shows the unmatched trades are explained and minor. An example is a handful of trades at the very start of the file while indicators warm up. It is a poor choice when the cause changes the trades themselves. Examples are a wrong chart timezone, Properties or Inputs changed only in TradingView, or a price file covering different dates. Fix those and submit again, because they change the trades the whole analysis is built on.

How does a low match change the rest of my results?

A low match means the rest of your Tradelyze results describe the re-run build. That build trades differently from the strategy in your TradingView report, and every later card inherits the difference:

A concrete case: the TV Only trades include the days with the largest losses. A Qualifies badge can then describe a build that never took those losing days. The daily loss rule it passed is not the one your TradingView strategy would face. Fix the cause of the mismatch, submit again, and judge the results only once the match is explained. Low trade counts weaken every one of these checks too, as overfitting and sample size explains.

What does TV Comparable From mean?

TV Comparable From is the first timestamp from which Tradelyze's figures can be compared with TradingView's own figures for the same strategy. Before that time, both backtests are still filling their indicators' lookback bars. They will disagree for reasons that have nothing to do with the strategy.

Tradelyze shows TV Comparable From on the Best Metrics card and as a column in the Top Trials table. When you set a Tradelyze result beside your TradingView report, compare them from that timestamp onward, not from the first bar of the file.

Where this appears in Tradelyze

In a Tradelyze report, trade matching is the Match Rate, Matched, TV Only and BT Only figures on the Conversion Result card. When a low match halts a run, the same card opens under Review comparison on the Optimization stopped card. Tradelyze re-runs an uploaded TradingView Pine Script strategy from your exported trade list and price data. It then runs parameter optimization, walk-forward analysis, a five-check robustness score and prop-firm rule checks. It does not place trades, give financial advice or guarantee a challenge pass, and it is in beta.

To judge the whole report, not one tile, use the pre-trade checklist. If a low match stopped your run, start with what to fix first. Common product questions are collected in the Learn FAQ.

Create an account

Already a user? Open your strategies.

Is TradingView backtesting accurate?

TradingView backtesting accurately simulates your Pine Script rules on the chart's bars. It is not a record of fills you could have gotten. The Strategy Tester uses a broker emulator, the part that plays the role of your broker. TradingView's Pine Script documentation on strategies says the emulator fills orders "using only the available chart data by default."

So "accurate" breaks into four separate questions:

Trade matching answers only the last question. A low match is often the first sign that one of the other three has a problem.

TradingView's documentation also separates backtesting from live conditions. In forward testing, it says, trading costs, slippage and liquidity can meaningfully change performance. This matters for your money: a live account or a prop-firm challenge fee gets sized from the Strategy Tester's numbers. If a re-run cannot reproduce the trades, those numbers rest on details you may not have chosen on purpose.

How does TradingView's Strategy Tester decide when orders fill?

TradingView's Strategy Tester fills orders on historical bars by following a set of stated default assumptions. TradingView's Pine Script documentation on strategies sets them out:

Worked example: one bar, two possible trades

Constructed illustration, not measured data. A long trade on a 1-hour chart has a stop 20 points under the entry and a target 30 points over it. The next bar opens near its low, touches both the stop and the target, and closes higher. TradingView assumes open → low → high → close, so the stop is hit first and the trade books a 20-point loss. If price really reached the target first, the same bar was a 30-point winner.

Strategies with tight stops and targets that often fit inside a single bar depend most on this assumption. They are also where two backtests of the same script most often disagree. A small difference in how a bar is read flips the trade's result.

process_orders_on_close matters for trade matching too. It moves fills for orders placed at a bar's close one bar earlier, from the next open to that same close. TradingView's documentation says the "Order execution delay" setting in the Properties tab overrides it. The "Limit order execution" setting overrides backtest_fill_limits_assumption in the same way. Changed only in Properties, either setting is missing from the script you upload. Entries can then shift by a bar and fall outside Tradelyze's five-minute matching window.

Going deeper

The sections below go deeper: how Bar Magnifier and Deep Backtesting change a TradingView report, and how repainting can flatter a backtest. You can skip them and still read your own report.

What does Bar Magnifier change, and who can use it?

Bar Magnifier is a TradingView setting that looks at smaller bars inside each chart bar to decide which price was hit first. Without it, the Strategy Tester follows the fixed rule in TradingView's Pine Script documentation: price reaches whichever of the high or low is nearer the open first. TradingView's Help Center article on bar magnifier backtesting mode says the setting makes results "more similar to what would happen during forward testing" over the same period.

Bar Magnifier is not on every TradingView plan. TradingView's Pine Script documentation limits this extra intrabar detail to Premium and Ultimate plan users. TradingView changes its plans from time to time, so confirm on TradingView's own pricing page.

The setting goes by two names. TradingView's Help Center calls it Bar Magnifier and says it is toggled in the strategy's Settings/Properties window. The Pine Script documentation calls it Bar detalization, with a "High" option in the Properties tab and at the top of the strategy report. A script can switch it on by default with use_bar_magnifier = true in its strategy() declaration.

The lower timeframe Bar Magnifier looks inside with, for minute, hour, day and week charts (TradingView's full table also lists tick and seconds charts)
Chart timeframeBars used inside each chart barSource
1 minute10-second barsTradingView Help Center, What is bar magnifier backtesting mode
5 minutes30-second barsTradingView Help Center, What is bar magnifier backtesting mode
10 minutes1-minute barsTradingView Help Center, What is bar magnifier backtesting mode
15 minutes2-minute barsTradingView Help Center, What is bar magnifier backtesting mode
30 minutes5-minute barsTradingView Help Center, What is bar magnifier backtesting mode
1 hour10-minute barsTradingView Help Center, What is bar magnifier backtesting mode
4 hours30-minute barsTradingView Help Center, What is bar magnifier backtesting mode
1 day60-minute barsTradingView Help Center, What is bar magnifier backtesting mode
3 days240-minute barsTradingView Help Center, What is bar magnifier backtesting mode
1 week1-day barsTradingView Help Center, What is bar magnifier backtesting mode

Bar Magnifier has a ceiling on long histories. TradingView's Help Center says a strategy cannot request more than 200,000 lower-timeframe bars. The Pine Script documentation adds that bars without intrabar data fall back to the default assumed path. Worked example (constructed arithmetic, not measured data): on a 5-minute chart each bar holds ten 30-second bars. That allows about 200,000 ÷ 10 = 20,000 of the most recent chart bars to be magnified. With 40,000 bars loaded, roughly the older half still uses the assumed path.

Bar Magnifier matters most when a strategy's stop and target often sit inside the range of a single chart bar. A strategy whose stop and target are usually many bars apart rarely meets a bar where the order of the high and low decides the trade. Before paying for a plan to get Bar Magnifier, check how often one bar in your trade list touched both the stop and the target.

For trade matching, the practical point is where the setting lives. Tradelyze builds its run from the script's own strategy() and input() defaults, not from TradingView's Properties window. A setting you switched on only in that window, Bar Magnifier included, is not part of the file you upload. Tradelyze has not confirmed whether its re-run applies use_bar_magnifier = true from a script header, so treat trades on wide bars as the likeliest mismatches either way.

What is Deep Backtesting, and is there a trade limit?

Deep Backtesting is a TradingView Strategy Tester mode that tests a chosen date range on all the history TradingView holds for a symbol, not only the bars loaded on the chart. TradingView's Help Center article How Deep Backtesting works says it starts when you open a strategy and select a time range, marked by a pink icon. Clicking Reset to chart session stops it.

For trade matching, a trimmed report means an exported trade list that can begin later than your price file. Tradelyze's re-run then takes trades before TradingView's first exported trade. Tradelyze leaves those early trades out of Match Rate, so they do not count against the match. They still appear in the BT Only count. The cleanest fix is to export a date range that covers the same period as the price data you upload. For a strategy with more than 9,000 trades, that usually means exporting from Deep Backtesting, the mode that keeps every trade.

Can repainting or request.security lookahead make a backtest look better than it is?

Yes: repainting is when a Pine Script calculates differently on historical bars than it would have in real time. The dangerous kind in a backtest is a future leak, such as request.security() with lookahead on and no one-bar offset, which TradingView's documentation says returns "data from the future on historical bars." Tradelyze does not check scripts for repainting, so a high Match Rate shows only that two backtests agree on the same historical bars. Pine Script repainting and look-ahead bias explains how to test your script and write a non-repainting request.

Stage 1 · step 3 of 18. Next in the learning path: How to read a Tradelyze report

Frequently asked questions about TradingView backtest accuracy

Is TradingView backtesting accurate?

TradingView backtesting accurately simulates your Pine Script rules on chart bars, but by default it fills orders using chart data alone and assumes how price moved inside each bar. Results also depend on Properties and Inputs settings and on whether the script leaks future data. TradingView's documentation says trading costs, slippage and liquidity can meaningfully affect live performance, so treat a Strategy Tester report as a careful estimate rather than a record of fills.

Why don't my backtest trades match TradingView?

Mismatched trades usually come from settings or data rather than a broken backtest. Check the chart timezone first, then whether Properties or Inputs were changed in TradingView without updating the script defaults, and whether the price file covers the same instrument, timeframe and dates. Indicator warmup shifts early trades, scripts using request.security() need the right extra timeframe file, and fill settings such as Bar Magnifier change the prices orders fill at.

What do TV Only and BT Only mean?

TV Only counts TradingView trades inside the comparable window that have no matching trade in Tradelyze's re-run backtest. BT Only counts re-run trades with no matching TradingView trade, including re-run trades from before TradingView's first exported trade. Tradelyze treats two trades as a match when they go the same direction and their entries are within five minutes of each other on the chart timezone you chose.

What is a good backtest match rate?

No published standard defines a good match rate. Tradelyze colors Match Rate green at 90% or more, amber at 80% or more and red when lower, which is a display choice with no primary source. Trade count matters too: 90% of 40 trades leaves 4 unexplained trades, while 90% of 2,000 trades leaves 200. Check what the unmatched trades were before trusting any later result.

Why did I get a below-target email when my Match Rate is green?

Tradelyze's below-target email and the green color use different cut-offs. When optimization does not start automatically, any match under 100% sends the email, which reads "below your 100% target". The Match Rate figure turns green at 90% or more. A green 95% therefore still sends the email. Open the Conversion Result card and read the unmatched trades under TV Only and BT Only to see why they differ.

Does Bar Magnifier make TradingView backtests more realistic?

Bar Magnifier fills historical orders using lower-timeframe prices instead of an assumed path inside each chart bar. TradingView's Help Center says this makes the broker emulator behave more like forward testing over the same period. TradingView's Pine Script documentation limits this extra detail to Premium and Ultimate plan users, and very long histories can leave the first trades unaffected.

What is TradingView's Deep Backtesting trade limit?

TradingView's Pine Script documentation says a regular test keeps individual data, including downloaded CSV files, for only the latest 9,000 trades. Deep Backtesting, which starts when you pick a testing period, keeps every trade. TradingView's Help Center caps Deep Backtesting at two million bars and one million trades. A trimmed trade list can start later than your price data, so export a range that matches the price file you upload.

Can repainting make a Pine Script backtest look better than it is?

Yes. Repainting means a script calculates differently on historical bars than it would in real time. TradingView's documentation warns that request.security() with lookahead on and no one-bar offset returns future data on historical bars, which can make entries look perfectly timed. TradingView also says a strategy whose realtime and historical executions differ produces backtest results that are not representative of its realtime behavior.

Does Tradelyze detect repainting?

No. Tradelyze does not check Pine Script for repainting or for future leaks from request.security() lookahead. A high Match Rate only shows that two backtests agree on historical bars; a high match cannot show the strategy would have taken the same trades in real time. Review every request.security() call, and any use of calc_on_every_tick, before relying on a backtest from TradingView or from Tradelyze.

Why did my Tradelyze run stop at Baseline Matching?

A Tradelyze run stops at Baseline Matching when the re-run backtest reproduces less of your TradingView trade list than Tradelyze requires before optimizing. The Optimization stopped card shows the measured match, the Matched, Backtest trades and TradingView trades counts, and the clock the trades were compared on. Use Review comparison to find the unmatched trades, fix the cause and submit again, or choose Continue anyway.

What happens if I click Continue anyway?

Continue anyway optimizes Tradelyze's re-run of your strategy as it is, skipping only the match check. The Optimization stopped card warns that every number the run reports will describe that build, not the one your TradingView export came from. That includes Best Metrics, the walk-forward badge, the robustness score and each prop firm's verdict. Choose it only once you understand why the trades differ.

What does TV Comparable From mean?

TV Comparable From is the first timestamp from which Tradelyze's figures can be compared with TradingView's own figures for the same strategy. Before that time both backtests are still filling their indicators' lookback bars and will disagree for reasons that have nothing to do with the strategy. Tradelyze shows TV Comparable From on the Best Metrics card and in the Top Trials table.

Which timezone should I choose for my TradingView export?

Choose the chart timezone shown in the bottom-right corner of the TradingView chart you exported from, because the price file and the trade list are both stamped in that zone. In a single internal Tradelyze test, a 1,275-trade export matched 100.00% on its chart timezone and 16.24% when read as UTC. Exchange Timezone is a separate field that sets trading days for prop-firm rules.

Does a 100% match mean my strategy will make money?

No. A 100% match means Tradelyze's re-run took the same trades as your TradingView report, so both describe the same strategy. A perfect match says nothing about whether that strategy has a real edge, was overfitted to past prices, or survives costs and slippage in live trading. Optimization checks, walk-forward analysis, robustness scoring and forward testing exist to answer those questions.

Sources