Hi Sa.
I'm glad I could help. If activeOrder flag is removed, then a limit buy order is placed every minute, as long as the indicator value of RSI is less than 20, this might result in an open position in multiple options contracts.
Liquidating multiple options contracts in the portfolio, without the activeOrder flag, calls for a different input for LimitOrder() in the liquidation section of the code. Also, we need to add Transactions.CancelOpenOrders(contract) to cancel existing orders that did not get filled.
In the attached backtest, I've made adjustments to your code so that the algorithm buys option contracts, using LimitOrder(), as long as the value of the indicator RSI is less than 20. The algorithm emits a limit sell order for the options contracts in the portfolio using LimitOrder() if the value of RSI is larger than 40. Keep in mind, a fill is not guaranteed if LimitOrder() is used to liquidate security.