this is how I would personally do it if you're plotting a rolling high and low of the day:
function run()
{
BarPeriod = 30; // you're using 30 minutes
vars Close = priceClose();
int period = 48; // 30 minutes * 48 is 24 hours
vars high = series(MaxVal(Close, period);
vars low = series(MinVal(Close, period);
plot("high", high, MAIN, BLUE);
plot("low", low, MAIN, RED);
}