if the code puts me in a position with a stop in place and I manually exit the position by placing a market order... then manually cancel the stop order...I am flat
however, Position.MarketPosition == MarketPosition.Flat code does not pick up the fact that the account is flat.
what am I missing?
does Position.MarketPosition == MarketPosition.Flat not refer to the account status and not just order status?

Comment