# Plot yesterday's high / low with chart bubbles
input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def high = high(period = aggregationPeriod);
def low = low(period = aggregationPeriod);
plot h1 = high(period = aggregationPeriod)[1];
plot l1 = low(period = aggregationPeriod)[1];
input showBubble = yes;
def SR = showBubble and !IsNaN(close) and IsNaN(close [-1] ) && HighestAll(BarNumber());
AddChartBubble(SR, h1, "PrevHi", Color.Dark_Orange);
AddChartBubble(SR, l1, "PrevLo", Color.Dark_Orange);