declare upper;
def skip_up = if high[2] < low[0] then 1 else 0;
def skip_dn = if low[2] < high[0] then 1 else 0;
def upper_bound = if skip_up == 1 then high[2] else upper_bound[1];
def lower_bound = if skip_up == 1 then low else lower_bound[1];
def upper_bound2 = if skip_dn == 1 then high else upper_bound2[1];
def lower_bound2 = if skip_dn == 1 then low[2] else lower_bound2[1];
plot a = if upper_bound[-1] == upper_bound then upper_bound else Double.NaN;
plot b = if lower_bound[-1] == lower_bound then lower_bound else Double.NaN;
AddCloud(a, b, Color.BLUE, Color.BLUE);
plot c = if upper_bound2[1] == upper_bound2 then upper_bound2 else Double.NaN;
plot d = if lower_bound2[1] == lower_bound2 then lower_bound2 else Double.NaN;
AddCloud(c, d, Color.PLUM, Color.PLUM);