resolveReplayStart
Documentation / @elitechart/core / resolveReplayStart
Defined in: replay/replay-state.ts:135
Resolve the starting index when entering replay.
atIndexprovided → use it directly (clamped).atTimeprovided → binary-search for the first bar ≥atTime.- Neither → fall back to
Math.floor(barCount * 0.75)— a typical "75% through history" anchor so users have some look-forward room.
Parameters
bars
readonly {
time: number;
}[]
opts?
atIndex?
number
atTime?
number
Returns
number