Leader visible range -> the follower range showing the same wall-clock window.
Both ends go through the fractional conversions, so the window survives a
different bar interval (a daily follower under an hourly leader ends up with
a fraction of a bar visible, which is exactly right) and survives an end
landing in the empty margin to the right of the last bar, where indexToTime
has nothing to return.
Returns null when the answer would be meaningless rather than guessing:
either chart empty, a single-bar follower (every time maps to index 0, so the
span collapses), or a non-finite endpoint.
A follower whose history does not overlap the window at all is not refused.
timeToIndexFloat extrapolates at the edge bar spacing, so it scrolls into
its own empty margin and shows nothing, which is the truth. Clamping it back
onto its last bars would show the user a different period than the leader.
Leader visible range -> the follower range showing the same wall-clock window.
Both ends go through the fractional conversions, so the window survives a different bar interval (a daily follower under an hourly leader ends up with a fraction of a bar visible, which is exactly right) and survives an end landing in the empty margin to the right of the last bar, where
indexToTimehas nothing to return.Returns null when the answer would be meaningless rather than guessing: either chart empty, a single-bar follower (every time maps to index 0, so the span collapses), or a non-finite endpoint.
A follower whose history does not overlap the window at all is not refused.
timeToIndexFloatextrapolates at the edge bar spacing, so it scrolls into its own empty margin and shows nothing, which is the truth. Clamping it back onto its last bars would show the user a different period than the leader.