You can adjust the two specific times and also timeframe as you like. Here's the code:
# chg_of2_bars
def bn = BarNumber();
def na = Double.NaN;
# times , (EST)
input start = 1022;
input end = 1042;
def t1 = if secondsfromTime(start) >= 0 and secondstillTime(start) >= 0 then 1 else 0;
def t2 = if secondsfromTime(end) >= 0 and secondstillTime(end) >= 0 then 1 else 0;
def high1 = if t1 then high else high1[1];
def low1 = if t1 then low else low1[1];
def high2 = if t2 then high else high2[1];
def low2 = if t2 then low else low2[1];
def higherHigh = Max(high1, high2);
def lowerLow = Min(low1, low2);
def diff = higherHigh - lowerLow;
def per = 100 * diff / lowerLow;
addlabel(1, (higherHigh + " - " + lowerLow + " = " + diff), color.yellow);
addlabel(1, per + " % chg", color.yellow);
#plot zhigh1 = if t1 then higherHigh else double.nan;
#zhigh1.SetPaintingStrategy(PaintingStrategy.POINTS);
#zhigh1.SetDefaultColor(Color.cyan);
#zhigh1.setlineweight(5);
#plot zlow2 = if t2 then lowerLow else double.nan;
#zlow2.SetPaintingStrategy(PaintingStrategy.POINTS);
#zlow2.SetDefaultColor(Color.cyan);
#zlow2.setlineweight(5);
# chg_of2_bars
def bn = BarNumber();
def na = Double.NaN;
# times , (EST)
input start = 1022;
input end = 1042;
def t1 = if secondsfromTime(start) >= 0 and secondstillTime(start) >= 0 then 1 else 0;
def t2 = if secondsfromTime(end) >= 0 and secondstillTime(end) >= 0 then 1 else 0;
def high1 = if t1 then high else high1[1];
def low1 = if t1 then low else low1[1];
def high2 = if t2 then high else high2[1];
def low2 = if t2 then low else low2[1];
def higherHigh = Max(high1, high2);
def lowerLow = Min(low1, low2);
def diff = higherHigh - lowerLow;
def per = 100 * diff / lowerLow;
addlabel(1, (higherHigh + " - " + lowerLow + " = " + diff), color.yellow);
addlabel(1, per + " % chg", color.yellow);
#plot zhigh1 = if t1 then higherHigh else double.nan;
#zhigh1.SetPaintingStrategy(PaintingStrategy.POINTS);
#zhigh1.SetDefaultColor(Color.cyan);
#zhigh1.setlineweight(5);
#plot zlow2 = if t2 then lowerLow else double.nan;
#zlow2.SetPaintingStrategy(PaintingStrategy.POINTS);
#zlow2.SetDefaultColor(Color.cyan);
#zlow2.setlineweight(5);