Home/Trading Guides/TradingView Bar Replay backtesting
TradingView Tutorials

How to Backtest a Strategy on TradingView Using Bar Replay

Quick answer

  • Bar Replay hides future candles so you can trade the past one bar at a time — the fastest way to test a discretionary strategy.
  • On TradingView's free plan, Bar Replay works on daily and higher timeframes; replaying intraday charts needs a paid plan, and the depth of intraday history grows with the plan.
  • To reach older intraday data, pick the replay start on a higher timeframe, then switch down.
  • Log at least 50–100 trades and judge the strategy on expectancy after costs, not on win rate alone.

Most traders skip testing and go straight to live money. Bar Replay fixes that: it hides every candle after a date you choose and lets you play the market forward one bar at a time, exactly as if it were live. Done properly, a few evenings of replay can tell you more about a strategy than a month of live trading.

What Bar Replay can and can't do

Bar Replay is for manual (discretionary) backtesting — you make the decisions and record the results. It's ideal for support and resistance strategies, price-action setups and indicator-based rules that aren't fully coded. For fully rule-based systems, a coded Pine Script strategy with the Strategy Tester is faster; for discretionary trading, replay is closer to reality.

Free vs paid plan limits

  • Free (Basic) plan: Bar Replay works on daily, weekly and monthly charts.
  • Paid plans: unlock intraday replay (1-minute, 5-minute, 15-minute and so on). How far back you can go on intraday charts depends on the plan and the timeframe — the higher the plan and the timeframe, the more history.
  • Tip from TradingView's own help centre: to reach older intraday bars, choose the replay starting point on a higher timeframe (for example daily), then switch to the lower timeframe.

Limits change from time to time, so check TradingView's help article "How much data is available for Bar Replay?" for the current numbers.

Step-by-step: replaying a Nifty intraday session

  1. Open NSE:NIFTY on a 15-minute chart and add your tools (for example Elephant Edge V3).
  2. Click Replay in the top toolbar (the rewind-style icon).
  3. Choose Select date and pick a session a few weeks back. Everything after that point disappears.
  4. Mark your levels before pressing play: previous day high/low/close and your zones.
  5. Switch to the 5-minute chart and press Forward (Shift+→) bar by bar, or press play at a slow speed.
  6. When a setup appears, decide entry, stop and target before revealing the next bar. Use the long/short position tool to record it.
  7. Play forward until the stop or target is hit. Log the result. Move to the next day.
Discipline matters more than speed. Never peek ahead, and never skip a valid setup because "it looks like it will fail" — that's hindsight bias, and it makes backtests look better than reality.

A simple backtest journal

DateSetupDirectionEntryStopExitR multipleNotes
12-OctBreakout-retest of PDHLong25,22825,17025,315+1.5RTrend day
13-OctRejection at resistance zoneShort25,19025,23525,235−1RBroke on news

Record results in R (multiples of your risk). That way, results are comparable regardless of lot size or stop width. (The rows above are illustrative.)

The metrics that matter

  • Win rate — % of trades that hit target.
  • Average win and average loss in R.
  • Expectancy = (win rate × average win) − (loss rate × average loss). Above zero after costs = an edge.
  • Max drawdown — the worst losing streak in R. Ask honestly whether you could keep trading through it.
Example: 45% win rate, average win 1.8R, average loss 1R → expectancy = 0.45 × 1.8 − 0.55 × 1 = +0.26R per trade. Over 100 trades, about +26R before costs.

Testing on option charts

You can replay CE/PE option symbols too, but individual option contracts only exist for a few weeks and their intraday history is short. A practical approach: backtest your entry logic on the Nifty chart, then check a sample of trades on the matching option charts to see how premiums actually behaved — including time decay. See S&R on option charts.

Five backtesting traps

  • Testing only trending months.
  • Ignoring brokerage, taxes and slippage.
  • Changing rules mid-test.
  • Too few trades.
  • Assuming replay fills match live fills during fast moves.

Frequently asked questions

Is TradingView Bar Replay free?

Yes for daily, weekly and monthly charts. Replaying intraday timeframes such as 5-minute or 15-minute requires a paid TradingView plan, and higher plans can replay more intraday history.

How far back can I replay 5-minute Nifty charts?

It depends on your TradingView plan and the symbol's stored data. Higher plans and higher timeframes give more history. TradingView's help centre lists the current limits for each plan.

Can I use an invite-only indicator in Bar Replay?

Yes. Indicators on the chart, including invite-only scripts like Elephant Edge V3, recalculate as each bar is revealed, so you see them as you would have in real time.

How many trades do I need for a reliable backtest?

Aim for at least 50, ideally 100 or more, across different market conditions (trending, ranging, high and low volatility). Fewer trades can look great purely by luck.

What is a good win rate for intraday trading?

There's no universal number. A 40% win rate can be very profitable if winners are 2–3 times larger than losers, while a 70% win rate can lose money if losses are large. Expectancy is the number that matters.

Is TradingView Bar Replay free?

Partly. On the free (Basic) plan, Bar Replay works on daily, weekly and monthly charts. Intraday replay (1-minute, 5-minute, 15-minute and so on) needs a paid TradingView plan.

Can I use Bar Replay with invite-only indicators?

Yes. Indicators on your chart, including invite-only scripts such as Elephant Edge V3, recalculate bar by bar during replay, so you can study how levels behaved in past sessions.

See live S&R zones on your own chart

Elephant Edge V3 plots support & resistance zones automatically on Nifty, stocks and CE/PE option charts in TradingView — so you spend less time drawing lines and more time following your plan. Try it for 2 days for ₹500.

Risk disclosure. TWD Elite (Trade With Discipline) is not registered with SEBI as an Investment Adviser or Research Analyst. Everything on this page is for education only and is not a recommendation to buy or sell any security or derivative. Trading in equity, futures and options involves substantial risk; SEBI’s own studies show most individual F&O traders lose money. Examples use illustrative numbers, not live prices. Consult a SEBI-registered adviser before trading.