I'm developing a strategy, which will be added multiple times to the same instrument using the same account.
I'm unable to acquire the information of the Account position & Account orders/order updates. My goal is to prevent the strategy from placing entry orders if the Account is either in a Position, or has open entry orders, and if possible I would like to keep the managed approach.
All which I could find regarding this topic didn't help. Strangely enough, while I've tried different approaches to access different information about the Account of the strategy, the information often doesn't seem to represent what it should. E.g. PositionAccount.MarketPosition is always flat, even if the strategy calling this method is not. I can confirm that the account I'm accessing is definitely an instance of the selected Account. I've been testing using the playback for context.
So, how do I read the Account position and how do I know if the Account has open entry orders?

Comment