The following page covers information regarding closing orders that bots manage.
A bot's exit condition can include a profit target and/or a variety of stops (stop loss percent, delta value, ITM percent). For profit target orders, the bot will utilize a standing order in your brokerage account. This means that the bot will enter a closing order that is good-til-cancel and monitor that order until and if it fills. For stop loss orders, bots will not utilize standing orders. Instead, the bot will monitor current market conditions and will assemble and submit closing orders if your position meets its exit condition.
When closing a credit spread, a bot will sometimes buy back the entire spread and sometimes only buy back the short strike. To start with, your current bot setting for 'Close Short Strike Only' will take precedent.
When 'Close Short Strike Only' is set to Yes (checked), then the bot will only buy back the short side of the spread. The long strike will be left alone to expiration.
When 'Close Short Strike Only' is set to Now (unchecked), then the bot will attempt to close the entire spread rather than just the short strike. This works as long as the long strike has a bid on it. If you are trying to buy-to-close a spread, and there is no bid on the long strike, your closing order will never fill. To avoid this problem, your bot will monitor the bid on the long strike throughout the day, as if the long strike has no bid, your bot will cancel and re-enter your closing order to only include the short strike. If the bid comes back on the long strike, the bot will cancel and re-enter the order again, this time to include the full spread. This is done automatically for you.
The decision as to whether or not to include the long strike of the spread are made every time a closing order is entered. This includes the initial placement, cancel and re-enter adjustments, manual cancel and replace, stop losses, and force closures. Every time a closing order is entered, the bot will check the current bot settings and whether or not there's a bid on the long strike to decide whether it closes the entire spread or just the short strike.
Before a bot enters a new order to close a position, it'll check to make sure that you're currently holding that position in your brokerage account. If you are not holding that position in your brokerage account, the bot will not submit the closing order because your broker will view this order as a request to initiate a new position rather than close an existing one.