Changing stops on a open position

@cksrc You asked

So essentially, the position is closed, losses/profits updated and the order is re-opened at a new enter price?

Not exactly. Positions and orders are two separate things. A position is what you currently have in your account. An order is a request to buy or sell more. The position isn’t impacted by replacing the stop loss price. If you had 10 shares of XYZ then you still have 10 shares of XYZ. Only the order is closed and then replaced with a new order but now with your updated stop price.

When you submit an order, that request is sent to an execution partner (you can think of it as the exchange) for execution. When the order is actually executed (eg you buy 10 shares of XYZ) that is called ‘filling the order’. When an order ‘fills’ it simply means it is executed. Also note that orders fill asynchronously (or may not fill at all). The comment in the docs where it says

If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected

That simply means the replace request was sent to the execution partner (asynchronous to your algo) and, if when it gets to that partner, the order has already been executed then it’s too late to replace the order.

2 Likes