I am currently stuck in pine script, trying to get the highest high and lowest low of specific timeframe, lets say 0000 to 0400 , of the current day
pdh = security(tickerid, 'D', high)
pdl = security(tickerid, 'D', low)
This here gets us the highest high and lowest low of this current day. Note this is with pine script V4.