Guides

How to Backtest a Trading Setup by Hand (Step by Step)

A practical method to backtest one trading setup manually on past charts: write the rules, scroll back, log every trade in R, read the results honestly and avoid the usual traps.

Or try it on your chart first, no account

Most traders take a setup live before they know if it has ever worked. A manual backtest fixes that. You take one setup, apply it to past charts candle by candle, and write down what would have happened. It costs no money, only an evening or two, and it tells you more about a setup than any number of videos about it.

This guide walks through a manual backtest from the first rule to the last line of the log, with a worked example and the mistakes that make most backtests useless.

Why backtest by hand at all

Software backtests are fast, but they need code and they only test what you can program. Many discretionary setups ("a pullback to support in an uptrend with a bullish close") are hard to code but easy to see. Backtesting by hand forces you to look at every trade, so you also learn what the setup looks like when it fails. That is the part you need most when you trade it live.

A manual backtest also trains your eye. After 50 replayed trades you recognise the setup faster and you stop forcing it on charts where it is not there.

Step 1: write the rules before you look

Write the setup as rules a stranger could follow. If a rule needs your judgment, make it more precise until it does not. A complete setup has five parts:

  • Market and timeframe: for example BTC/USD on the 4H chart.
  • Context: when the setup is allowed, for example "only when price is above the 50 period moving average and the last swing high was broken".
  • Trigger: the exact candle event that opens the trade, for example "a bullish candle that closes back above a support level after touching it".
  • Stop: where the idea is wrong, for example "below the low of the trigger candle" (see how to set a stop loss).
  • Exit: a fixed target in R, a level, or a rule such as "close at the next resistance". Pick one and keep it.

Write these on paper or in a note. Once you start scrolling, you cannot change them for this test. If you want to try a variation, that is a second test with its own log.

Step 2: pick a sample of past charts

Choose a period with different conditions: some trend, some range, some fast moves. A period where the market only went up will flatter every long setup. Aim for at least 30 trades; 50 or more is better. With fewer than 30, a few lucky trades can make a bad setup look good.

If your setup is rare on one market, add a second market with similar behaviour rather than loosening the rules.

Step 3: hide the future and move candle by candle

The biggest error in manual backtesting is seeing what comes next. On TradingView, the bar replay mode lets you pick a start date and reveal one candle at a time. Without replay, cover the right side of the chart with a window or a sheet of paper and move it one candle at a time.

At every new candle, ask only: do the context and trigger rules say "trade" right now? If yes, write the entry, the stop and the target before you reveal the next candle.

Step 4: log every trade in R

Measure each result in R, the amount risked. A trade that hits a stop is -1R. A trade that reaches a target twice as far as the stop is +2R. Working in R makes results comparable across markets and account sizes, and it is how you will size live trades later (see risk reward ratio explained).

For each trade, log at least:

  • date and time of the trigger candle
  • entry, stop and target prices
  • result in R (-1, +2, or the exact R if you exit by rule)
  • one line on conditions: trend, range, news candle, gap
  • a screenshot of the chart at entry

The screenshot matters. When you review the log, losing trades often share something you did not write as a rule. A trading journal uses the same fields, so your backtest and your live log can be compared line by line.

Step 5: read the results

When the sample is done, compute four numbers:

  • Win rate: winners divided by total trades.
  • Average win and average loss in R.
  • Expectancy: (win rate x average win) minus (loss rate x average loss). This is the average result per trade in R. The free expectancy calculator does this for you.
  • Worst losing streak: the longest run of losers in a row.

A positive expectancy means the rules made money on this sample. The losing streak tells you what you must be able to sit through live. If the worst streak was 7 losses and you risk 2 percent per trade, you need to accept a drawdown of about 14 percent without changing anything.

Worked example

Here is a made-up log to show the arithmetic, not a real result. Say you backtest "4H pullback to support in an uptrend, stop below the trigger low, target 2R" and log 40 trades. 15 reach the target (+2R each) and 25 hit the stop (-1R each).

  • Win rate: 15 / 40 = 37.5 percent.
  • Total: (15 x 2) - (25 x 1) = 30 - 25 = +5R.
  • Expectancy: 5R / 40 trades = +0.125R per trade.

The setup is slightly positive with a low win rate. That means long losing streaks are normal for it: a trader who gives up after 5 losses in a row would quit right before the winners. Now read the notes column. Suppose 12 of the 25 losers happened when price was in a range on the daily chart. Adding "the daily chart is trending" as a context rule is a new hypothesis: test it on fresh charts, not on the same 40 trades.

Common traps

  • Hindsight: you "knew" the candle would reverse because you saw it. Replay mode or a covered chart is not optional.
  • Changing rules mid-test: every change starts a new test. Otherwise you are fitting the rules to the past.
  • Too small a sample: 10 trades prove nothing. Keep going to 30 at least.
  • Ignoring costs: spreads, fees and slippage turn a small edge into zero. Subtract a fixed amount per trade in R if your stops are tight.
  • Only one market condition: a setup that only worked in a strong trend needs a rule that says when not to use it.

From backtest to live

A good backtest is a reason to try a setup small, not a promise. Trade it live with a small fixed risk for another 20 to 30 trades and log them the same way. If the live expectancy is close to the backtest, increase size slowly. If it is much worse, compare the two logs: usually the live trades break a rule the backtest did not.

A second opinion helps at the live stage. Before you enter, upload the chart to an AI chart tool and check whether it sees the same trend, the same support and a similar stop. If it disagrees, look again before you click. This is educational content, not financial advice.

FAQ

How many trades do I need for a backtest?

At least 30, ideally 50 or more, across different market conditions. Fewer trades let a short lucky run decide the result.

Is manual backtesting better than software backtesting?

Neither is better in general. Software is faster and exact for coded rules. Manual testing works for setups that are hard to code and trains your eye for the setup, including its failures.

What is a good win rate for a setup?

It depends on the reward. A 35 percent win rate with 2R targets is positive; a 60 percent win rate with 0.5R targets is negative. Look at expectancy, not win rate alone.

Can I backtest on a phone?

Yes, TradingView bar replay works in the app, but a larger screen makes it easier to keep the log and screenshots at the same time.

Does a positive backtest mean the setup will work live?

No. It means the rules worked on past data. Markets change, and live trading adds emotions and costs. Test it live with small risk first.

Check your next setup

Found a setup worth trying live? Upload the chart to ChartEdge AI and compare its trend, levels and stop with your own reading before you enter. 3 free analyses, no card required. Educational only, not financial advice.

Educational content only, not financial advice. Trading involves significant risk of loss. Examples use illustrative numbers, not real trades or results.

Try it on your chart now

No account needed. Upload a screenshot and see the bias and key levels in seconds.

Check your next setup on your own chart

Upload a screenshot and get the trend, key levels, entry, stop loss and targets in seconds.

Analyse my chart free

3 free analyses. No card required.

Related guides

Check your next setup on your own chart

Try free