Methodology and limitations

How TestingView simulates a trade, and where a backtest stops being evidence

A backtest is only as honest as its rules. This page states ours: where the data comes from, when a simulated trade opens and closes, how risk and costs are counted, how the statistics are defined, and what TestingView does not model.

Last reviewed 26 October 2026.

The data

TestingView uses the candles TradingView provides for your account, symbol, and timeframe. It adds no data of its own. Available history, intraday timeframes, and tick data follow your TradingView plan and the symbol. If your plan does not include a lower timeframe, TestingView may move the chart to one it does include, such as daily. The journal is valid for the resolution you actually played.

Tick and second playback use the ticks TradingView recorded. Where ticks are missing, playback jumps to the next stored tick. A jump is a hole in the data, not a smooth price you could have traded.

Keeping the future hidden

  • The session starts in the past and TestingView blocks navigation beyond the latest available candle.
  • Prevent Candle Previews steps back to a completed candle and plays forward when you change timeframes, so an unfinished higher-timeframe bar is not shown. It may be off in a new session; turn it on for multi-timeframe tests.
  • Go to Time is blocked while a position is open, and so are steps large enough to skip a stop or a target.
  • An unexpected backward jump makes TestingView leave or reload the session instead of saving state it no longer trusts. An unexpectedly large forward jump triggers a warning.
  • ChronoShuffle can start the session on a random date inside a range you choose.

When a simulated trade opens

  • You draw a TradingView Long Position or Short Position tool with an entry, a stop, a target, and a quantity.
  • When playback reaches the entry price, the drawing becomes a tracked trade, filled at the entry price.
  • If price gaps through the entry between candles, the trade opens at the new candle’s open instead. TestingView does not invent a fill at a price the replay never printed.
  • A drawing without a quantity is refused with a warning.
  • With Confirm Entries on, you accept or reject the trade at the moment it would open.

How it is managed and closed

  • After the fill, the drawing is replaced by managed entry, stop, target, and break-even lines.
  • The trade closes when price reaches the stop or the target, or when you close it from the journal.
  • You can move the stop and the target while the trade is open. Each must stay on the valid side of the current price and cannot cross an active break-even level.
  • Automatic break-even (Explorer and Trader) moves the stop to entry when price reaches the level you set.
  • On Trader, with the session setting on, you can change the quantity after entry; risk and profit are recalculated.

When one candle is not enough

If a candle’s range touches both the stop and the target, a candle alone cannot prove which one printed first. TestingView does not assume the friendly order. With a trade open, use the smallest playback step the chart can honestly play; large steps that could skip an exit are blocked.

Risk, size, and currency

Risk is calculated from the entry price, the stop price, the quantity, the contract size, the point value, and the currency conversion captured at entry. You set risk as a fixed amount or a percent of the session balance on the position tool, and TestingView normalizes the quantity for the symbol. The conversion rate is stored at entry, so later moves in the conversion pair do not rewrite a closed trade. Risk, profit, equity, and statistics are shown in the session currency.

Trading costs

Fills are not shifted by spread or slippage. Costs are applied in the statistics instead. On the Trader plan, a trading-cost adjustment deducts a percentage of the starting capital, spread across all closed trades in proportion to their size. Every metric and chart reflects that adjustment. Use it for spread, commission, slippage, and any swaps or funding your trades would have paid. On Starter and Explorer, results are gross.

Statistics definitions

Advanced statistics, including Sharpe ratio, forecast, and results by hour and weekday, are on Explorer and Trader.
StatisticHow TestingView computes itHow to read it
Win rateWinning trades ÷ (winning + losing trades)Trades that close within 0.1R of zero count as break-even and are left out of win rate, profit factor, and average RR.
Average RR (realized)Average winning trade ÷ average losing tradeThe payoff you collected, not the ratio you drew. The planned RR is stored on each trade in the journal and updates when you move the stop or the target.
ExpectancyNet profit ÷ number of closed tradesShown in the session currency, after the trading-cost adjustment when it is set. Equivalent to (win rate × average win) − (loss rate × average loss).
Profit factorGross profit ÷ gross lossAbove 1.0 the closed trades made more than they lost.
Maximum drawdownLargest peak-to-trough drop of cumulative results, including each trade’s worst open loss before it closedShown in percent and in the session currency. Per trade, drawdown is the worst open loss that position reached.
Run-upBest open profit a trade reached before it closedLarge run-up with a small final profit points at trade management, not at entries.
Sharpe ratio (TestingView)Average trade result ÷ standard deviation of trade resultsPer trade, not annualized, and without a risk-free rate. Compare it within your own journal, not with fund figures.
StreaksLongest runs of consecutive wins, losses, and break-even tradesThe losing streak is the one to size for.

A forecast extends the record you already have; it does not predict prices. For worked examples, read which numbers matter.

What TestingView does not model

  • Order-book depth, liquidity, partial fills, queue position, latency, and market impact. Fills come from candles, not from an exchange.
  • Swaps or rollover, perpetual-futures funding, dividends paid or received, margin requirements, and liquidation.
  • Futures rolls. A continuous contract is replayed as TradingView draws it.
  • Automated entries. TestingView never takes a trade for you; chart-event stops only pause playback.
  • Live trading. The journal holds simulated trades only; it is not a broker statement.

How to read a result

Backtest results are hypothetical. They describe how your rules behaved on past prices, with the costs you included and the decisions you made with the future hidden. They do not predict future returns and are not trading advice.

  • Read expectancy and maximum drawdown before win rate.
  • Check the sample: enough trades, a losing streak, and more than one market condition.
  • Freeze the rules, then test a date range you did not use while building them.
  • Forward-test on unseen price before you increase size.