Not sure if it's what you're trying to do, but you can set orders with IB such that a trade is only active during a certain time window. For example, if you have an open position of 100 shares of SPY, you could create a stoploss order with the stop price set to 100, and the time in force...