Need code for open range breakout

I need coding for a simple startegy.

at 9.15 AM
on given stock
1.In Gap up case … Sell the stock at previous day High with 10 points SL
2.in Gap Down case , buy the stock at previous day Low with 10 points SL.
3. In normal case… Buy above previous day High and Sell below Previous day low with 10 points SL
4.in point 3 , if either 1 executes , cancel the other order