7 days Pro+ free · no cardStart my free trial

Validate a trading strategy without hindsight · 1 / 5

Find when a pivot signal actually became available

A marker drawn on a turning point does not prove you could have traded there. Reconstruct what the rule knew at each bar close before assigning an entry price.

Athenum7 minUpdated:

Define a rule before replaying the chart

For this original exercise, a strict pivot low must be lower than the lows of two preceding and two following completed five-minute bars. Equal lows do not qualify. Evaluate only at bar close. The two preceding lows are 103 and 102; the candidate bar makes a low of 100. At that point it is only a candidate: neither following bar is known.

A chart may place its label on the candidate after later bars confirm the condition. Store candidate time and available-at time separately. An indicator that updates during an unfinished candle is not automatically defective, but a replay must reproduce the information its actual decision rule used. Do not replace live knowledge with a final cleaned chart.

Confirmation is still not execution

Even after confirmation, an order needs submission and a fill. Record those timestamps independently. A rule evaluated after the 10:15 close cannot assume an earlier intrabar low as its entry, and it cannot guarantee execution at the closing price either. Latency, spread and a gap can change the executable price.

Replay rejected candidates as well as confirmed ones. If the second following bar makes a new low below 100, the candidate fails. Keeping only the historical markers that survived makes it impossible to audit what a trader saw while the setup was forming.

A legal 0.81R result versus a hindsight 16R result

The candidate occupies 10:00–10:05 UTC. The following bars have lows 101 and 102, so confirmation occurs at 10:15. Assume the next executable purchase is 104.20, a fixed stop is 99.50 and a later hypothetical exit is 108. One unit risks 4.70 and earns 3.80: 3.80 / 4.70 = 0.8085R before costs.

Assigning a fictitious entry at 100 instead gives risk 0.50 and profit 8, or 16R. Both divisions are mathematically correct; only the first entry respects this signal's availability. Neither calculation predicts that the exit at 108 will occur.

Hypothetical five-minute replay, all times UTC
IntervalLowState at close
10:00–10:05100Candidate; two future bars unknown
10:05–10:10101One qualifying following bar
10:10–10:15102Confirmed at 10:15
10:15–10:20103After initial confirmation
  1. 1Candidate low
  2. 2Following bars close
  3. 3Signal confirmed
  4. 4Order submitted
  5. 5Fill recorded
Keep the marker's bar, knowledge timestamp and execution record separate.

A backdated marker is not an executable order

If the 10:10–10:15 bar instead falls to 99.80, the original candidate fails. A backtest cannot keep the earlier 100 entry while discarding the failed confirmation. Write tie rules and confirmation delays before seeing outcomes.

Before acting

  • Freeze pivot and tie rules.
  • Store candidate and available-at timestamps.
  • Separate confirmation, submission and fill.
  • Replay rejected candidates.
  • Recalculate risk from the executable entry.

Check your understanding

Under the same completed-bar rule, require three following bars instead of two. The third low is 103. When is the original candidate confirmed?

Show the explained answer

At 10:20 UTC, when the third following bar closes. The low 103 satisfies the strict comparison with 100, but its completed value was not available at 10:15. The entry must follow the new confirmation time.

Sources and further reading

Continue with Athenum