Profile Picture

TWS OrderFilled remains as Pending Orders

Posted By alpha23 3 Years Ago
Message
Posted Thursday May 15 2014
When placing an order via TWS plugin, the order remains as pending after filled using real accounts (in both 'Live System' tab and LiveOpenPositions file) but correctly changes status to filled when using simulated accounts.

Below is the TWS logs against the live accounts (using advisor configuration). This may related to the latest required changes with TWS (currently using 944.3c).

Please advise asap.

Thanks, Duane


2014-05-15 08:52:44.3791   Symbol   Order   Position   Event   Details
2014-05-15 08:52:44.3791   n/a   n/a   n/a   Connect   Connecting...
2014-05-15 08:52:44.5450   n/a   n/a   n/a   Connect   Connected to TWS
2014-05-15 08:52:44.5450   n/a   n/a   n/a   Connect   Done with connect process
2014-05-15 08:52:44.5557   n/a   n/a   n/a   Connect   SyncAccountState() called
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:usfuture
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:eurofarm
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:usfuture.us
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:hkfarm
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:usfarm.us
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2104: Market data farm connection is OK:usfarm
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2106: HMDS data farm connection is OK:ushmds.us
2014-05-15 08:52:44.6533   n/a   -1   n/a   IB error/warning   2106: HMDS data farm connection is OK:ushmds
2014-05-15 08:52:48.5606   n/a   n/a   n/a   OpenOrderEnd   
2014-05-15 08:52:48.5606   n/a   n/a   n/a   RequestExecutions   Requesting buy executions, requestID = 0
2014-05-15 08:52:48.5606   n/a   n/a   n/a   RequestExecutions   Requesting sell executions, requestID = 1
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: 100 Price: 94.47
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: 138 Price: 94.47
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: 100 Price: 94.47
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: -270 Price: 94.47
2014-05-15 08:52:48.7705   n/a   n/a   n/a   ExecDetails   ### Execution Ignored - Negative Fill
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: 270 Price: 94.47
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: -68 Price: 94.47
2014-05-15 08:52:48.7705   n/a   n/a   n/a   ExecDetails   ### Execution Ignored - Negative Fill
2014-05-15 08:52:48.7705   HYG   16789   n/a   ExecDetails: untracked order   20140515 08:42:50 Bought Size: 68 Price: 94.47
2014-05-15 08:52:48.7705   n/a   n/a   n/a   ExecutionDataEnd   Request ID: 0
2014-05-15 08:52:48.7705   n/a   n/a   n/a   ExecutionDataEnd   Request ID: 1
2014-05-15 08:52:48.7871   n/a   n/a   n/a   CurrentTime   Account time updated: 5/15/2014 08:52:47 Current time: 5/15/2014 08:52:48 Diff: -00:00:01.7861448
2014-05-15 08:52:48.7871   n/a   n/a   n/a   CurrentTime   Current time update recieved, ending connect sync process
2014-05-15 08:52:48.7871   n/a   n/a   n/a   Connect   SyncAccountState ended
2014-05-15 08:52:51.3047   HYG   16790   1   SubmitOrder   16790: Market Buy HYG 0/338 - Submitted
2014-05-15 08:52:51.4668   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: 100 Price: 94.44
2014-05-15 08:52:53.4957   HYG   16790   1   OrderStatusPendingSubmit   Order status updated
2014-05-15 08:52:53.4957   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: 100 Price: 94.44
2014-05-15 08:52:55.4985   HYG   16790   1   OrderStatusPendingSubmit   Order status updated
2014-05-15 08:52:57.4986   HYG   16790   1   OrderStatusSubmitted   Order status updated
2014-05-15 08:52:57.5103   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: 138 Price: 94.44
2014-05-15 08:52:59.5134   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:52:59.5134   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: -270 Price: 94.44
2014-05-15 08:52:59.5134   HYG   16790   1   ExecDetails   ### Execution Ignored - Negative Fill
2014-05-15 08:53:01.5141   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:01.5317   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: 270 Price: 94.44
2014-05-15 08:53:01.5317   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: -68 Price: 94.44
2014-05-15 08:53:01.5317   HYG   16790   1   ExecDetails   ### Execution Ignored - Negative Fill
2014-05-15 08:53:03.5328   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:03.5328   HYG   16790   1   ExecDetails   20140515 08:52:51 Bought Size: 68 Price: 94.44
2014-05-15 08:53:05.5334   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:07.5352   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:09.5371   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:11.5393   HYG   16790   1   OrderStatusFilled   Order status updated
2014-05-15 08:53:13.5415   HYG   16790   1   OrderStatusFilled   Order status updated
Posted Friday May 16 2014
Is the OrderFilled method in your system getting called at all?

As far as I can see from the log, the TWS plugin is sending the fills. If anything, it might be sending fills for twice the amount actually filled, since it gets the fills on the "master" account, then gets negative fills (which are ignored by RightEdge) on that account and positive fills on the "child" account.

Have you set the PositionManager's PositionOverfilledAction? Another thing that might be happening is that the fills are being reported twice, leading RightEdge to think that there's an overfill and submitting an order to close the position. So what you're seeing as the pending order might be that compensating order that's been submitted.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems