I think the following might do it, but I'm not sure (and markets are closed right now)...
### EXAMPLE BREAKOUT DETECTOR
declare upper;
#### ALERT/ALARM SETTINGS
input alert = no;
input noise = {"Bell", "Chimes", default "Ding", "Ring", "NoSound"};
def box_top = 3338;
def box_bot = 3332;
# detect if regular trading hours
def RTH = If (SecondsFromTime(0930) >= 0 and SecondsTillTime(1600) >= 0, 1, 0);
# combinations that constitute an alert
def bull = high > box_top;
def bear = low < box_bot;
# hitting opening range resets one-shot alarm
def reset = low >= box_bot and high <= box_top;
# alert trigger conditions
def trigger = RTH and (bull or bear) and reset[1];
Alert(
alert AND trigger,
if bull then "BULL BREAKOUT" else "BEAR BREAKOUT",
Alert.BAR, noise
);