I am using the Addons Framework to develop an Addons with which to copy operations from one account to another. I have enough advance but I need some help with something.
I need to check when the account is flat with no trades. I am using the syntax in OnExecutionUpdate or OnPositionUpdate:
private void OnExecutionUpdate(object sender, ExecutionEventArgs e)
{
if (e.MarketPosition == MarketPosition.Flat)
{
marketflat == true;
}
}
Please, could you help me to know how to automatically detect if an account is flat

Comment