One candle, two outcomes: what OHLC cannot tell you about a robot
Learn when OHLC candles cannot resolve stops, targets and entries, and how to measure a backtest's dependence on an assumed intrabar path.

The trade appears in green: entry at 100, target at 104, exit with a gain of four units. The candle also shows a low of 96, and the stop was at 98. When you ask which level was touched first, the report does not answer with an observation. It answers with a simulator rule that nobody had reviewed.
The target could have happened first. The stop could also have happened first. An open of 100, a high of 105, a low of 96, and a close of 102 are compatible with both stories. The price summary does not necessarily contain the sequence the strategy needs.
This article examines the difference between observing a candle and assuming a path inside it. All simplified prices, trades, and quantities are hypothetical educational examples; none represents Atlas results or expectations of profitability. We use abstract units to make the logic visible without confusing it with contract sizes or the pip convention of a particular instrument.
The issue matters when studying Forex robots because a rule can depend on intrabar events even when its indicator is calculated from closes. You will learn to identify those cases, build small checks, and decide when you need finer data, an explicit simplification, or a less categorical conclusion.
1. Four numbers describe extremes, not a film
OHLC combines an interval’s open, high, low, and close. The open and close locate two observations at its temporal endpoints; the high and low summarize extreme values during the period. Without additional data, we do not know how often those levels were visited, how long each region lasted, or the order of intermediate oscillations.
The MqlRates structure in MQL5 documentation separates those four prices alongside timing fields and other data. A structure containing volume or spread does not automatically turn its four prices into an ordered path. Each field contributes its particular information. MQL5, MqlRates structure.
Construct two hypothetical trajectories, assuming continuous movements between their points for this exercise. The first visits 100, then 105, then 96, and finishes at 102. The second visits 100, then 96, then 105, and also finishes at 102. Both generate exactly the same OHLC. However, the order of the high and low is reversed.
If we ask only whether the close exceeds the open, both stories answer yes. If we ask whether an existing long position reached an upper target before a lower stop, their answers can differ. A candle’s sufficiency depends on the question you ask it. There is no universal declaration that candles are adequate or useless for every strategy.
Choosing a four-point sequence does not reveal the complete path either. Between the open and high, there could be reversals, repeated visits, and jumps. Linear interpolation can construct a compatible teaching scenario, but it does not recover what happened. Confusing a convenient reconstruction with an observation is precisely the error we want to avoid.
Before programming, list which properties of the path your rule requires. If it needs only an available closing value to decide a later entry, the order of extremes may not affect that decision. If it moves stops, cancels orders, or reenters during the candle, it needs much more information. That list determines what the dataset can support.
2. The stop and target compete to be first
Assume a long position already opened at 100 before the interval being studied. It has a stop at 98 and a target at 104. To isolate the issue, assume exact execution when a level is touched, without costs, jumps, spread, or liquidity restrictions. This is a simplified model, not a promise about actual orders.
On the path 100, 105, 96, 102, price crosses 104 before visiting 98. The position closes with a difference of plus four units. The later low of 96 no longer changes that trade because the state is flat. On the path 100, 96, 105, 102, the stop is reached first and the difference is minus two units; the later high no longer belongs to the position.
The distance between the two outcomes is six units. This difference does not come from changing the indicator, position size, or extreme prices. It comes exclusively from resolving an unobserved event order differently. If the report presents a single number without explaining that resolution, it conceals a material dependence on the model.
An exit ends exposure; subsequent extremes no longer belong to that trade. Simply marking that the target and stop lie within the range is therefore insufficient. We need to know which becomes effective first under the strategy’s current state. Applying both and adding their effects would describe another strategy, rather than a neutral reconstruction.
When only one level lies within the range, some ambiguity may disappear under our assumptions. If the low stays above the stop and the high exceeds the target, a continuous path from the open must cross the target. Yet this still does not establish an executed price in a market with jumps or guarantee that the order was active at that moment.
Write those conditions beside the example. Saying “the target was touched” compresses too much if the quotation side, activation time, and execution policy remain unknown. Path ambiguity is one layer of the problem. Resolving it does not automatically resolve every other layer.
3. The entry can occur after the low
Now the strategy begins flat. It places a breakout buy entry at 103, with a stop at 99 once the position opens. We observe a candle opening at 100, reaching a high of 105 and a low of 98, and closing at 104. An overly simple program detects a high above 103 and a low below 99, then records an entry followed by a stop.
However, consider the path 100, 98, 105, 104. The low happens before the breakout. When price passes 99 on the way down, neither the position nor its associated stop exists. The buy later activates at 103 and, on this particular path, price does not return to 99. If we choose to close at the end at 104, the simplified outcome is plus one unit.
On the path 100, 105, 98, 104, entry occurs before the low. The buy activates at 103 and the stop at 99 subsequently closes it for minus four units. The final close of 104 does not rescue a position that already ended. An extreme can precede the existence of the order you are trying to execute against it.
This case shows that assigning an entry and stop merely because both levels lie inside the candle does not identify the path or establish that the stop happened after entry. The minus-four outcome is feasible on the second path, but the extremes do not prove it. Before assigning priorities to orders created during the interval, reconstruct which orders are alive at each moment.
The situation becomes more complex if an entry can be cancelled after a particular time or another event. The candle’s high might occur when the order has already been cancelled. A static level comparison ignores that temporal life. A system using intrabar cancellations needs data and an engine able to represent them, or a simplification that explicitly changes the design.
To review the code, request a transition record: flat, pending order, open position, executed exit. Each transition must have an event that enables it. This small record reveals errors concealed by a final trade list, especially when several levels fall within the same range.
4. A trailing stop remembers the path
A fixed stop depends on a previously established level. A trailing stop also depends on the state reached during the trade. Imagine a long position at 100 whose stop follows the highest observed price at a distance of three units. The initial stop is at 97. As new highs appear, it rises; it never moves downward in this exercise.
Suppose the candle opens at 100, reaches 105, falls to 99, and closes at 104. If the path is 100, 105, 99, 104, the observed high raises the stop to 102 before the fall. Under exact execution, the position exits at 102 and gains two units. If the path is 100, 99, 105, 104, the initial decline does not touch 97; the stop later rises to 102, and the close at 104 leaves the position open.
Accumulated state matters as much as the current price. The first path produces an exit; the second leaves a continuing position. Saying that both outcomes involve a provisional gain is not enough. Subsequent decisions, available capital, and future exposure may diverge. A local difference can change the entire later sequence.
Do not update a stop retrospectively using a high that had not happened yet. A common mistake takes the complete candle’s high, calculates a new stop, and checks it against that same candle’s low without considering their order. The program combines one instant’s best knowledge with a visit to a price that may have occurred earlier.
You could define a stop that updates only at the close and becomes effective in the following interval. That rule needs less intrabar information and may be easier to simulate. However, it is not equivalent to a stop following every price update. The simplification must appear in the rules and in comparisons between implementations.
The same reasoning applies to partial exits, moves to breakeven, and position increases after particular movements. Each action changes the state governing subsequent actions. When rules include “after,” “until,” or “if this has already happened,” suspect that an extremes table may have discarded essential information.
5. The simulator must complete what it cannot observe
An engine producing a trade sequence from OHLC data needs a policy for resolving certain cases. It may assume a path, prioritize orders, wait for the following candle, or mark an outcome as indeterminate. None of those choices creates new observations. Their role is to define an executable model under incomplete information.
TradingView documents emulator assumptions about intrabar movement when using chart data and distinguishes that mode from lower-timeframe information. The general lesson is to inspect the specific engine configuration, rather than assume that every engine resolves a candle identically. TradingView, emulator and historical detail.
MetaTrader documentation also distinguishes real ticks from ticks generated using lower-resolution data. A generated trajectory may enable stepwise execution of rules, but its apparent detail does not turn it into the historically observed path. MetaTrader, real and generated ticks.
Reproducibility requires recording the execution model. Note the data mode, resolution, ambiguity policy, signal calculation time, and order treatment. When two tests use different modes, their disagreement may originate in the simulator even if their entry rules are identical.
Do not turn a mode’s commercial name into an automatic quality conclusion. Inspect what information it uses during the particular period, what happens when observations are missing, and which order types it represents. A history can mix segments with different coverage. The report should allow that variation to be identified whenever it matters to the trades.
A simple test inserts a candle you constructed with two competing levels and observes the engine’s behavior. Then change the open or the order of subcandles while preserving the overall extremes. The result reveals which assumptions activate. This does not replace reading the documentation, but it checks whether the configuration being used matches your interpretation.
6. Pessimistic and optimistic are scenarios, not probabilities
When an independent trade has two possible exits, you can calculate one scenario favoring the stop and another favoring the target. This exposes sensitivity to the assumption. It does not mean the outcomes are equally likely or that their average represents an expected result. Without an additional model, the candle supplies no such probabilities.
Suppose ten independent trades involve no reinvestment and do not affect later entries. Seven have unambiguous outcomes summing to three units. Three contain the competition from the initial example: plus four if the target comes first or minus two if the stop comes first. The total under entirely unfavorable resolutions is three minus six, equalling minus three. Under favorable resolutions it is three plus twelve, equalling fifteen.
The width between scenarios is eighteen units. Averaging the two totals would give six, but six is not a justified estimate of expected value. It is merely the midpoint of two constructed calculations. Interpreting it probabilistically would require a defensible distribution of paths and an explanation of how it was estimated without contaminating evaluation.
| Hypothetical component | Unfavorable resolution | Favorable resolution |
|---|---|---|
| Seven unambiguous trades | 3 | 3 |
| Three ambiguous trades | −6 | 12 |
| Total | −3 | 15 |
A scenario range is not a confidence interval. It does not automatically measure statistical uncertainty or cover every real execution condition. It describes only what changes under the alternatives explicitly included. If gaps, spread, or liquidity are omitted, those risks remain outside the calculation.
Furthermore, selecting the worst outcome trade by trade does not guarantee a global bound when the strategy has memory. An early exit can enable another profitable entry or prevent a later loss. Local combinations may not correspond to any feasible joint trajectory. In state-dependent systems, simulate complete scenarios and explain which subsequent decisions change.
7. Measure where path dependence is concentrated
Counting ambiguous candles is a start, but a candle matters to a trade only when it contains relevant events while the strategy can act. A month with thousands of broad ranges may have little effect on a robot that remains flat. Ten candles around its entries may dominate interpretation of the result.
Record how many trades depend on an unobserved resolution and how much of the outcome changes when that resolution changes. In the ten-trade example, three are ambiguous: thirty percent. Their scenario uncertainty totals eighteen units, enough to change the total’s sign. The percentage and the impact answer different questions and should be reported together.
Concentration matters more than an isolated coverage figure. Check whether cases cluster within a session, around an event, or in a particular order type. Perhaps the issue affects only a trailing stop; perhaps it disappears for positions exiting at the close. This separation directs data improvements and avoids spending resources where they do not alter the conclusion.
Also compare candle size with the strategy’s relevant distances, without turning that relationship into definitive proof. A broad range relative to stop and target suggests both may lie inside it; a narrow range does not guarantee absence of ambiguity when entry occurs near a boundary. Use the diagnostic to select cases for inspection, rather than automatically declaring validity.
Retain a sample of unambiguous decisions as controls. Reviewing only conflicts can miss common timing, activation, or quotation-side errors affecting every trade. The audit must distinguish missing information from implementation failure: acquiring ticks does not necessarily fix code that applies an order before creating it.
Finally, do not remove ambiguous trades and present the remainder as the complete robot’s result. You have changed the sample and perhaps selected particular contexts. An identifiable subset can be reported, but you must show how many cases were excluded and why the conclusion is restricted to that subset.
8. Finer timeframes reduce a particular ignorance
If an hourly candle is ambiguous, observing its five-minute candles may show that the target occurred in an earlier interval than the stop. That resolves the order between those two intervals. If both levels remain inside the same subcandle, ambiguity persists at a smaller scale. More rows help when they supply the required detail, not merely because they are more numerous.
Suppose the first subcandle reaches a high of 104.5 while its low stays at 99; a later subcandle falls to 97. For an already open long position with target 104 and stop 98, the target is reached in an earlier interval under our price and execution assumptions. The overall hourly candle no longer needs arbitrary priority for that case.
But if the first subcandle has a high of 104.5 and a low of 97.5, both levels compete within it. Moving from one hour to five minutes has not revealed their order. Sufficient resolution is defined relative to the rule’s events. It can differ between trades and between strategies using the same file.
Check that finer data actually cover the period being investigated and that their aggregates are compatible with the coarser source. Differences in time zone, construction, or provider can prevent exact reconciliation. Do not insert subcandles from another source as though they seamlessly complete an original record. Define what each source represents and which discrepancies are accepted.
TradingView notes limits to lower-timeframe coverage and retains assumptions when that detail is absent. Inspect which historical segments actually benefit from the chosen configuration. TradingView, historical bar detail.
A useful comparison keeps the strategy fixed and changes only execution information, recording which trades change. If you also retune parameters after seeing the new results, you introduce another search and can no longer attribute the whole difference to resolution. Separate the data improvement from subsequent selection of the robot.
9. Ticks are not an execution guarantee either
A more detailed quotation sequence can show the observed event order in that source. It does not independently establish that an actual order would have filled completely at every displayed price. Quotation side, availability, size, delay, and intermediary conditions still matter. Resolving the path is necessary for some rules, but it is not equivalent to reproducing all execution.
In Forex, a buy and a sell do not necessarily use the same side of the price. A high in a midpoint series does not establish that a particular exit was reached on the required bid or ask. OANDA’s candle documentation distinguishes bid, ask, and midpoint components; these are different representations. OANDA, candle price components.
Do not turn a chart touch into a universal fill confirmation. Our abstract-unit exercise assumed exact fills to isolate sequence. When moving to execution evaluation, replace that assumption with explicit conditions and appropriate data, while keeping any still-unobserved limitations visible.
Jumps also change continuous-crossing reasoning. If a quotation moves directly from 100 to 97, a stop at 98 does not imply an execution opportunity existed at exactly 98. The model must specify its treatment of the first subsequent price and any slippage. Do not draw a continuous line between ticks and then treat every point on that line as an available quotation.
A feed can also contain gaps, duplicates, or coverage changes. Verify its integrity around relevant trades. Missing events may mean that updates were not received, rather than that the market remained stationary. The investigation of timestamps helps separate event order, receipt, and availability.
Spread and accounting details are developed in bid, ask, and spread in Forex. The essential boundary here is narrower: a detailed observation reduces certain ambiguities, but does not authorize removing execution assumptions that the observation does not contain.
There is another, less conspicuous boundary: level rounding. If the strategy calculates an entry at a price the instrument does not permit, adjustment to an allowed increment can move it. Near the high or low, this adjustment can turn an apparent touch into no touch. Preserve the requested level and the applied level, and check comparisons at the model’s stated precision. Do not repair an inconvenient equality by adding an arbitrary tolerance after inspecting the result.
Tied timestamps also need interpretation. Two quotations sharing a written second may have a known sequence order, or that order may have been lost during export. If one reaches the target and another the stop, sorting rows by price artificially determines the outcome. Storage resolution and original sequence are different information. When the latter is unavailable, the case remains uncertain even if the file is labelled tick data. That limitation belongs in the report just as candle ambiguity does.
10. Design adversarial cases before trusting the curve
You can build a small collection of artificial candles without needing market history. Their purpose is not to measure profitability, but to check that the simulator respects its declared state and policy. Every case should have an expected answer or explicit indeterminacy before the code runs.
Include an already open position with both levels inside the range, an entry after the low, a trailing stop changing after a high, and an order cancelled before a touch. Add a case in which neither level is reached and another in which only one can activate. This variety prevents the program from appearing correct merely because every test favors its default priority.
Also test the simulator’s abstention: “I cannot determine it” is a valid result. A research engine can retain indeterminate cases for later analysis. If it requires a number to continue, that number should be attached to a visible convention. Forcing certainty in every case does not improve the evidence.
A useful property checks that two trajectories with the same OHLC can generate different outcomes when the rule depends on the path. If your detailed engine always returns the same answer because it consults only final highs and lows, it may be ignoring the events you supplied. Equal outputs do not demonstrate robustness when they arise from information loss inside the code itself.
Another check verifies that a closed position receives no subsequent movements. In the initial example, the fall to 96 after exiting at 104 does not change that trade. If the report assigns the entire range as the position’s excursion, it may be measuring the complete candle instead of the actual exposure period. That difference affects diagnostic metrics even when final profit appears correct.
When requesting AI assistance, supply explicit paths and expected transitions. Ask for an explanation when OHLC is insufficient. Avoid an instruction such as “make the backtest as realistic as possible” without observable criteria: it permits too many hidden choices and makes it difficult to know what has actually been verified.
11. When to simplify the strategy, and what changes
Not every investigation needs to reconstruct every intrabar movement. You can choose rules that decide from completed closes and execute afterward, update stops only at defined moments, or restrict transitions allowed within an interval. These choices reduce dependence on unavailable information, but they also change the strategy’s economic behavior.
Suppose you replace a continuously trailing stop with one recalculated at the close and effective in the next candle. The new design can avoid using a future high within the current candle. In exchange, it retains an earlier stop for longer and may endure a decline that the continuous design would have attempted to limit. Do not present them as equivalent implementations merely because both use a three-unit distance.
An honest simplification has its own name, rules, and limits. Clearly studying a variant you can simulate is preferable to claiming reproduction of another whose required information is missing. The choice depends on the question: understanding an idea, comparing rule families, and approximating a particular operation require different levels of detail.
You can also preserve the original design while limiting the conclusion. For example, report that close-based entries are reproduced while intrabar exits remain scenario-dependent. This separation helps decide where to invest effort. It neither requires discarding the whole robot nor permits accepting its complete result as demonstrated.
If you change resolution or policy after seeing an unfavorable curve, record the change as a new research decision. Choosing among engines until one produces the best outcome is another form of selection. The backtest configuration should not become an invisible parameter optimized for convenience.
A reproducible review preserves the previous report, explains which assumption changed, and shows the affected trades. This lets you distinguish correction of an error from a deliberate variant. Both may be reasonable, but they answer different questions and deserve traceability that survives the final chart.
12. The question accompanying every result
Before accepting a backtest figure, ask which part depends on observed prices and which part depends on a reconstructed sequence. Seek a concrete answer: which orders compete, how many trades are affected, which policy resolves them, and how much the result changes under feasible alternatives. “We use candles” or “we use ticks” is too general to conclude the review.
Confidence grows when dependencies become visible, not when they disappear from the report. A result sensitive to an intrabar priority can indicate a need for better data, a redesigned rule, or acknowledgment that current evidence cannot decide. None of these responses automatically means the idea is profitable or useless.
When studying TradeAndRoll material, remember the initial Forex scope and that market CSV data belong exclusively to the demo. Examining rules and source code enables these questions, but does not promise that every file contains ticks, all quotations, or a receipt history. The material’s resolution and conditions must be verified independently.
A final exercise combines the article’s three situations. Write down an already open position, a pending entry, and a trailing stop. Give them the same extremes where appropriate and draw two compatible paths. For each path, list which order exists before the next event. If the answers differ, you have demonstrated path dependence; you have not yet assigned probabilities or identified what actually happened.
Then seek the minimum additional information that would resolve each case. Perhaps it is enough to know that the high occurred in an earlier subcandle. Perhaps you need quotation order within one second. Perhaps you still need an execution model even with that information. This question turns a vague request for “more data” into a verifiable requirement.
A candle remains a powerful way to summarize the market. Its limit appears when we ask the summary to remember a history it discarded. Recognizing that limit helps construct clearer tests, compare implementations intelligently, and reject apparent certainty before it becomes confused with evidence about a robot.



