Support Board
Date/Time: Sat, 04 Jan 2025 07:54:38 +0000
Post From: Error: "Synchronized Internal Position to current Service Position. Current Position qua..
[2016-05-03 21:15:44] |
User713273 - Posts: 409 |
Yes im in PST time zone. Also find new dialogue with IB API Support below. Thx again eggnog999: Hi Josh- Im getting this error - Order 2016-04-29 06:32:07.519 AAPL-OPT-20160429-94-P Synchronized Internal Position to current Service Position. Current Position quantity: 0 Unspecified eggnog999: Why this is the case? Im currently using a 3rd party charting software provider (Sierra Chart) Joshua B: You see that error in eSignal ? eggnog999: This is also directly from IB TWS log eggnog999: 06:31:56:554 -> 3-6-10713-Cancelled-0-1-0-691491877-0-0-9368395--4-2-10713-202-Order Canceled - reason:- 06:31:56:617 -> 3-6-10712-Cancelled-0-1-0-691491876-0-0-9368395--4-2-10712-202-Order Canceled - reason:- eggnog999: no Sierra chart Joshua B: Oh ok, what is the underlying issue that the logs are being reviewed for? I would not recommend examining the logs unless there is an underlying issue- there will be many diagnostic messages eggnog999: Underlying issue is attached orders are being placed in TWS and then are being deleted Joshua B: ok, it might be easiest to upload the full log- I can take a look at it Joshua B: Do you see these orders as attached in Tws or do they never appear that way? eggnog999: Yes they appear attached and the typically 8 seconds later they are deleted, I assume this indicates that TWS did not provide a Trade Position update for this Option symbol thus the canceling occurs Joshua B: Can you give an example of such an order? I can take a look here. eggnog999: yes, give me a minute eggnog999: These are the messages I recieve in TWS 06:31:56:554 -> 3-6-10713-Cancelled-0-1-0-691491877-0-0-9368395--4-2-10713-202-Order Canceled - reason:- 06:31:56:617 -> 3-6-10712-Cancelled-0-1-0-691491876-0-0-9368395--4-2-10712-202-Order Canceled - reason:- eggnog999: Cancel a Limit target and stop orders Joshua B: These orders were today with user eggnog999 ? eggnog999: no yesterday eggnog999: sry should have clarified eggnog999: The question at hand, would TWS ever cancel attached orders when placed in TWS Joshua B: no problem, I'm taking a look eggnog999: ok, also the stops/targets are not really attached they are separate exit orders that are sent once parent order is filled Joshua B: oh ok, I thought they were intended to be sent as attached orders eggnog999: no, sry again eggnog999: Once parent is fully executed we then have a 2nd order sent, all these orders are then opened in TWS eggnog999: the issue comes 8-9 seconds after execution that the stop/target orders are then cancelled Joshua B: Do you have the full API log? It can be emailed to api@interactivebrokers.com eggnog999: um let me check, does IB file away API logs that were sent over the last week or so? eggnog999: if so can you check from yesterday the API log should be there Joshua B: The API log will actually upload with the diagnostics Joshua B: *will actually not upload Joshua B: The Tws log will though eggnog999: yes, i uploaded yesterdays log eggnog999: Ctrl+Alt+U Joshua B: Ok I'm taking a look eggnog999: thx eggnog999: test Joshua B: The log shows several messages "Handling incoming CancelOrder message" Joshua B: Was that intentional? eggnog999: No Joshua B: It appears that cancel order messages were sent approximately 7-8 seconds after the orders were placed eggnog999: yes eggnog999: thats the issue eggnog999: Is TWS responding with correct order quantity to our 3rd party provider (Sierra Chart)? Joshua B: Do you mean the correct position sizes? eggnog999: Yes, Sierra Chart wonders if a Trade Position Quantity is not updated to reflect that the Internal Trade Position Quantity (Parent) has been synchronized to the Service Position Quantity (STOP/TARGET) then that would be the cause of the service position being cancelled. eggnog999: as we get this message "Order 2016-04-29 06:32:07.519 AAPL-OPT-20160429-94-P Synchronized Internal Position to current Service Position. Current Position quantity: 0 Unspecified U1644808" Joshua B: That doesn't look like an actual API message though that would be sent back to Sierra eggnog999: Its not, its the logging Sierra Chart provides eggnog999: but im wondering if IB is not providing position request then request comes back as 0 and in turn the stop/target are then cancelled Joshua B: looking through the log, I haven't seen any position updates being requested or sent back Joshua B: I do see the trade execution reports which indicate that the orders have filled eggnog999: so by not seeing "position updates being requested or sent back" this in turn means the orders are most likely being cancelled? eggnog999: or cancelled by SC? Joshua B: they are being actively cancelled yes eggnog999: ok, so to clear the orders are being cancelled by SC not IB TWS? Joshua B: yes thats correct eggnog999: Can u also do me a favor and copy the API log section and paste into chat? Joshua B: yes it will take a minute eggnog999: ok i can wait thx Joshua B: Here is one snippet- 2016-05-02 12:09:36.850 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Handling incoming PlaceOrder message. ... 2016-05-02 12:09:44.804 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Handling incoming CancelOrder message. 2016-05-02 12:09:44.804 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Cancelling orderId {10720}. 2016-05-02 12:09:44.819 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] OrderId {10720} is cancelled. Joshua B: Here is another - 2016-05-02 12:09:44.819 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Handling incoming PlaceOrder message. ... 2016-05-02 12:09:44.819 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Handling incoming CancelOrder message. 2016-05-02 12:09:44.819 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] Cancelling orderId {10719}. 2016-05-02 12:09:44.819 [BH] INFO [JTS-EServerSocket-65] - [9368395:62:76:1:0:0:0:INFO] OrderId {10719} is cancelled. |