Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 03:32:55 +0000



Post From: V 2412 : closing position with market order does not cancel attached order

[2022-07-07 12:05:32]
User877753 - Posts: 152
I use Scale Out functionality.

Scenario :
sell contract ; market order
sell another contract market; market order
buy to cover one contract; market order
buy to cover another contract; market order


ActivityType  DateTime  TransDateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance  ExchangeOrderID  ClientOrderID  TimeInForce  Username
Orders  2022-07-07 13:55:26.302692  2022-07-07 13:55:26.302684  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3862.75 | AO=1. Attached Order | Client side OCO order  8347    Limit    Buy  3860.25    Pending Child-Client      Sim1  Close  8346            0      Good till Canceled  
Orders  2022-07-07 13:55:26.306639  2022-07-07 13:55:26.306635  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3862.75 | AO=1. Attached Order | Client side OCO order  8348    Stop    Buy  3865.25    Pending Child-Client      Sim1  Close  8346            0      Good till Canceled  
Orders  2022-07-07 13:55:26.306647  2022-07-07 13:55:26.306645  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3862.75 | AO=1  8346    Market  1  Sell      Order Sent      Sim1  Open              0      Day  
Orders  2022-07-07 13:55:26.306655  2022-07-07 13:55:26.306654  [Sim]ES-202209-GLOBEX  Simulated order accepted  8346  8346  Market  1  Sell      Open      Sim1  Open              0      Day  
Orders  2022-07-07 13:55:26.306688  2022-07-07 13:55:26.306686  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.75 Ask: 3863.00 Last: 3862.75  8346  8346  Market  1  Sell      Filled  3862.75  1  Sim1  Open              0      Day  
Fills  2022-07-07 13:55:26.306692  2022-07-07 13:55:26.306671  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.75 Ask: 3863.00 Last: 3862.75  8346  8346  Market  1  Sell      Filled  3862.75  1  Sim1  Open    -1  8346.1        0      Day  
Orders  2022-07-07 13:55:26.306722  2022-07-07 13:55:26.306721  [Sim]ES-202209-GLOBEX  Auto-sent child from parent fill  8347    Limit  1  Buy  3860.25    Order Sent      Sim1  Close  8346  -1          0      Good till Canceled  
Orders  2022-07-07 13:55:26.306727  2022-07-07 13:55:26.306726  [Sim]ES-202209-GLOBEX  Auto-sent child from parent fill  8348    Stop  1  Buy  3865.25    Order Sent      Sim1  Close  8346  -1          0      Good till Canceled  
Orders  2022-07-07 13:55:26.306733  2022-07-07 13:55:26.306732  [Sim]ES-202209-GLOBEX  Simulated order accepted  8347  8347  Limit  1  Buy  3860.25    Open      Sim1  Close  8346  -1          0      Good till Canceled  
Orders  2022-07-07 13:55:26.306737  2022-07-07 13:55:26.306736  [Sim]ES-202209-GLOBEX  Simulated order accepted  8348  8348  Stop  1  Buy  3865.25    Open      Sim1  Close  8346  -1          0      Good till Canceled  
Orders  2022-07-07 13:55:33.677465  2022-07-07 13:55:33.677458  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3863.25 | Scaling in | AO=0  8349    Market  1  Sell      Order Sent      Sim1  Open    -1          0      Day  
Orders  2022-07-07 13:55:33.677490  2022-07-07 13:55:33.677488  [Sim]ES-202209-GLOBEX  Simulated order accepted  8349  8349  Market  1  Sell      Open      Sim1  Open    -1          0      Day  
Orders  2022-07-07 13:55:33.677521  2022-07-07 13:55:33.677519  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3863.00 Ask: 3863.25 Last: 3863.25  8349  8349  Market  1  Sell      Filled  3863.00  1  Sim1  Open    -1          0      Day  
Fills  2022-07-07 13:55:33.677526  2022-07-07 13:55:33.677516  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3863.00 Ask: 3863.25 Last: 3863.25  8349  8349  Market  1  Sell      Filled  3863.00  1  Sim1  Open    -2  8349.1  3863.25  3862.75    0      Day  
Orders  2022-07-07 13:55:33.677556  2022-07-07 13:55:26.306732  [Sim]ES-202209-GLOBEX  Scale-In: Increasing quantity of child order by 1 due to order fill of the same side.  8347  8347  Limit  1  Buy  3860.25    Open      Sim1  Close  8346            0      Good till Canceled  
Orders  2022-07-07 13:55:33.677578  2022-07-07 13:55:33.677577  [Sim]ES-202209-GLOBEX  Increasing order quantity (Scale In). Using specified quantity of 2. Using existing order price. Requested Price: 3860.25. Requested Quantity: 2  8347  8347  Limit  1  Buy  3860.25    Pending Modify      Sim1  Close  8346  -2          0      Good till Canceled  
Orders  2022-07-07 13:55:33.677585  2022-07-07 13:55:33.677584  [Sim]ES-202209-GLOBEX  Simulated order modify complete  8347  8347  Limit  2  Buy  3860.25    Open      Sim1  Close  8346  -2          0      Good till Canceled  
Orders  2022-07-07 13:55:33.677589  2022-07-07 13:55:26.306736  [Sim]ES-202209-GLOBEX  Scale-In: Increasing quantity of child order by 1 due to order fill of the same side.  8348  8348  Stop  1  Buy  3865.25    Open      Sim1  Close  8346            0      Good till Canceled  
Orders  2022-07-07 13:55:33.677598  2022-07-07 13:55:33.677597  [Sim]ES-202209-GLOBEX  Increasing order quantity (Scale In). Using specified quantity of 2. Using existing order price. Requested Price: 3865.25. Requested Quantity: 2  8348  8348  Stop  1  Buy  3865.25    Pending Modify      Sim1  Close  8346  -2          0      Good till Canceled  
Orders  2022-07-07 13:55:33.677603  2022-07-07 13:55:33.677602  [Sim]ES-202209-GLOBEX  Simulated order modify complete  8348  8348  Stop  2  Buy  3865.25    Open      Sim1  Close  8346  -2          0      Good till Canceled  
Orders  2022-07-07 13:55:33.677612  2022-07-07 13:55:33.677602  [Sim]ES-202209-GLOBEX  Updating move to breakeven stop reference price to 3862.875  8348  8348  Stop  2  Buy  3865.25    Open      Sim1  Close  8346            0      Good till Canceled  
Orders  2022-07-07 13:55:42.808854  2022-07-07 13:55:42.808847  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3862.75 | Scaling out | AO=0  8350    Market  1  Buy      Order Sent      Sim1  Close    -2          0      Day  
Orders  2022-07-07 13:55:42.808883  2022-07-07 13:55:42.808881  [Sim]ES-202209-GLOBEX  Simulated order accepted  8350  8350  Market  1  Buy      Open      Sim1  Close    -2          0      Day  
Orders  2022-07-07 13:55:42.808912  2022-07-07 13:55:42.808910  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.50 Ask: 3862.75 Last: 3862.75  8350  8350  Market  1  Buy      Filled  3862.75  1  Sim1  Close    -2          0      Day  
Fills  2022-07-07 13:55:42.808916  2022-07-07 13:55:42.808907  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.50 Ask: 3862.75 Last: 3862.75  8350  8350  Market  1  Buy      Filled  3862.75  1  Sim1  Close    -1  8350.1  3863.25  3862.75    0      Day  
Orders  2022-07-07 13:56:03.320741  2022-07-07 13:56:03.320734  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry | Last: 3862.75 | Scaling out | AO=0  8351    Market  1  Buy      Order Sent      Sim1  Close    -1          0      Day  
Orders  2022-07-07 13:56:03.320804  2022-07-07 13:56:03.320802  [Sim]ES-202209-GLOBEX  Simulated order accepted  8351  8351  Market  1  Buy      Open      Sim1  Close    -1          0      Day  
Orders  2022-07-07 13:56:03.320828  2022-07-07 13:56:03.320826  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.50 Ask: 3862.75 Last: 3862.75  8351  8351  Market  1  Buy      Filled  3862.75  1  Sim1  Close    -1          0      Day  
Fills  2022-07-07 13:56:03.320833  2022-07-07 13:56:03.320823  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3862.50 Ask: 3862.75 Last: 3862.75  8351  8351  Market  1  Buy      Filled  3862.75  1  Sim1  Close      8351.1  3862.75  3862.50    0      Day  

Attached orders still in place : they execute a couple of minutes later :
ActivityType  DateTime  TransDateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance  ExchangeOrderID  ClientOrderID  TimeInForce  Username
Orders  2022-07-07 13:59:32.184748  2022-07-07 13:59:32.184740  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3865.00 Ask: 3865.25 Last: 3865.25  8348  8348  Stop  2  Buy  3865.25    Filled  3865.25  2  Sim1  Close  8346            0      Good till Canceled  
Fills  2022-07-07 13:59:32.184771  2022-07-07 13:59:32.184733  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3865.00 Ask: 3865.25 Last: 3865.25  8348  8348  Stop  2  Buy  3865.25    Filled  3865.25  2  Sim1  Open  8346  2  8348.1        0      Good till Canceled  
Orders  2022-07-07 13:59:32.184815  2022-07-07 13:59:32.184812  [Sim]ES-202209-GLOBEX  Canceling order due to sibling fill  8347  8347  Limit  2  Buy  3860.25    Pending Cancel      Sim1  Close  8346  2          0      Good till Canceled  
Orders  2022-07-07 13:59:32.184835  2022-07-07 13:59:32.184832  [Sim]ES-202209-GLOBEX  Simulated order canceled  8347  8347  Limit  2  Buy  3860.25    Canceled      Sim1  Close  8346  2          0      Good till Canceled  

Current position : long two contracts !!!!

Trade service Log:
Scale-In: Increasing quantity of child order by 1 due to order fill of the same side. | Symbol: [Sim]ES-202209-GLOBEX | TradeAccount: Sim1 | InternalOrderID: 8347 | ServiceOrderID: 8347 | Current Status: Open | 2022-07-07 13:55:33.677
Scale-In: Increasing quantity of child order by 1 due to order fill of the same side. | Symbol: [Sim]ES-202209-GLOBEX | TradeAccount: Sim1 | InternalOrderID: 8348 | ServiceOrderID: 8348 | Current Status: Open | 2022-07-07 13:55:33.677

Then sending Flatten instruction :
ActivityType  DateTime  TransDateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance  ExchangeOrderID  ClientOrderID  TimeInForce  Username
Orders  2022-07-07 14:03:21.933606  00:00:00.000000  [Sim]ES-202209-GLOBEX  No working orders to cancel for Symbol and Account                Unspecified      Sim1                0        
Orders  2022-07-07 14:03:21.933632  2022-07-07 14:03:21.933626  [Sim]ES-202209-GLOBEX  ES-202209-GLOBEX[M] 10 Sec #1 | User order entry. Flatten&Cancel | Last: 3864. Current Position quantity: 2 | AO=0  8352    Market  2  Sell      Order Sent      Sim1  Close    2          0      Day  
Orders  2022-07-07 14:03:21.933645  2022-07-07 14:03:21.933644  [Sim]ES-202209-GLOBEX  Simulated order accepted  8352  8352  Market  2  Sell      Open      Sim1  Close    2          0      Day  
Orders  2022-07-07 14:03:21.933664  2022-07-07 14:03:21.933662  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3864.00 Ask: 3864.25 Last: 3864.00  8352  8352  Market  2  Sell      Filled  3864.00  2  Sim1  Close    2          0      Day  
Fills  2022-07-07 14:03:21.933666  2022-07-07 14:03:21.933660  [Sim]ES-202209-GLOBEX  Trade simulation fill. Bid: 3864.00 Ask: 3864.25 Last: 3864.00  8352  8352  Market  2  Sell      Filled  3864.00  2  Sim1  Close      8352.1  3866.25  3862.25    0      Day