In BackTest, how do i refer current day open from OPEN vector with Minute periodicity(5min)?

Mine is intraday strategy based on 5min charts which refers current day open price. If i simply refer OPEN or REF(OPEN,75), in a 5min periodicity it will refer the latest bar or 75 bars from the current bar,(ie if opportunity opens on 10 th bar, then REF(OPEN,75) will refere to previous days bar, but i need to refer current day OPEN price in a 5min periodicity.

How to code that?

If you want to refer the day candle data exactly you have to use day timeframe, as per above calculation will not be accurate if you calculate by multiplying the time frame candles manually