Take Profit and Cancel all buttons were causing a null reference exception intermittently. What was happening, is there was still an active OCO order. OCO orders do not have an OrderCollection, so the linq statement that was getting the stop orders or all active orders for a symbol, didn't filter out where the OrderCollection was null.
Take Profit and Cancel all buttons were causing a null reference exception intermittently. What was happening, is there was still an active OCO order. OCO orders do not have an OrderCollection, so the linq statement that was getting the stop orders or all active orders for a symbol, didn't filter out where the OrderCollection was null.