A backtest is supposed to answer one question: if you had traded this exact ICT strategy in the past, would it have made money after costs? Most traders never get a real answer, because the test they run is not the strategy they will trade. The rules were vague, the losing trades were skipped, or the settings were tuned until the equity curve looked good. This guide shows how to backtest an ICT strategy honestly, step by step, so the result is worth trusting with real capital.
The short version: write the strategy as fixed rules a stranger could follow, test it on at least 100 trades across different market conditions, include real trading costs, and then prove it on data you did not use to build it. Anything less is a story, not a test.
Key Takeaways
- An ICT concept is not a backtestable strategy until every rule, entry, stop, target and time window is written down in advance.
- A backtest on 20 or 30 trades proves almost nothing. Aim for 100 trades as a minimum and 200 or more before making a serious risk decision.
- Costs are part of the strategy. A setup that looks profitable before spread, commission and slippage often is not profitable after them.
- The honest test is the out-of-sample test: hold out part of your data, build on the rest, and only then see how the untouched part performs.
- A failed backtest is a good result. It costs you nothing and stops a losing strategy from reaching your live account.
Why most ICT backtests lie to their owner
ICT, or Inner Circle Trader, concepts describe how price moves around liquidity: sweeps of old highs and lows, shifts in market structure, order blocks and fair value gaps. The ideas are visual, and that is exactly where backtesting goes wrong. On a finished chart, every sweep and gap looks obvious. In real time, with the right side of the chart blank, the same setup looked uncertain, and half the signals a trader remembers never looked tradeable at all.
Three habits create most of the dishonesty. First, vague rules: “enter on the fair value gap after a sweep” leaves open which gap, how big it must be, whether it must already be filled, and what counts as a sweep. Two traders following that sentence will take different trades. Second, hindsight: scrolling a completed chart and marking only the setups that worked, while forgetting the ones that failed or never triggered. Third, tuning: changing a setting, re-running the test, and keeping the version with the best result. That is not finding an edge. That is fitting the strategy to one particular stretch of history, and history does not repeat itself that neatly.
There is a useful warning from the specialist literature here. Build Alpha, which writes about testing Smart Money Concepts, makes the point that fair value gaps, liquidity sweeps and breaks of structure are geometric relationships between highs, lows and closes, so they can be written as testable conditions, but published descriptions are usually ambiguous enough to support several different rule sets, and those rule sets do not all produce the same results. Testing the concept in general proves nothing; you have to test the exact rule you intend to trade. That single distinction is the whole discipline of backtesting.
Step 1: Write the strategy so a stranger could trade it
Before you open a single historical chart, write a one-page rule sheet. If a rule needs your judgment in the moment, it is not a rule yet, and it cannot be backtested. The sheet should answer every question in the table below, with no blanks.
| Rule | Example for this test |
|---|---|
| Market and timeframe | Gold (XAUUSD), 15-minute execution chart, daily bias only |
| Session window | London and New York kill zones only, never outside them |
| Liquidity sweep | Wick beyond the previous day high or low, closing back inside |
| Market structure shift | Close beyond the last swing high or low after the sweep |
| Entry | First fair value gap formed after the shift, minimum gap size set in advance |
| Stop loss | Beyond the sweep extreme, fixed before entry |
| Target and risk | Fixed multiple of risk, for example 2R, and 1% of the account per trade |
| Invalidation | If price closes beyond the entry gap in the wrong direction, the setup is dead |
The example above is a template, not a recommendation. Your numbers will differ, and that is fine. What matters is that they are fixed before the test starts. Note also what the rule sheet deliberately leaves out: no “only take it if it looks clean”, no “skip it if the news feels risky”, no second-guessing after the fact. Every one of those escape clauses is a way for hindsight to rewrite your results.
This is where building real trading psychology actually starts, long before any live trade. Psychology is not tested by willpower in the moment. It is tested by whether your rules survive contact with losing streaks, and a backtest is the cheapest place to find out.
Step 2: Choose data that can embarrass the strategy
A strategy tested on one good year is a strategy tested on one mood of the market. Gold trending cleanly for six months will flatter almost any trend setup, and a quiet range will flatter almost any reversal setup. You need data that includes trends, ranges, quiet weeks and violent weeks, because live trading will give you all of them whether you tested them or not.
Sample size matters as much as variety. Practitioner guides converge on the same rough thresholds: below 100 trades, the numbers are mostly noise; 100 trades gives a usable baseline; 200 to 500 trades is where confidence starts to mean something. One guide puts it plainly: at 95% confidence, roughly 96 trades estimate a 50% win rate within about ten percentage points, and it takes about 384 trades to narrow that range to about five points. Trade count alone is not enough, but without enough trades, nothing else in the report can be trusted. If your setup only fires twice a month, that means years of data, or testing across more than one market, before the numbers deserve your money.
| Trades tested | What it tells you |
|---|---|
| Under 30 | Almost nothing. A lucky streak can carry the whole result. |
| 30 to 99 | A rough outline, still wide open to regime bias. |
| 100 to 199 | A credible baseline for win rate, drawdown and expectancy. |
| 200 or more | Enough to judge whether the edge survives different conditions. |
One more choice belongs in this step, and it must be made before you see the results: which markets and dates are in, and which are out. If you test gold, then quietly drop the months where the strategy lost because “gold behaved strangely then”, you have not improved the strategy. You have hidden its weakness from yourself. Pre-commit to the data, and report the bad periods alongside the good ones. The worst drawdown in the report is not an embarrassment. It is the most useful number in it, because it tells you what live trading will feel like.
Step 3: Run it bar by bar, with costs included
There are two honest ways to run the test. Manual bar-by-bar replay means scrolling historical charts one candle at a time, marking entries and exits as they appear, and logging every trade before revealing what happened next. It is slow, and that is its advantage: it forces you to experience the uncertainty of the moment instead of the clarity of hindsight. Automated testing means coding the rule sheet into a platform and letting it run across the data. It is fast and consistent, but only as honest as the rules you coded. A vague rule automated is still a vague rule.
Whichever route you take, costs go in before you judge the result. Spread, commission and slippage are not footnotes. Broker education material on backtesting lists them as core steps for a reason: define the parameters, gather the data, run the test, analyse, refine, and then forward-test. Skipping the cost step turns a marginal strategy into a fake winner, because the costs are charged on every trade, win or lose. For gold in particular, spreads widen sharply around major news, and a setup that assumes a calm spread will overstate its edge exactly when it matters most.
Log every trade the same way, in a trading journal built for the test: date, session, setup type, entry, stop, target, outcome in R, and one line on whether the rule was followed exactly. The journal is not paperwork for its own sake. It is what lets you answer the question that matters later: did the strategy lose, or did you stop following it? Those are two completely different problems with two completely different fixes.
Step 4: Read the numbers that matter, not the ones that flatter
Win rate is the number beginners stare at, and it is the least informative number on the report. A 70% win rate loses money if the average win is small and the average loss is large. What matters is expectancy: on average, how much does one trade make or lose, measured in multiples of risk (R)?
The formula is simple. Expectancy equals (win rate multiplied by average win) minus (loss rate multiplied by average loss), with wins and losses measured in R. Here is a worked example, labelled as our calculation. Suppose a test of 100 trades produces 42 winners averaging 2.1R and 58 losers averaging 1R. Expectancy equals (0.42 multiplied by 2.1) minus (0.58 multiplied by 1), which is 0.882 minus 0.58, or 0.30R per trade. Profit factor, which is total winnings divided by total losses, equals (42 multiplied by 2.1) divided by (58 multiplied by 1), which is 88.2 divided by 58, or about 1.52. A profit factor above 1 means the strategy made money; guides commonly describe above 1.5 as solid and above 2 as excellent, while warning that live results usually run worse than the backtest once slippage and execution mistakes enter. The example is hypothetical, included only to show the arithmetic. Your own numbers must come from your own logged trades.
Try the arithmetic on your own figures with the tool below. It uses the same formula, and it is labelled as our calculation.
Backtest Expectancy Calculator
Win rate (%):
Average win (R):
Average loss (R):
This tool shows expectancy per trade in R. It does not predict live results, and it cannot account for costs, slippage or execution mistakes unless those are already inside your win and loss figures.
Read the rest of the report with the same cold eye. Maximum drawdown tells you the worst peak-to-trough fall, and it is the number that decides whether you will actually keep trading the strategy when it goes wrong. Longest losing streak tells you what a bad month feels like in advance, so it does not feel like a surprise when it arrives live. And the equity curve itself tells a story: a smooth, steadily rising line with no rough patches is suspicious, not reassuring. Real strategies have flat periods and ugly stretches. A curve without them has usually been tuned until the rough patches disappeared from the report, not from the market.
Two further checks separate a serious backtest from a vanity project. First, check whether the result depends on a handful of outlier trades. Remove the best three trades and re-run the numbers. If a profitable strategy turns unprofitable without them, you do not have an edge. You have three lucky days. Second, check the strategy across market regimes separately: trending periods, ranging periods, and high-volatility shocks. A strategy that only works in one regime is not a bad strategy, but it is a regime trade, and it must be labelled as one, with a plan for what you will do when that regime ends.
Step 5: Prove it on data you did not build it on
This is the step most traders skip, and it is the step that matters most. Split your data before you start tuning. Build and refine the strategy on one part, say the first 70%, and keep the remaining 30% untouched. When you are happy with the in-sample result, run the frozen rules on the untouched part exactly once. If performance collapses there, the strategy was fitted to the first part, not discovered in it. That is not a failure of effort. It is the test doing its job.
Walk-forward testing goes further. Instead of one split, you roll the window forward: optimise on one period, test on the next, then move both windows forward and repeat. A strategy that survives several rolling windows has shown something a single split cannot show, which is that its edge is not tied to one lucky stretch of history. A guide on avoiding backtest bias describes the same discipline in plainer terms: write the hypothesis before touching the data, cap the number of optimised parameters, split the sample into an in-sample part and a hold-out window opened exactly once, and model real spread, slippage and commission. Any backtest showing very high returns on very few trades, it warns, should be treated as curve-fit until proven otherwise.
Only after the out-of-sample test should the strategy meet real money, and even then in stages. The honest sequence is backtest, then forward test on a demo account with the same rules and the same journal, then live trading at the smallest size that still feels real. Demo results never match live results exactly, because demo trading removes the emotions that live trading adds, but a strategy that cannot survive demo testing has no business near a live account. Each stage is a filter, and each filter exists to catch a different kind of self-deception.
The five ways a backtest cheats
Keep this list beside your rule sheet. If any of these appear in your test, fix the test before you trust the result.
- Look-ahead bias. Using information that was not available at the decision moment, such as entering on a candle close that had not happened yet, or using an indicator value that repainted later. The fix is bar-by-bar replay and rules that only use closed candles.
- Survivorship bias. Testing only on markets or instruments that survived, or quietly dropping the losing periods. The fix is pre-committing to the data and reporting every period.
- Overfitting. Adding conditions and tuning settings until the historical result looks excellent. The fix is few parameters, a hold-out test, and a preference for broad regions of settings that work rather than one perfect point.
- Ignoring costs. Reporting gross results as if trading were free. The fix is spread, commission and slippage in every trade, using realistic figures for your own broker and session.
- Regime cherry-picking. Testing only the market mood that suits the strategy. The fix is data across trends, ranges and shocks, reported separately by regime.
Beginners make the same cluster of ICT mistakes in live trading that they make in backtesting: chasing every gap, trading outside the real session windows, and treating one good week as proof. The backtest is where those habits are cheapest to catch, because the market charges nothing for a lesson learned on historical data.
Three rules for sticking to the test when it goes live
A backtest is also a psychological contract. One lesson I picked up from a third-party business course has stayed with me here, and it fits backtesting better than it fits most of the places it is usually quoted. It comes down to three rules for being unstoppable in business: every action should be a conscious decision, discipline builds skill, and complaining changes nothing. Stripped of its motivational packaging, that is a precise description of what a backtest demands.
Every action a conscious decision means no trade exists outside the rule sheet. If the setup is not on the sheet, it is not a trade, however tempting it looks. Discipline builds skill means the skill is not in spotting the setup. It is in executing the same rules for the hundredth time, after the ninetieth trade lost, without quietly changing the stop or the target. And complaining changes nothing means the losing streak is not an injustice to argue with. It is a number you already saw in the backtest, and the only useful response is to check whether the rules were followed, not whether the market was fair.
This is also why position sizing belongs in the rule sheet, not in your mood on the day. Risk management in trading psychology goes beyond the basics precisely at this point: the backtest tells you the drawdown to expect, and the position size decides whether that drawdown is an inconvenience or an account-ending event. A strategy with a genuine edge and a reckless size still blows up. A strategy with no edge and a careful size just loses slowly. The backtest answers the first question. Only you answer the second.
When a backtest says no
Most backtests should say no. That is not pessimism. It is arithmetic. Most ideas that look good on a finished chart do not survive fixed rules, real costs and untouched data, and finding that out in a spreadsheet is the cheapest possible outcome. A failed backtest saves the money, the time and the confidence that a live failure would have cost.
When the test fails, do not immediately tune it until it passes. Ask first whether the idea itself is wrong, or whether one specific rule is wrong. Change one thing, write down why, and re-test from scratch on fresh in-sample data. If you change five things at once and the result improves, you will never know which change mattered, and you will have tuned five new ways to be wrong. And if the idea fails across several honest attempts, drop it. Traders do not run out of ideas. They run out of capital defending one idea that never worked.
Watch, too, for the opposite trap. A trader who has spent weeks on a backtest can fall into overtrading the moment it goes live, taking extra setups that were never in the test because the tested setups feel too slow. The backtest earned its result at a certain frequency. Trading twice as often is not trading the same strategy faster. It is trading a different, untested strategy, and it should be judged as one.
The bottom line
Backtesting an ICT strategy is not about proving that Smart Money Concepts work. Concepts are a vocabulary, and a vocabulary cannot be backtested. What can be backtested is one precise set of rules, on enough trades, across enough market conditions, after real costs, and on data that played no part in building it. Do that, and the result, good or bad, is genuinely useful. Skip any part of it, and the result is a story you told yourself with charts.
Start small. Pick one setup, write its rule sheet, and run 100 honest trades on historical data. Log them all. Then hold the result up against the out-of-sample test and see whether it survives. If it does, you have something worth forward-testing. If it does not, you have saved yourself the most expensive lesson in trading, which is learning on live capital what a backtest could have told you for free. For the broader map of how these concepts fit together, the complete ICT trading strategy guide is the place to start, and this backtesting method is how you find out which parts of it deserve your money.
Disclaimer
Trading involves substantial risk of loss and is not suitable for everyone. Backtested results do not predict future performance, and a strategy that worked historically can fail live. Consider speaking with a qualified financial professional before risking capital you cannot afford to lose.
Frequently asked questions
How many trades do I need to backtest an ICT strategy?
At least 100 trades before treating the result as more than an early hypothesis, and ideally 200 to 500 before making a serious risk decision. Fewer trades leave the win rate and expectancy estimates so wide that they cannot distinguish a real edge from luck. If your setup fires rarely, extend the testing period or test across additional markets to build the sample honestly.
Can I backtest an ICT strategy without coding?
Yes. Manual bar-by-bar chart replay is a legitimate method: scroll historical candles one at a time, mark entries and exits as they appear, and log every trade before revealing the outcome. It is slower than automated testing, but it captures the uncertainty of real-time decisions and prevents hindsight from rewriting your trades.
What is overfitting in backtesting?
Overfitting means the strategy has learned the noise in one particular stretch of historical data instead of a repeatable pattern. The warning signs are many tuned parameters, a result that depends on a few outlier trades, and performance that collapses on untouched out-of-sample data. The defences are few parameters, a hold-out test, and walk-forward testing across rolling windows.
Should I include spread and slippage in my backtest?
Always. Spread, commission and slippage are charged on every trade, and a marginal strategy can look profitable before costs and unprofitable after them. Use realistic figures for your own broker and session, and be especially careful around major news, when spreads on gold can widen sharply.
What is the difference between in-sample and out-of-sample testing?
In-sample data is the data you used to build and refine the strategy. Out-of-sample data is data the strategy has never seen during development, kept aside and opened only once for a final check. If the strategy performs well in-sample but poorly out-of-sample, it was fitted to the first dataset rather than discovering a durable edge.
Does a good backtest guarantee live profits?
No. A backtest shows what would have happened in the past under your rules, not what will happen next. Live trading adds execution differences, changing market conditions and emotions that no historical test can fully reproduce. That is why a good backtest is followed by demo forward testing and then small live size, rather than treated as a green light on its own.
About the Author
Shurah writes and maintains DataPips on his own, drawing on hands-on experience in trading and entrepreneurship. His articles grow out of personal research, real trading lessons, and the slow work of building this publication from scratch, rather than any formal financial credential.