Skip to content
TradingTune
Metrics, Risk, and Execution

Why a TradingView backtest does not match live trading?

TradingView backtests can differ from live trading because of simulated fills, changing data, timing, costs and alert settings.

On this page

Key takeaways

  • A simulated fill is an estimate, not a record of an actual transaction.
  • An open bar can produce a different calculation from the same bar after it closes.
  • Costs, chart data, order settings and alert versions all affect a fair comparison.
  • Compare individual events in time order before changing strategy inputs or other test assumptions.

Why can the results be different?

A TradingView backtest uses historical data and simulated orders, while live trading involves prices, order handling and costs that may differ from the test assumptions. The gap can begin before an order is considered, if the live calculation uses information that was different when the historical chart was rebuilt.

A backtest is a simulation of a strategy on past data, while a live record describes events as they happened, including orders that did not fill or filled at a different price. Neither record on its own explains which part of the process caused a mismatch, so start by finding the earliest event where they first diverge.

A different entry time calls for a different investigation from a matching entry followed by a different exit price, even if both discrepancies appear in the same summary. Comparing totals first can hide that distinction, especially when an early difference affects the positions and decisions that follow.

Keep a copy of the strategy, its inputs and its test settings beside the live event record, including timestamps and order details where available. The common backtesting mistakes guide provides context for reviewing assumptions without treating a historical report as a live account statement or a complete record of actual transactions.

Does a simulated fill represent a real order?

A fill is the completion of an order at a price and quantity, while a simulated fill is generated under the test’s rules rather than recorded from an actual transaction. An actual fill depends on what happens after an order reaches the market, including the price and quantity available at that time.

In its strategy documentation, checked on 2026-11-21, TradingView says its strategy report uses an emulator to calculate simulated trades. That distinction matters when a chart shows a trade at a price that an actual order did not receive, or shows a fill where no actual fill occurred.

A market order asks for execution rather than a specified price, while a limit order sets a price boundary for the transaction. A market touching a limit price does not prove that an actual order would have filled, because available quantity, other orders and arrival time can matter.

For a mismatch, compare the order type, creation time, requested quantity and recorded fill, including any order that was unfilled or only partly filled. A simulated trade marker is evidence of what the model recorded, not proof that the same transaction was available live under the same conditions.

If entry details match but the exit differs, trace the exit separately and check the type of order used. A stop order, which becomes active when a stated price is reached, can be affected by a price gap or fast movement after its trigger. Its trigger price and eventual fill are distinct events, so each needs its own place in the comparison.

Can costs explain a gap even when trades match?

Commission is a charge associated with a transaction, while slippage is the difference between an expected price and the price at which an order fills. Either can make records differ even when their entry and exit decisions occur at similar times and use the same order size.

The spread is the distance between the available buying and selling prices, and it can vary as market conditions change. A fixed cost assumption is therefore a simplified description rather than a complete record of every transaction, especially when prices move quickly or available quantities change.

Match the units before comparing costs, since a charge expressed per order, per unit or as a share of transaction value depends on the basis used. Check whether the live record includes a charge at entry, exit or both, and whether the test uses the same basis for those events.

Change an assumption in a copy of the test and record what changed, leaving the strategy rules and date range untouched for that comparison. This does not reveal the exact cost of a future order, but it shows how much the historical report depends on the selected assumption.

The guide to modeling slippage and commission covers the testing setup and explains the assumptions behind modeled costs. For individual discrepancies, retain actual order and fill records rather than expecting a single cost setting to explain every trade in the live record.

Why can an open bar behave differently after it closes?

A bar summarizes price activity over a chart period, and its latest price, high and low can change while that period is still open. A condition observed during the bar need not remain true at its close, so the timing of a calculation matters when comparing the historical and live records.

In its repainting documentation, checked on 2026-11-21, TradingView explains that historical bars do not record intermediate price movements. Repainting means that a script’s historical and live calculations or plots behave differently, but it does not mean that every changing value is an error.

Suppose a condition is met while a bar is forming and is no longer met when it closes. A record made during the open bar may show an event that is difficult to reconstruct from the closed bar alone, even though the live observation was genuine.

A difference can also arise if the live process observes a condition at a different moment from the historical calculation, or if the calculation uses a changing value. Record whether each decision was made during the bar or after confirmation, meaning after the bar closed, then inspect the strategy’s calculation settings and code.

Waiting for a confirmed value is a different rule from acting on a changing value, and the distinction belongs in the test notes for each version. If testing both approaches, keep separate copies and label them clearly, since changing the timing changes the strategy being evaluated.

Could data from another timeframe be involved?

A timeframe is the period represented by each chart bar, and a strategy can also use data from a different timeframe when making a calculation. That creates another clock to examine, because the chart period and the requested period can close at different times.

In its documentation on other timeframes and data, checked on 2026-11-21, TradingView says a data request can use a different symbol or timeframe. A requested value that is still developing may not match the value seen later after its period closes, so the time of observation matters.

For each input drawn from another context, note the symbol, timeframe and whether the rule uses a confirmed or developing value. Compare those details at the time of the live event, rather than relying only on what the chart displays after a reload or a later review.

Also check the session, meaning the hours included in the data, and any price adjustments applied to the chart. Different sessions or adjusted data can change the bars being compared even when the symbol appears familiar and the strategy inputs look identical in both records.

Lookahead is the use of information in a historical calculation before it would have been available at that point in time. If a script has access to future information in its historical test, the mismatch is not merely an execution issue, as the article on lookahead bias explains.

Does the chart type change the prices being tested?

A standard price bar summarizes market prices for its period, while a synthetic chart uses values constructed by a charting method rather than simply showing those prices. Synthetic values can be useful for viewing patterns, but they should not automatically be treated as a record of executable prices.

In its strategy documentation, checked on 2026-11-21, TradingView says that non-standard charts simulate trades using synthetic prices by default. A simulated fill at such a price can therefore differ from an actual transaction even before commissions or other costs are considered.

When investigating a mismatch, note the chart type and any setting that changes the prices used for simulated fills. Compare the timestamps and price source as well as the trade markers, since a marker alone does not show every assumption behind the recorded fill.

A test on standard bars can help isolate the effect of synthetic prices, but changing chart type can also change the strategy’s calculations and resulting decisions. Treat the resulting report as a separate test, not as a direct correction of the original historical record or proof of an actual fill.

Keep the original chart and settings available for review, so the source of each report remains clear when you compare them. If the entry condition depends on synthetic values, document that dependency separately from the price used to model the fill, since those are different questions.

Can an alert use an older version of the strategy?

An alert is a notification triggered by a defined event, and that event is distinct from an actual order or a later fill in a live record. Each stage has its own time and possible point of failure, so a notification alone does not establish what happened to an actual order.

In its alerts documentation, checked on 2026-11-21, TradingView says a running alert retains a saved copy of the script, inputs, symbol and timeframe. A later chart or input change therefore does not by itself establish that the running alert uses the same setup as the current test.

Compare the alert’s creation details with the strategy version and inputs used in the report, including the symbol and chart timeframe. If those records differ, preserve the old details and investigate the period when each setup was active before drawing a conclusion about the cause of the execution difference.

A timestamped event log can also separate a condition occurring from a notification being received, which helps locate the start of a discrepancy between the records. If an order follows a notification, compare its submission and fill records independently, including any rejection, cancellation or partial fill.

The time of a notification is not the same thing as the price at which a transaction is completed. Keeping those stages distinct makes it easier to identify whether the discrepancy began in the strategy calculation, the alert setup or the handling of the order.

What should you compare when the first trade differs?

Start at the earliest event that does not match, rather than at the largest difference in the summary of the test. An early position difference can change later entries or exits, so subsequent discrepancies may be consequences of that first difference rather than independent causes.

Create a record with the chart symbol, session, timeframe, strategy version, inputs and test period, keeping it beside the live event record. Note the live event time, order type, requested quantity, fill time, fill price and recorded charges, leaving unknown fields blank rather than filling them from the chart.

Compare the decision first by asking whether both records show the same condition at the same point in the bar. Next compare the order type and quantity, then compare the fill and charges, including whether the actual order was unfilled or only partly filled.

Time zones deserve their own check, because timestamps displayed in different zones can make matching events appear separated. A session difference is a separate issue, since it can mean the underlying chart bars genuinely differ rather than merely appearing at different times.

Write down the first unresolved difference and the evidence needed to investigate it, including any missing configuration or order record. If a historical report has been regenerated, retain the earlier record where possible, since revised data or changed settings can make a later view a poor substitute.

How can you compare assumptions without changing the strategy?

A parameter is an input value used by a strategy, such as a period used in a calculation, and a parameter sweep tests a set of input combinations. Comparing their reports requires a stated setup, so that a change in the chart or cost assumptions is not mistaken for an effect of the inputs.

Doing that work by hand means entering a combination, running the test and recording the inputs and report before repeating the process for another combination. When reviewing live differences, the notes also need the chart context, calculation settings and cost assumptions, or a changed result can have several possible causes.

TradingTune backtests input combinations and ranks the runs, while the trader defines the test and checks whether its assumptions fit the question being asked. The search panel helps with repeated input testing, but the report remains a simulation under the selected settings.

Keep execution assumptions separate from parameter changes when possible, so that each comparison has a clear purpose and a useful record. For example, compare a cost assumption with the strategy inputs held fixed, then document any later input sweep as a different experiment.

A sweep cannot establish that an actual order would have filled at a simulated price, even if the same inputs were used. It is a way to examine the strategy under the selected model, not a replacement for reviewing live event and fill records.

TradingTune for Chrome

Stop tuning your strategy's inputs by hand.

Add to Chrome, it's free

Free tier, no API keys. A free account is required to run. Not affiliated with TradingView, Inc.

What can a follow-up test establish?

A follow-up test can show whether a documented change affects the historical simulation, provided the comparison records what was held fixed and what was changed. It cannot recreate every market condition around an actual order, and it cannot prove that a later live transaction will match a simulated fill.

Use the same strategy version and inputs when checking a suspected data, timing or cost issue, and save the resulting comparison with its settings. If the strategy rules must change, label that as a new version rather than presenting the new report as the same test.

A held-out period is data kept apart from the period used to choose settings, so it can be examined separately from the original selection. Reviewing that period can help show whether an explanation depends heavily on data already examined, although the separate test still does not reproduce live execution.

The guide to in-sample and out-of-sample testing explains how the split works and why the separation matters when reviewing a strategy. Keep a note of which period served each purpose, especially if the test is revisited after the comparison.

Some gaps will remain unresolved when an event log, order record or original configuration is missing, and a later chart may not replace that evidence. Record the limit alongside the comparison instead of assigning the whole difference to slippage or repainting without support.

The aim is a traceable account of what was simulated, what happened live and where the records first stopped agreeing. That account gives the next test a clear starting point, rather than leaving an unexplained discrepancy hidden behind a change to the strategy inputs.

Sources

TradingTune for Chrome

Stop tuning your strategy's inputs by hand.

TradingTune runs systematic parameter searches on your own TradingView strategy, right inside the chart page. You keep the strategy, you read the results.

Free tier, no API keys. A free account is required to run. Not affiliated with TradingView, Inc.

Share this post