Sell a specific completed buy order
bowguo last edited by
Let's say I first place a buy order. After this order is completed, I now hold a long position.
Then I place a sell order with the same size, and after the sell order is completed, will I hold both a long and a short positions, or my position is zero because the previous long position is now sold?
If the sell order sells the previous long position, then I have a question. If I have two completed buy orders with different executed prices, now I place a sell order, which buy position will be sold exactly? How can I sell a specific buy order?
vladisld last edited by
@bowguo You may think about the orders as instructions to change the current position. The order doesn't constitute the position itself.
The position is maintained by the broker per data ( not per order ). So if you buy order has completed - your position for particular data has increased and vice versa for sell order.
Regarding the multiple orders with different prices - once again the position is not maintained per order - so if you sell part of your position - the position will just decrease by the size of the sell order - regardless of any previous order history that brought your position to the current state.
Diving a little bit deeper however, the real broker maintains the base price for every single share/unit of the entity you are holding in your position - for various purposes ( tax calculation, average price calculation, margin requirements and so on ). Some brokers even allow you to select the tax calculation policy if multiple lots of the same entity with different prices are part of your position.