Primarily for equities as no provision has been made to control the timing at which the open close high low are determined, indeed, I see no straightforward mechanism to do so in Pinescript.
Development aided by: but with the entirely different calculations presented in "Secrets of a Pivot Boss" by Franklin Ochoa. And far cleaner and less-redundant code.
To...