It takes time for the order to fill and the position to change.
Is this condition being evaluated on a later bar update in OnBarUpdate()?
Is this condition being evaluated when the position changes in OnPositionUpdate()?
You may consider submitting the exit stop and limit in OnExecutionUpdate() when the entry order fills.

Comment