Time of highest high? You get timestamp of the event and then use it as a variable. Or for example if trading session is N hours with total T bars and event of highest high is 3 hrs after session start, then number of bars is (N hours - 3 - time left for the session end)/N multiplied by T