A few times now I have gotten a runtime error due to a 5 minute timeout waiting for a brokerage response to an order submission. When the error happens the order is simultaneously submitted (successfully, it would appear) and the algorithm attempts to reconnect. The reconnection has always been successful, so while this has been a burden on my intraday trading algorithm, I have put up with it as unavoidable.

Yesterday when this same thing happened, the order did not immediately fill, so when the algorithm came back online it began a loop of errors due to my testing for the previous order's .AverageFillPrice for potential order updates. I've attached the relevant log lines below and can provide more info if necessary. Is there a workaround to losing all ticket data (and all variables, for that matter) upon an error and reconnection? Thank you.

216315_1674052478.jpg