How to backtest a crypto trading strategy with bar replay, step by step
Manual backtesting on real candles – without looking ahead and without fooling yourself.
Short answer
To backtest a crypto strategy with bar replay, write down your entry, stop and exit rules, pick a market and a past period, hide the future and step forward candle by candle, taking every trade your rules give you. Log each trade with its R and fees, collect at least 30 and better 100 trades from different market phases, then read expectancy, profit factor and drawdown. Backtests are hypothetical and do not predict future results, but they show whether a rule set had an edge at all.
The steps
- Define the rules. Entry trigger, stop, target or exit, maximum risk per trade. If a rule needs your judgement, write down how you will judge.
- Pick a market and a period. Choose the markets you actually trade. Mix trending and ranging months, and include at least one period you did not trade yourself.
- Set the timeframe. Use the timeframe of your live trading; switch to a higher one for context, not for entries.
- Hide the future. Start at a random date and only see candles up to the current replay time.
- Take every valid trade. Not just the ones that look good. Skipped trades are the most common reason backtests look better than live trading.
- Book the result honestly. Fill at the next candle, count the stop first if stop and target are hit in the same candle, and include fees and – for perpetuals – funding.
- Collect enough trades. At least 30, better 100, across different market phases.
- Read the numbers. Expectancy, profit factor, win rate, average R and maximum drawdown, each with its sample size.
A worked example with round numbers
Illustration, not a real result: a rule set produces 40 trades, 17 winners with an average of +2.1 R and 23 losers at −1 R. Win rate 42.5%. Expectancy = 0.425 × 2.1 − 0.575 × 1 ≈ +0.32 R per trade before costs; profit factor = (17 × 2.1) ÷ (23 × 1) ≈ 1.55. With fees of about 0.05 R per trade the expectancy falls to about +0.27 R. Forty trades are still a small sample, so the next step is more trades in other market phases – not a bigger position. The expectancy calculator does this arithmetic for you.
Common mistakes
- Look-ahead: scrolling forward “just to see”, or drawing levels with information from later candles.
- Cherry-picking: testing only the periods where the setup is known to work.
- Ignoring costs: fees and funding turn many small edges negative.
- Moving the rules: changing the rules during the test and keeping the old trades.
- Too few trades: judging a setup on a dozen results.
Manual replay or automated backtest?
Manual replay trains your eye and tests rules that need judgement, but it is slow. Automated backtests run thousands of trades in seconds, but only for rules a computer can check exactly. Many traders use both: automated tests to filter ideas, replay to practise execution.
Doing it in Edgetrail
Replay runs on real candles from Bybit, Binance, OKX and Coinbase – 4,952 crypto markets as of 4 November 2026, from 1-minute to weekly candles. For Bitcoin, 1-minute history goes back to 20 July 2015 (BTC-USD on Coinbase). You draw a long or short position; Edgetrail fills it at the next candle, checks the stop first when stop and target sit in the same candle, resolves unclear candles with 1-minute data and books the trade with its R in the backtest journal of the system – with the same metrics as your live trades. Edgetrail costs $24 a month or $199 a year; the first 50 Founders pay $99 once, after that a Lifetime plan costs $249 once. The first 14 days are free without a credit card, and every payment comes with a 14-day money-back guarantee.
Updated:

Frequently asked questions
How many trades do I need for a backtest?
There is no fixed number, but results from fewer than 30 trades swing a lot. Aim for 100 trades across different market phases before trusting expectancy.
Should a crypto backtest include fees and funding?
Yes. Taker fees on entry and exit and funding on perpetuals can turn a small edge negative, so a backtest without them looks better than live trading.
Do backtests predict future results?
No. Backtests and replays are hypothetical. They show how a rule set behaved on past data, not how it will perform.
Keep reading
$24 a month · $199 a year · $99 once as a Founder (50 spots) · later $249 Lifetime. The first 14 days are free, no credit card.
All pricesReady to face your numbers?
Log your first trade in minutes. 14 days free, no credit card.
Try free for 14 days