OptiNod Academy

Why a backtest works but your trades do not — The gap between signals and execution

A backtest's positive expectancy belongs to its entry rules. Live results depend on how consistently those rules are followed, and the gap can be measured in R.

The positive expectancy found in a backtest is built into its rules. Live profit and loss depends on how faithfully those rules are followed when you trade.


It is common for a strategy with positive expectancy in a backtest to lose money in a live account. The backtest measured the expectancy of the entry and exit rules themselves. Those rules enter and exit at specified prices and times. Live results add a person's decisions to those rules.


People often collapse this difference into “the strategy does not work live” and blame the strategy. If the strategy is at fault, the only apparent fix is to replace it. Yet the same trader can write a new strategy and recreate the same gap through the same habits. Misidentifying the cause leaves the problem in place no matter how many rules are changed.


Live expectancy equals backtest expectancy minus two kinds of gap: mechanical and execution. The mechanical gap comes from fees, slippage, fill timing and lookahead. The execution gap arises when human judgment intervenes in turning the rules into actual trades.


This series focuses on the execution gap. Measure its size first to decide which bias to address. This article explains how to measure the difference in units of R and where each article in the series fits.


One strategy can have two different expectancies


Backtest expectancy is the average profit or loss produced by entry rules on historical data. The rules enter on the signal bar and close at the stop, target or exit signal. There is no hesitation, late entry or early exit. It is therefore the best outcome the strategy can produce under those assumptions.


Live expectancy comes from a person executing the same rules. Entries may be several bars later than the signal, and exits may be earlier or later than planned. Sometimes the stop is honored; sometimes it is postponed. The rules are the same, but the fills differ, so the two expectancies diverge.


“The strategy does not work live” can therefore describe two separate problems: the rules themselves, or their execution. Without separating them, a trader may discard sound rules and carry the same execution habits into the replacement. Until both expectancies are written down separately, there is no way to tell which is responsible.


The mechanical gap already has ways to be measured


The difference between backtest and live expectancy has two parts. The first is mechanical. It exists independently of anyone's judgment because market conditions differ from the backtest's assumptions.


  • Fees and slippage: A backtest may set trading costs to zero or underestimate them, while live trades incur them on every fill. Slippage, fees and liquidity examines their size.
  • Fill timing: A backtest fills at an assumed price, such as the close or the next bar's open. A live fill will differ. Backtest versus live trading explains where their equity curves separate.
  • Lookahead and repainting: A signal that seemed perfect in the backtest may not have existed in real time. Lookahead and repainting covers this case.

These three differences remain even if every rule is followed perfectly; they are unrelated to trading psychology. This series does not examine them in detail. But to measure the execution gap, first remove the mechanical one. Only then can the remainder be attributed to human decisions.


The remaining gap comes from the person executing the rules


What remains after accounting for the mechanical gap is the execution gap: the difference created when a person acts differently from the rules despite receiving the same signal.


In early November 2024, Bitcoin began climbing from around $69,000 and reached $108,353 on December 17, a rise of about 57%. A trend-following rule enters on an early signal bar and holds until its exit signal. Over that same move, a trader's actual decisions can depart from the rules in several ways.


  • The entry is late. Missing the signal bar and buying after price has already risen leaves the stop distance unchanged but shortens the distance to the target, reducing reward relative to risk. FOMO chasing covers this delay.
  • The exit is early. Rushing to protect an 8% gain made in a few days cuts an average winner that could have reached +57% down to +8%. The disposition effect covers this habit.
  • The stop is delayed. Postponing a planned stop during a decline can multiply a loss intended to be limited to 1R. A position whose stop was delayed near the October 6, 2025 high of $126,200 could have reached $80,600 by November 21, a loss of about 36%.
  • Trade frequency rises. Lowering the entry threshold under pressure to recover a loss increases the number of trades, and the extra costs eat into expectancy.

These four execution choices can produce different results from the same upward move. One rule set, different outcomes. Without measuring this component, you cannot determine whether the account is shrinking because of the rules or their execution.


Planned versus actual exits
Planned versus actual exits

Measure the execution gap in R


If the execution gap is left as a feeling, it is hard to know what to fix. Trade records make it measurable by calculating expectancy twice.


For a trade, expectancy is the win rate multiplied by the average win in R, minus the loss rate multiplied by the average loss in R. One R is the amount risked at the planned stop on a trade. Expectancy explains the calculation.


Calculate the figure once for all live trades and again for only the trades that followed the rules. A compliant trade entered at the signal and followed the planned stop and target. The difference between the two figures is the size of the execution gap. If compliant trades have clearly higher expectancy than the full set, the trades that departed from the rules are dragging down the account.


For example, suppose compliant trades have expectancy of +0.30R and all live trades have expectancy of +0.05R. The execution gap is 0.25R: departures from the rules reduced expectancy by 0.25R per trade. If backtest expectancy was +0.40R, the remaining 0.10R is the mechanical gap. Lining up those three values shows numerically how much execution contributed to the shortfall.


Subtract the execution and mechanical gaps from backtest expectancy to reach live expectancy. Writing all three values in R makes the largest gap obvious.


  • Backtest expectancy: Record expected R per trade from the backtest.
  • Live expectancy: Calculate expected R per trade from actual fills using the same formula.
  • Decompose the gap: Split the difference between those values into mechanical and execution components.
  • Tag rule adherence: Mark every live trade as compliant or noncompliant and calculate expectancy separately for the two groups.
  • Classify violations: For each noncompliant trade, record whether it involved a late entry, early exit, missed stop or excessive trading.

Gap between backtest and live expectancy
Gap between backtest and live expectancy

Two pitfalls


Attributing the entire execution gap to psychology. The difference between compliant trades and all trades may still include mechanical effects. If fees and slippage are not accounted for, the amount assigned to psychology is overstated. Use actual trading costs before measuring execution.


Drawing a conclusion from too few trades. A difference in expectancy calculated from 20 trades can swing widely by chance. Until both compliant and noncompliant groups have enough observations, it is too early to treat their difference as a settled execution gap. With small samples, even the sign of the difference can reverse.


The numbers determine which bias to address first


Once the execution gap is measured, the rule violations behind it determine the order of work. If early exits dominate, examine the disposition effect and exit rules. If late entries dominate, examine FOMO chasing and entry rules. If excessive trading after losses dominates, examine revenge trading and trade limits. Each article in this series takes one bias and shows how it appears in trade records and which rules set in advance can reduce it.


The order does not come from a better mindset. It comes from measured differences. Write backtest and live expectancy in R, then separate the mechanical and execution gaps. That is the starting point of this series. Watching your account cannot tell you which bias costs the most; the numbers in your trade record can.

Check it in your own trading record

Upload an MT5 trade history report or a TradingView strategy trade list (CSV) to calculate the profit distribution and losing streaks. No sign-in is needed to analyze.

Analyze my trade history Explore an example report