When I go live with interactive brokers (all backtests work without issue) I get the following error:

“During the algorithm initialization, the following exception has occurred:  Error getting open orders from brokerage: Object reference not set to an instance of an object.Object reference not set to an instance of an object. in BrokerageTransactionHandler.cs:line 1303 Object reference not set to an instance of an object.”

 

Although I'm not 100% sure this is the cause, the error has only started happening since I <manually> opened  a short position via the IB interface, leading me to believe there is some janky interplay between QC and IB syncing in cases where there are manually opened trades. Does anyone have any experience with this? Indeed, before I had to restart the algorithm, the opening of the short position caused my reported equity in the QC live view to increase according to the value of the position, which makes some logical sense but is obviously not ideal/typical/expected behaviour.The easiest way for me to confirm that this position is what is causing the problem is to close the short position manually and try again, but this has drawbacks for obvious reasons.

Any advice much appreciated,

 

All the best,

M