How to sell all the BOUGHT stocks

I know that alpaca_api.cancel_all_orders() will cancel all orders which were meant to sell (OCO) the existing bought stocks. Is there a smart way to sell all the orders before the market closes? Can I add any parameters to the OCO that will make sure that it will trigger before the market closes, regardless of whether sell conditions meet or not?