I'm assuming this software must already exist, even if designed for IB customers only, i.e. to have one's outstanding orders (for options) cancelled upon certain conditions. What have you seen?
Hard for me to believe I'm the first man in history to come up with the idea to avoid being a sitting duck???