input time = 0000;
input agg = AggregationPeriod.HOUR;
def bar = SecondsFromTime(time) == 0;
#Value Method
#H/L of Agg displayed as Values @Time of Current Candle H/L
input Use_Value_Method = yes;
plot h = if bar then high(period = agg) else Double.NaN;
h.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
h.SetDefaultColor(Color.GREEN);
h.SetHiding(!Use_Value_Method);
plot l = if bar then low(period = agg) else Double.NaN;
l.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);
l.SetDefaultColor(Color.RED);
l.SetHiding(!Use_Value_Method);
#Bubble Method
#H/L of Agg displayed as Bubbles @Time of Current Agg H/L
input Use_Bubble_Method = no;
AddChartBubble(Use_Bubble_Method and bar, high, h, color = Color.GREEN);
AddChartBubble(Use_Bubble_Method and bar, low, l, up = no);
#Alternative Bubble Method
#@H/L of Agg displayed as Bubbles @Time of Agg H/L
input Use_Alternative_Bubble_Method = no;
input show_lines = yes;
plot hi = if Use_Alternative_Bubble_Method and bar then high(period = agg) else Double.NaN;
plot lo = if Use_Alternative_Bubble_Method and bar then low(period = agg) else Double.NaN;
hi.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
lo.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
hi.SetHiding(!show_lines);
lo.SetHiding(!show_lines);
AddChartBubble(Use_Alternative_Bubble_Method and bar, hi, hi, color = Color.GREEN);
AddChartBubble(Use_Alternative_Bubble_Method and bar, lo, lo, up = no);
#