Skip to content
TradingTune

Common backtesting mistakes, and how to avoid them.

A backtest only ever tells you how a setting would have done on the exact bars you fed it. That makes it easy to walk away with a number that feels like proof when it is really an artefact of how you ran the test. These are the mistakes that most often make a TradingView strategy look better on paper than it ever performs live, what makes each one so convincing, and the habits inside TradingTune that keep you honest.

Mistake 01

Overfitting the parameters to history

What it is. Overfitting, also called curve-fitting, is tuning a strategy so tightly to one slice of history that it learns the noise in those bars rather than any repeatable pattern. The more freedom you give the search (more parameters, wider ranges, finer steps), the more ways it has to bend the strategy around the quirks of those specific bars.

Why it fools you. The backtest looks fantastic, because the parameters were chosen precisely to flatter the data you measured on. Live markets then serve up bars the optimizer never saw, the memorised quirks do not repeat, and the strategy that looked unstoppable bleeds in real time. Nothing broke: the edge was never really there.

How to avoid it. This mistake is the root of most of the others, so it has its own deep dive. Read our full guide on how to avoid overfitting for the out-of-sample habits, parameter-stability checks, and retests that keep optimized settings honest. The short version: never judge a result on the data you tuned it on.

Mistake 02

Drawing conclusions from too few trades

What it is. Judging a strategy on a backtest that only took a handful of trades. A glittering net profit built on a dozen entries carries almost no statistical weight, yet the headline number looks just as bold as one earned over hundreds of trades.

Why it fools you. With few trades, a single lucky winner or a kind sequence of bars can dominate the result. The fewer the samples, the easier it is for random luck to masquerade as skill, and the wider the range of outcomes that are perfectly consistent with having no edge at all. A 90 percent win rate over ten trades tells you very little.

How to avoid it. Treat the trade count as a first-class metric, not an afterthought. Prefer configurations and date ranges that generate enough trades to mean something, and be skeptical of any peak that rests on a tiny sample. TradingTune shows the number of trades alongside profit and risk in the live results table, so you can sort and filter the run and discard rows that are too thin to trust before you ever read their returns. If you are unsure which numbers matter, see our guide to reading backtest metrics.

Mistake 03

Ignoring commission and slippage

What it is. Running the TradingView Strategy Tester with its commission and slippage inputs left at zero, so every fill is assumed to be free and perfect. Real trading pays a spread, pays commission, and rarely fills exactly at the signal price.

Why it fools you. Costs scale with how often you trade. A high-frequency strategy can show a beautiful equity curve with zero costs and a flat or losing one once realistic fees are applied, because each round trip quietly skims a little off the top. The cleaner the frictionless backtest looks, the more dangerous the omission, since active strategies are exactly the ones costs hurt most.

How to avoid it. Set commission and slippage in the Strategy Tester properties to figures that reflect your broker and instrument before you optimize, not after. Because TradingTune reads the same results TradingView produces, those costs flow straight into every metric it tunes against, so the settings it surfaces are the ones that win after fees rather than before them. If a strategy only works at zero cost, it does not work.

Mistake 04

Lookahead bias and repainting indicators

What it is. Lookahead bias is when a strategy uses information that would not have been available at the moment it acted, for example reading the close of a bar to decide a trade that supposedly happened during that same bar. Repainting indicators are a common cause: they redraw their past values as new data arrives, so the signal you see on history is not the signal you would have had in real time.

Why it fools you. A backtest that can peek at the future is almost unbeatable, and the equity curve looks immaculate. It is also fiction. The strategy can never reproduce those entries live because the information it relied on did not exist yet, so the gap between backtest and reality can be enormous and completely silent.

How to avoid it. Build signals on confirmed, closed bars and be wary of higher-timeframe data requested without lookahead guarded off. Avoid indicators known to repaint, or confirm their values only on bar close. No optimizer can fix a strategy that cheats: if the underlying logic looks ahead, TradingTune will faithfully tune a result you can never trade. Fix the lookahead in the Pine source first, then optimize. The terms here are defined in the backtesting glossary.

Mistake 05

Testing one symbol or one market regime

What it is. Validating a strategy on a single ticker, or over a single stretch of market behaviour such as one long bull run. The settings end up tuned to the character of that one series and that one regime rather than to anything general.

Why it fools you. Markets go through trending, ranging, calm, and volatile phases. A strategy fit to a single quiet uptrend can look flawless and then unravel the moment conditions change, because it never had to survive anything else. Tuning to one symbol has the same effect: you fit the noise of that specific price history.

How to avoid it. Test across markets and across regimes. Once you apply the best result from a run, use TradingTune's multi-asset retest to replay those exact settings across other symbols without re-optimizing. You are not chasing the same headline number everywhere, since different markets behave differently. You are checking that the strategy stays coherent and keeps taking sensible trades instead of only working on the one series it was tuned against. Pair that with a date range that spans more than one regime.

Mistake 06

Optimizing the entire history with no holdout

What it is. Pointing the optimizer at every bar you have and keeping the best result, with no period set aside to check it. If you optimize on all of your data, you have no data left to honestly test on.

Why it fools you. The in-sample result is guaranteed to look good, because you selected it to look good on exactly those bars. Without a window the optimizer never touched, you have no way to tell a durable edge apart from a curve fit. The number is not a prediction, it is a description of the past you already optimized against.

How to avoid it. Hold out data. Optimize on one date range, note the winning settings, then change only the chart dates to a later untouched period and re-run that same configuration. If the metrics hold up out of sample, you are on solid ground; if they fall off a cliff, you found a curve fit. Walk it forward by rolling both windows through time for stronger evidence. TradingTune's apply-best action makes this loop quick: apply the top row, move the dates, and retest the same parameters on data they have never seen.

Mistake 07

Chasing the single highest in-sample run

What it is. Grabbing the top-ranked row of an optimization run because it has the biggest number, without looking at the parameter values around it. The most robust settings sit on a plateau, a broad region where many nearby values all perform well. The dangerous ones sit on a spike, a single combination that beats everything around it.

Why it fools you. The highest run is, almost by definition, the one that benefited most from the specific noise in your data. A lonely peak is brittle: nudge any parameter one step and it collapses, and the live market rarely lands you exactly on the pixel you optimized to. A slightly lower plateau is usually the safer trade than a slightly higher spike.

How to avoid it. Read the neighbourhood, not just the leader. Sort and filter the live results table in TradingTune to find broad clusters of strong, similar settings rather than one outlier, and prefer a value in the middle of a healthy range. The search method matters too: browse all seven optimization methods to see how each explores the parameter space and which ones favour stable regions over lucky spikes.

Mistake 08

Unrealistic position sizing and compounding

What it is. Configuring the Strategy Tester to risk a fixed percent of equity, or to reinvest every gain, in ways you could never actually execute. Common culprits include sizing each trade as a large percentage of a compounding account, or assuming you can always fill a position far bigger than the market would really absorb.

Why it fools you. Aggressive compounding turns a modest edge into a vertical equity curve on paper, because each win is reinvested at an ever larger size. The same settings can wipe out an account in practice when a normal losing streak hits a position sized for the best case. The exponential tail of the curve is doing the heavy lifting, not the strategy.

How to avoid it. Size positions the way you would actually trade, with realistic order quantities and risk you could stomach through a drawdown, and be honest about how much size the instrument can absorb. Keep an eye on drawdown-aware metrics, not just net profit, when you compare runs. A strategy that only looks good under heroic compounding is not a strategy you can trade. The reading backtest metrics guide explains which risk numbers to weigh against the headline return.

Optimization is a multiplier, not a magic pill.

Every mistake above shares one root cause: trusting a backtest more than it deserves. Avoiding them keeps your measurements honest, but honest measurements only matter if there is a real edge to measure. Two things have to be true, in this order, before any optimization is worth running.

Good strategy × right parameters = results

Miss either factor and you are multiplying by zero.

  1. 1

    A strategy with a real edge

    Optimization tunes the dials of a strategy. It cannot create signal from noise. If the underlying idea has no edge, no combination of settings will save it: you will only find the parameters that fit the past best and then fall apart live. Garbage in, garbage out. Start with a strategy you understand and believe in.

  2. 2

    The right parameters

    Even a genuinely good strategy, run on the wrong inputs, leaves most of its edge on the table, and at worst looks broken when it is not. The default settings are almost never optimal for your market and timeframe. This is the half TradingTune automates: it sweeps the parameter space and surfaces the settings that actually perform.

Bring the edge, we will find the settings. Clean costs, enough trades, held-out data, and a stable plateau all sharpen a real edge into something tradeable. None of them can manufacture one that was never there.

Keep going

The deepest of these traps gets its own treatment in how to avoid overfitting, and once your results are clean you will want our guide to reading backtest metrics to weigh return against risk properly. To see disciplined optimization on real charts, study our strategy backtests compared to buy and hold, and look up any unfamiliar term in the backtesting glossary.

Backtest without fooling yourself

Install TradingTune and run cost-aware, out-of-sample-minded optimization right inside TradingView's strategy dialog. Free tier, no API keys. A free account is required to run.

Add to Chrome, it's free