Hide the future, then trade the past like it's live
To backtest a trading strategy without coding, use TradingView's bar replay. It hides the chart's future so you step forward one candle at a time. The hard part is honesty. Glance at the right edge once and the test stops meaning anything.
Why a manual backtest goes wrong before the first trade
A test without coding means replaying old price candle by candle and trading it by hand against fixed rules. It's slow, but it needs nothing beyond a charting account. It also trains your eye, because every decision gets made as if live.
The danger is hindsight. Scroll through a chart you've already seen and your eye knows where price went. You'll spot the setups that worked and skip the ones that failed, without meaning to.
The second leak is vague rules. If an entry reads 'buy at strong support', you'll decide what counts as strong after you see the result. Every judgment made after the fact flatters the test.
Bar replay fixes the first problem and a rule sheet fixes the second. You need both in place before the first candle moves.
Write a rule sheet that answers yes or no
Put the whole strategy on one page before you open the chart. Each rule should be something a stranger could check with a yes or a no.
Cover the entry trigger, where the stop goes and where the target goes. Add the size, the symbols, the timeframe and the hours you'll trade. Then list the trades you're forbidden to take, because those are the ones that tempt you mid-test.
Test each rule by imagining two people reading it on the same chart. 'Enter when a 15-minute candle closes above the prior day's high' gives one answer. 'Enter on a strong breakout' gives two people two answers.
Once the sheet is written, freeze it. If you change a rule halfway through, the trades before and after belong to different strategies. Start the count again from zero.
Write the costs you'll assume on the sheet as well. A commission figure and a slippage figure, fixed up front, can't be nudged later to rescue a weak result.
Hide the right edge and step one candle at a time
In TradingView, open the chart, press Replay and click a starting candle. Everything to the right disappears. Step forward one bar at a time, or let it play at a slow speed.
Pick the starting date before you look at the chart. A list of random dates written in advance works well. If you scroll around first to find a nice spot, you've already seen the answer.
Make each decision before you advance. When the rules say enter, write down the entry, stop and target, then step forward. Do the same for exits. Never step ahead to check and then jump back. Close anything else that leaks the future, like a news panel or a watchlist showing today's prices.
Spread the sample across several symbols and different months. Fifty trades from one calm stretch only tell you how the rules did in that stretch. Mix in a choppy month and a trending one if you can find them.
Why 50 trades is a floor, shown with arithmetic
Fifty trades sounds like plenty until you see how much each one moves the result. Each trade is 2 percent of the sample, so a single outlier can tilt the whole picture.
Say your rules risk 1R to make 2R. The breakeven win rate is 1 divided by 3, about 33 percent. Now suppose the replay gives 20 winners out of 50, a 40 percent win rate. Expectancy is 0.40 times 2R, minus 0.60 times 1R. That's 0.20R per trade.
Now flip three of those winners into losers. That leaves 17 winners, or 34 percent. Expectancy becomes 0.34 times 2R minus 0.66 times 1R, which is 0.02R. Three trades turned a decent edge into almost nothing.
So treat 50 as the point where the test starts to say something. If the result hangs on a handful of trades, keep replaying until it doesn't. A hundred trades halves the weight of each one.
Log each replay trade as if real money were on it
Use one row per trade in a spreadsheet. Record the date, symbol, entry, stop, target, exit and the result in R. Note the time of each entry too, in case the results cluster in one part of the session.
Add a column for whether you followed the rule sheet, yes or no. Be strict. A trade taken on a hunch goes in the log marked no, and it doesn't count toward the 50.
Replay fills you at the exact price you clicked, which live trading never does. So subtract a realistic cost from every trade before you total it. Commission plus a little slippage on each side is a fair start. If the edge disappears after that, the rules aren't worth trading yet.
When the 50 are done, write the win rate, average winner, average loser and expectancy at the top. Those four numbers are what you'll hold your live results against later. The gap between replay and real fills is its own lesson, and only live trades can show it.
Bar replay test, step by step
Ten steps. The first three happen away from the chart.
- Write every rule so it can be answered yes or no.
- List the trades the rules forbid.
- Write down random start dates and symbols before opening a chart.
- Open the chart, press Replay and select the start candle.
- Decide and record each entry before stepping forward.
- Step one candle at a time and never peek ahead.
- Log entry, stop, target, exit and result in R for every trade.
- Mark each trade as rule-followed or not, and drop the ones that weren't.
- Subtract commission and slippage from every result.
- Stop at 50 rule-followed trades, then work out win rate and expectancy.
Frequently asked questions
Write rules that each answer yes or no. Then use bar replay to trade old charts candle by candle with the future hidden. Log every trade, subtract costs and stop at a fixed count of at least 50.
TradingView decides which timeframes each plan can replay, and those limits change. Check its current plan comparison before you build a test around intraday charts.
It covers fewer trades and takes longer. It can test rules that are hard to code, though. Its weak points are hindsight and perfect fills, so hide the future and subtract costs.
Hold the replay numbers against TraderLog
When the rules go live, import your real fills from Schwab, IBKR or a CSV. The stats page shows win rate, average winner, average loser and expectancy on what actually filled. Try the free expectancy calculator first, then the 14-day trial, no card.
Every trading morning at 8:40 ET our model draws the SPY, QQQ and IWM zones it expects to matter, on a TradingView chart, before the open. Where price reaches one, it has turned 74 percent of the time. Free, no account. See today's map