Why is my backtest profitable but live trading loses?

A profitable backtest and live losses can come from several different gaps. Check data, fills, costs, rule changes and market exposure before concluding that the problem is psychology. A historical result is a result under assumptions; it is not a promise that actual trading will match it.
Audit these gaps one at a time
| Possible gap | What to inspect |
|---|---|
| Future leakage | Was a higher-timeframe candle or later level visible before it existed? |
| Selection and overfitting | Were losing periods skipped or many versions tried before keeping one? |
| Execution | Were entries assumed filled at touched prices, with no spread or delay? |
| Costs | Were commissions, spread, slippage and applicable holding costs included consistently? |
| Rule differences | Did entry, exit, sizing or trading hours change? |
| Exposure and conditions | Did the live period contain different volatility, trends or clustered positions? |
A simulator is limited by its execution model. The discussion of hypothetical results in 17 CFR 4.41 highlights hindsight and missing execution effects.
Check which higher-timeframe candle was available
If your rule needs a completed four-hour candle (H4), use the most recent H4 whose final value had arrived by the decision time. The H4 row that contains the decision can already show its final close in a historical export, even though that close was still hours away. This is look-ahead bias. Pilot65’s MQL5 question describes the same problem with an hourly decision and a daily candle. TradingView documents how this can happen in historical Pine Script calculations.
Exercise: pause the BTC case at 05:00 UTC
Use the Binance spot BTC/USDT case file for October 1, 2025. The file labels each candle by its opening time. Its published decision cutoff is 08:00 UTC. For this exercise, stop earlier at 05:00 UTC, just after the M15 candle opening at 04:45 finishes. Assume completed candles are available immediately at their closing boundary. In your own records, use the actual data arrival time if it is later.
Before reading the table, try these steps:
- Find the last H4 that completed by 05:00 UTC. Record its opening and completion times.
- Build a snapshot of the forming H4 from the four completed M15 rows opening at 04:00, 04:15, 04:30 and 04:45. Take the first open, the highest high, the lowest low and the last close.
- For a timing check, suppose your rule asks whether the last completed H4 close was at least 114,500 USDT per BTC. Write down the answer at 05:00 before inspecting the final 04:00 H4 row.
| Evidence | Available in this exercise at | Open | High | Low | Close or latest M15 close |
|---|---|---|---|---|---|
| Completed H4, 00:00–04:00 UTC | 04:00 UTC | 114,048.94 | 114,551.76 | 113,966.67 | 114,176.92 |
| Forming H4, first hour only | 05:00 UTC | 114,176.93 | 114,700.00 | 114,151.00 | 114,289.01 |
| Completed H4, 04:00–08:00 UTC | 08:00 UTC | 114,176.93 | 114,740.00 | 114,151.00 | 114,539.02 |
At 05:00, the rule gives no because the last completed H4 closed at 114,176.92. At 08:00, it gives yes because the next H4 has closed at 114,539.02. Copying that second answer into the 05:00 row uses data three hours early. The partial snapshot is useful if your written rule explicitly uses an unfinished candle, in which case the same rule must use only data available by each decision time. The threshold was chosen for the exercise. The table records prices and availability, with no entries, fills or returns.
For your next replay, add four fields to your journal: decision time and timezone, reference candle interval, earliest time its value was available, and whether the rule calls for a closed bar or a forming snapshot. If the reference arrived after the decision, flag that row for a retest before comparing performance. Check the case methodology if you are using our exports. Price Action Trading Simulator on iPhone and iPad lets you reveal historical candles one at a time to practise recording a decision before advancing. Setup is free to browse, and starting a manual backtest requires Pro. Keep the timestamp audit in your own notes.
How can costs reverse a result?
Hypothetical example: 100 decisions with an average gross result of +0.15R. Gross total = 100 × 0.15 = +15R. If combined execution and transaction costs average 0.20R per trade, costs = 20R and net total = −5R.
This is arithmetic with assumed costs, not a measured strategy. Costs expressed in R change with stop distance: the same 1 USD cost is 0.1R when planned risk is 10 USD, but 0.5R when it is 2 USD. Win rate, reward and costs gives a fuller calculation.
A touched stop is different from a candle-close exit
Our SOL case records a first later low below 163.1725 in the M15 candle opening at 09:15 UTC on November 11, 2025. The first close below is 163.05 at 12:45 UTC. Calling both “exit at invalidation” conceals different rules. Neither observation records a fill. See the case methodology and stop guide.
Audit a same-candle result before counting it as a win
If a candle contains both your fixed stop and target, its high and low alone do not establish which exit came first. First ask when the position and each order became active. A pre-entry price cannot close a position that did not yet exist.
This is a real learner problem: phtomich’s MQL5 thread asks about entry/stop ordering within one bar; Maria Modan’s QuantConnect question describes unexpected double exits. These accounts motivate an audit, not a diagnosis of your strategy or specifications for our app.
Exercise: give this BTC observation an evidence label
The published BTC/USDT case file contains the following actual Binance spot M15 bar on October 1, 2025:
| Opens, UTC | Completes, UTC | Open | High | Low | Close |
|---|---|---|---|---|---|
| 04:30 | 04:45 | 114,587.51 | 114,700.00 | 114,500.00 | 114,550.94 |
Prices are USDT per BTC. The timestamp in the file marks the bar’s open; its completed OHLC becomes available at 04:45. These are historical observations, not entry signals. The case’s later decision cutoff is 08:00 UTC; this exercise audits an earlier completed bar, without using later prices.
For this exercise only, choose a hypothetical long position with fixed stop 114,520 and target 114,650. These levels were chosen for a retrospective data check; the export does not record orders at them.
Before reading the check, answer:
- Are both levels inside the completed bar’s range?
- If the position and both exits were active before 04:30, can this M15 row prove the first exit or its fill price?
- If the position and exits become active only at 04:45, can earlier extremes in this bar count as subsequent exits?
Check: both levels are inside the range: 114,500 is below 114,520, and 114,700 is above 114,650. For the before-open scenario, label the row sequence unresolved from this data. For the at-close scenario, label those earlier extremes not evidence of a post-entry exit. Neither answer assigns a historical profit or loss. Order type, trigger price basis, gaps, liquidity and costs still matter.
Turn the result into a reconciliation ticket
Copy this ticket beside one reported backtest trade:
| Ticket field | What you need to establish |
|---|---|
| Reported result | Preserve the original entry, exit, timestamps and rule version |
| Available evidence | Identify source, bar interval and whether timestamps mark opens or closes |
| Activation check | Locate entry fill and each exit’s activation before using any price excursion |
| Unresolved issue | Separate unknown intrabar sequence, assumed fill and remaining-order cancellation |
| Next check | Request the engine’s execution rule and finer chronological evidence where available |
A simulator can produce a definite result by applying a policy. That does not turn the policy into an observed price sequence. TradingView’s official broker-emulator documentation describes inferred intrabar paths and optional lower-timeframe detail; it is documentation of that engine, not a universal market rule.
If both exits remain inside the same smaller bar, the finer interval still leaves their order unresolved. Keep that uncertainty with the trade rather than silently deleting it. Also check what happens to a remaining exit after the position closes; this is a different question from which price came first.
Use the ticket to identify the next piece of evidence, not to force the backtest to match live P/L. Our tool-selection guide helps separate manual rehearsal from execution testing. The worksheet is kept separately; it does not claim the app automatically detects these cases or verifies broker fills.
Build a matched decision record
For each eligible setup, keep the rule version, timestamp, visible information, intended order, actual or simulated entry and exit, costs and reason for any deviation. If the rule says to skip, record that too. Do not rewrite the backtest until it agrees with the live loss.
A useful first review asks: “Which rows differ because of costs? Which differ because I used a different rule? Which remain unexplained?” A small live sample alone cannot distinguish random variation from a changed market or a weak rule. Preserve later data for another test and document changes as new versions.
Where does the app help?
Price Action Trading Simulator supports manual historical replay, hidden dates, optional hidden symbols, saved sessions and a configurable simulated fee in R. It is for iPhone and iPad, with no real-money trading or broker connection. Setup is free to view; starting a backtest needs Pro. It does not import actual broker fills, export a trading journal or run automated validation.
Use it to rehearse a clear process, then evaluate its limits in your journal. A short profitable replay cannot certify an edge or readiness for live risk.
Research note: SiftingIO’s same-candle guide was read as a reference for the execution-audit job. The BTC activation exercise and reconciliation ticket above are our own contribution; no source code, synthetic FX example or source image is reproduced.
Frequently asked questions
How can a higher-timeframe candle cause look-ahead bias in a backtest?
A historical row can contain the final high, low and close of a candle that was still forming at the decision time. For a completed-bar rule, check when the value became available and use only a candle that was already closed.
What if stop loss and take profit are inside the same candle?
Check when the position and exit orders became active. OHLC alone may not establish which exit came first; an engine can assign a result using its own fill policy. A reported fill is not a recorded tick sequence.
Why can a profitable backtest lose live?
Possible gaps include costs, optimistic fills, future leakage, selected periods, changing market conditions and different decisions. Compare records before attributing the result to one cause.
Does a live loss prove the strategy stopped working?
No. A short sample can differ even under the same process. First check whether rules, execution assumptions, markets and costs match; then assess uncertainty and evidence for the rule.
How do I compare a backtest with live decisions?
Keep a frozen rule version and record decision time, information then available, planned and filled prices, size, costs and any deviation. Compare matched decisions rather than only account totals.
Written by the app’s development team. See the data, selection rules and limits of these first-party examples. Sources & method →
Keep reading
-
Where do our real trading cases and zone statistics come from?
How our selected Binance cases, fixed draw and 72-hour labels work. Inspect the SOL timeline, public files and limits of the 110-touch aggregate.
-
Where should I place my stop loss? A price action guide
Define your stop trigger, size from its distance and test any move to breakeven. A real SOL timeline and a paired worksheet separate prices from fills.
-
Trading journal: what to record and how to review mistakes
Record rules and planned risk before entry, then actual fills, costs and compliance. A journal separates execution mistakes from an untested strategy.