What matters
A candle can contain both a stop price and a profit target without revealing which was reached first. A backtest must resolve that missing sequence with a rule or more detailed data. This 2027 guide uses one explicitly synthetic candle to show how identical open, high, low and close values can support opposite trade outcomes.
By Heath Muchena. 2027 research edition; pinned source review and original examples checked 28 November 2026. Documentation describes software capabilities; the calculations below do not run the reviewed projects or test a live account.
The missing variable is the route between four prices
Suppose a strategy buys one unit at the opening price of 100. Its stop is 95 and its target is 108. The candle opens at 100, reaches a high of 110 and a low of 90, and closes at 105. Both exit thresholds lie inside its range. Those four observations establish that the range included both prices; they do not establish the order in which a position encountered them.
One possible continuous route goes from the open to the high, then the low, then the close. The target is crossed before the stop. Another goes from the open to the low, then the high, then the close. The stop is crossed first. A strategy that exits fully on its first threshold encounter cannot receive both outcomes in the same run. The choice of sequence determines which exit remains relevant.
This distinction is easy to lose when a chart shows a clean candle and an exit marker. The marker is an output of the simulation’s information and assumptions. It is not additional historical evidence about the hidden route. A reassuringly precise profit figure can therefore depend on an ordering decision that the input data cannot independently settle.
What Freqtrade documents, and what this article tests
The pinned Freqtrade backtesting documentation states that ordinary stoploss is evaluated before ROI within a candle. It describes low-before-high ordering for stoploss and requested-price fills within the candle range without slippage. These are explicit modeling assumptions readers can inspect. They are useful precisely because they make the treatment of missing detail reviewable.
The same page describes distinct rules for trailing stops, exit signals, ROI changes and custom behavior. For example, its trailing-stop discussion includes high-before-low adjustment behavior. It would be inaccurate to compress all these rules into “Freqtrade always assumes the worst path” or to apply one sentence to every possible strategy configuration. The relevant question is which documented rule governs the actual order and exit condition.
Our tool does not run Freqtrade. It is an independently authored, deterministic demonstration of two continuous price paths. Its target is a fixed price threshold, not a complete implementation of Freqtrade’s ROI schedule, fee treatment or callback system. The source review establishes the presence of documented ordering assumptions; the arithmetic establishes how sequence alone can change a simple first-touch exit.
One candle, two admissible outcomes
The synthetic entry is at the open, before either path begins. Prices move continuously along straight segments, and a threshold crossing produces an immediate full fill at that threshold. There is no gap, spread, queue, latency or fee. These deliberately narrow assumptions isolate the missing sequence. They should not be read as a realistic promise that a stop order receives its trigger price.
| Input or result | High before low | Low before high |
|---|---|---|
| Recorded candle | O100, H110, L90, C105 | O100, H110, L90, C105 |
| Continuous path | 100 → 110 → 90 → 105 | 100 → 90 → 110 → 105 |
| First threshold | Target 108 | Stop 95 |
| Exit amount for one unit | +8 quote units | −5 quote units |
| Difference between these outcomes | 13 quote units | |
The calculations are simply 108 minus 100 and 95 minus 100. Their difference is 13. Neither result is a measured return from a traded market. Both are conditional outputs for invented inputs. Multiplying the quantity scales the amounts, but it does not supply evidence about which route occurred.
The two routes demonstrate non-uniqueness. They do not enumerate every possible intrabar path, establish the most probable route, or set universal best and worst execution bounds once gaps and market frictions are allowed. A real price path may revisit a level many times. A real order may fill partially or remain unfilled. The toy deliberately closes the whole position on the first valid crossing so that the source of the disagreement stays visible.
How to read the calculator without turning it into a forecast
Enter a coherent candle: its high must be at least the open and close, and its low must be no greater than either. The stop must be below the opening entry, and the target above it. These constraints define the long-position example. The tool rejects an impossible candle instead of silently rearranging its prices, and it does not reinterpret reversed thresholds as a short trade.
For each path, the tool walks the segments in order and stops when an exit is first crossed. If both thresholds are inside the candle range, the selected route normally changes the first exit. If only the stop is reachable, both routes can produce the same stop outcome. If neither is reachable, neither path closes the position. The displayed amount then becomes an unrealized mark-to-close change, not realized profit from an executed exit.
Try moving the stop to 50 and the target to 150 while keeping the original candle. Both paths finish with the position still open and a mark-to-close change of +5 for one unit. The zero difference between paths does not certify the trade’s profitability. It means that this particular pair of threshold rules generated no exit, under the tool’s narrow assumptions.
More detailed candles reduce a particular uncertainty
Freqtrade documents a detail timeframe for replaying smaller candles inside the main strategy interval. Its discussion of intrabar limitations and detail data explains why this can change execution and callback timing. Smaller observations can establish that a low occurred in an earlier interval than a later high, removing some ambiguity that existed in one larger candle.
Detail data does not automatically reconstruct the full trade tape. A smaller candle may still include both thresholds, and its own internal sequence can remain unknown. It also does not supply queue position, order arrival time, sufficient executable size or an account’s fee schedule. Treat the resolution of one uncertainty as progress on that uncertainty, rather than a general certificate of live realism.
A useful comparison therefore holds the strategy specification fixed and records exactly what changed: the data resolution, ordering rule, exit logic and fill assumptions. If the results change materially, the next task is to explain which changed assumption caused the difference. The more flattering output is not automatically the more credible one.
A practical review for an existing backtest
Start by counting trades whose stop and target fall within the same relevant candle after entry. That count is a diagnostic question, not a ready-made correction to returns: entry timing, trailing behavior and other exits may alter eligibility. Inspect a small, traceable sample with the engine’s documented rules and the original data timestamps.
Record whether a result came from an observed sequence or an assumed sequence. Preserve the engine version and strategy settings with the example. Where detail data is available and usable, rerun an identical specification and explain changed exits. Where it is unavailable, report the limitation and show a sensitivity example instead of claiming to have recovered the true order.
The Trading Tool Lab can help organize those capability and assumption questions. For a broader review, DN Research Desk can compare documented workflows and reproducible examples against a clearly defined research brief. Neither a software comparison nor this calculator supplies trading instructions or evidence that a strategy earns money.
Method and limitations
This original experiment uses no market dataset, random sampling, exchange connection or upstream engine execution. Its two paths are deterministic. The accompanying evidence records the default inputs and calculated outputs, plus independent checks for the +8/−5 example, an unclosed position, a stop-only candle and invalid inputs. A zero quantity is permitted as an arithmetic boundary and produces zero amounts.
The model excludes stop-limit non-execution, gaps through a trigger, spread, fees, funding, partial fills, liquidation and changing position size. It is a lesson about information contained in OHLC records. Before relying on a backtest, identify the specific assumption used wherever the data leaves an event order unresolved.
Download the dated source and scenario record (JSON) · Download the reproducible calculation pack (ZIP).
Frequently asked questions
Can OHLC data tell me which threshold was hit first?
Not when both were reached within the same recorded candle and no finer sequence is available. The engine must use an assumption or additional data.
Does this tool run Freqtrade?
No. It executes an original two-path arithmetic example. Freqtrade’s pinned documentation is reviewed separately.
Does a lower timeframe remove every execution uncertainty?
No. It can resolve some ordering questions while leaving ambiguity inside smaller candles and questions about queue, gaps and available liquidity.
Is the 13-unit difference an actual trading loss?
No. It is the difference between two conditional outcomes for an explicitly invented candle and one-unit position.
If neither threshold is hit, is the mark-to-close amount realised profit?
No. The position remains open. The amount is an unrealized valuation change at the candle close, not the proceeds of an executed exit.
Primary sources and evidence
- Freqtrade backtesting assumptions and detail timeframe. Documented stoploss-before-ROI ordering, distinct trailing-stop rules, no-slippage assumptions and intrabar detail limitations. Checked 2026-11-28.
Editorial disclosure: This research explains documented capabilities and original worked examples. Inclusion does not imply endorsement, a commercial relationship or verified trading performance. No placement in this article was purchased.
Corrections and updates: Send source-backed corrections to press@decentralised.news. This 2027 edition was checked on 28 November 2026; documentation, permissions and product availability can change.




