Ouch - just had a look at the code as I am not trading at present.
Not much you can do when the management of a stock decide to pull it from the market.All you could so is make sure your stop losses are in place and not hold volatile stocks over night. You may not make as much but I guarantee you will sleep better and if it is any consolation all traders have had this experience (or only the one's that are not telling pokies).