// Hourly highs/lows using 1 min data responding to a request on PRC
//
// (but could also work for other timeframes lower than 1h, as long as each hourly candle and each lower timeframe candle end simultaneously, otherwise the code would be more complicated than this one - Noobywan)
if OpenHour<>OpenHour[1] then
barinit=intradaybarindex
endif
Maxthishour=highest[max(1,intradaybarindex-barinit+1)](high)
Minthishour=lowest[max(1,intradaybarindex-barinit+1)](low)
if high > Maxthishour[1] then
drawcandle(open,high,low,close) coloured(0,255,200)
elsif low < Minthishour[1] then
drawcandle(open,high,low,close) coloured(200,0,0)
//else
//drawcandle(open,high,low,close)
endif
return //Maxthishour as "Maxthishour", Minthishour as "Minthishour"