However, in order to maximize profit, I need to manually execute the exit.
Nevertheless, the strategy does not detect that my position has been closed and when the exit procedure is executed, it "closes" the current position, but instead it opens a position in the opposite direction.
I use the comparison (Position.MarketPosition == MarketPosition.Flat/Long/Short) to determine if I have a open position.
But it seams that the MarketPosition is not updated when I close a position externally/manually.
Is there a way to avoid this issue?
Thanks in advance.
Comment