01 Identify Session Ranges
Define session boundaries and segment the dataset.
for each day D in dataset:
for each session S in sessions:
start = session_start(D, S)
end = session_end(D, S)
bars[S] = bars where time >= start and time < endOutput: session_bars[S]
02 Detect First Break
Locate the first valid break satisfying the structural rules.
for each session S:
ib = initial_balance(S)
for each bar b after ib window:
if break_condition(b, ib):
first_break = b
breakOutput: first_break_event[S]
03 Measure Target Hit
Evaluate if and when the target is reached inside the outcome window.
for each event E:
window = bars after E up to W
if target_level reached in window:
outcome[E].hit = True
outcome[E].time = first_hit_bar
else:
outcome[E].hit = FalseOutput: target_hit[E]
04 Calculate R-Multiple
Convert the outcome into a normalized risk unit.
for each event E:
R = (outcome_price - entry_price)
/ risk_per_trade
outcome[E].R = R
outcome[E].sign = sign(R)Output: R_stats[E]