- ago
I had a situation today, where a cover order could not be filled due to slippage in high volatile morning trading. The order went into CancelPending status in the next minute. After a few minutes, when new alerts showed up they couldn't be staged in Order Manager even with 'AutoPlace' button depressed. Doing right click from the Order Manager to remove the CancelPending order didn't work. I had to shutdown and restart WL7 to get rid of CancelPending order and after that new alerts were getting auto-placed again. It actually happened twice today morning. I did cover the order manually from Thinkorswim.

Here's a snapshot showing alert being shown in the chart but not in the Order Manager.
0
1,214
15 Replies

Reply

Bookmark

Sort
- ago
#1
You could delete the order block in the Order Manager?
0
- ago
#2
I tried to right click on the order block in Order Manager and do delete many times - it didn't work.
0
- ago
#3
Is this resolved in latest build?
0
- ago
#4
QUOTE:
Doing right click from the Order Manager to remove the CancelPending order didn't work.

Normally you should be able to remove a CancelPending block by right clicking it and choosing "Kill Selected Orders". If that didn't work, did you try to remove the Order Block itself by clicking on it and choosing "Remove this Order Block"?
0
Cone8
 ( 4.98% )
- ago
#5
There were changes made in this area the day after you posted. Have you had a problem since then?
0
- ago
#6
I'm still facing problem with CancelPending status. Here's what I have noticed in day trading with TD.

1) If an order was placed for a quantity say 50 shares and if broker filled the order in different quantities say 45 shares and 5 shares at different time (1-4 secs apart) and/or at different price then WL7 is unable to correctly determine if order was filled. It seems to put the order in "CancelPending" status.

Here's the case happening today at 8:50AM


At TD, it showed 45 share cover order (buy to close) was filled but the 46 share buy long order was filled in 45 and 1 quantities separately at different time and at different price.


Due to cancelPending order in order manager, signal to sell and go short that was generated at 8:51AM didn't get placed in order manager. After I removed the CancelPending order manually, the next minute at 8:52AM an order to cover and go long was placed which got filled leading to 3x larger position (46 x 3 = 138 share) getting opened since short order didn't happen. I had to manually sell 92 shares to match the position size set in the strategy.


2) If an order was placed and it took > 15 secs then sometimes order gets moved to "CancelPending" status. Most of the time order is reported as "Error" status since WL7 is unable to determine if order was filled or not.

3) I did notice that if I set my local time to be -10 secs behind TWS then WL7 is able to determine in most of the cases that order is filled. There was only 1 incident of CancelPending status. But with +3 secs local time, WL7 is unable to determine whether short orders were filled and there were about 5-6 cases of CancelPending status.

Biggest issue with CancelPending status is that it prevents placing of new orders even if signals are generated. One has to manually right click and do "Kill selected Orders (Remove from Order Manager)". With new WL7, doing right click and removing the order works now. No need to restart WL7. But in day trading, this causes missed trades if you're not aware on-time of a CancelPending order being present.

Another case of CancelPending occured at 2:09:05PM - no idea why.


After CancelPending occurred at 2:09PM there were no trades placed. I had to manually do the closing trade at 2:58PM (2 minutes before market close):


Strategy did generate signals at 2:13PM, 2:21PM, 2:30PM and 2:57PM but none got placed.



Here's the following fixes/enhancements needed to make automated day trading more effective in WL7:
1) I think WL7 may need to wait for more time to determine if order is filled.

2) Not sure if WL7 can see if different quantities of same order filled by broker is indeed part of the same order. If transaction show quantities are different, can WL7 may be add them to see if it matches the order's position size? If not, then it can go to CancelPending or Error status.

3) If order did go into CancelPending status, can you provide a user option to Auto-remove CancelPending orders just like for Cancelled, Completed and Strategy Cancelled cases?

4) Another issue I noticed is connection issue with TD at 2:11PM. It happened after the CancelPending order being present.


Is it possible to fix this issue by auto-reconnecting to TD again?
0
Cone8
 ( 4.98% )
- ago
#7
Thanks for the detailed report.

QUOTE:
I had to manually sell 92 shares to match the position size set in the strategy.
Probably a good idea to reduce risk, but if you use the Portfolio Sync Trading Preference to exit the full Position Quantity, the next exit signal should exit all the shares in the account.

QUOTE:
1) I think WL7 may need to wait for more time to determine if order is filled.
I think what may be occurring is that the second part of the order is filling after a the cancel is place and before we get the order status update. We can probably force a status check before submitting the cancel to fix this.

Edit -
I just looked at your image again. Even the partial fill hadn't been recognized because there was no Fill Qty or Price. Anyway, maybe we can duplicate this in a Paper mode to work on it.

QUOTE:
2) Not sure if WL7 can see if different quantities of same order filled by broker is indeed part of the same order.
Sure it can.

QUOTE:
3) If order did go into CancelPending status, can you provide a user option to Auto-remove CancelPending orders
Probably this is a moot point if the source of the problems is fixed. CancelPending means we're waiting for a response, so that's a useful indication that either the order is still "active" or that there's a problem communicating.

QUOTE:
4) Another issue I noticed is connection issue with TD at 2:11PM. It happened after the CancelPending order being present.
Are you implying that it did not auto reconnect? Did you have to restart?
0
- ago
#8
Instead of exiting full position quantity, It would be great if WL7 Portfolio Sync can detect that 138 shares of the same symbol are in the portfolio and 46 shares is the position size of the activated strategy - it would automatically sell 92 shares in the next signal to sync up. Similarly, if -138 shares in portfolio then it would buy 92 shares to sync to -46 shares in the next exit signal.

Yes, I agree if you can fix CancelPending issues then I don't need Auto-Remove option. However, is there a way to allow next signal orders to pass through?

QUOTE:
Are you implying that it did not auto reconnect? Did you have to restart?

Yes, it didn't auto-reconnect. I didn't have to restart but when I started doing back testing, it reconnected on its own.
0
Cone8
 ( 4.98% )
- ago
#9
QUOTE:
automatically sell 92 shares in the next signal to sync up.
Once Wealth-Lab auto-trading matures more, these could be interesting advanced features:

- Keep Strategy Shares Synchronized - (what you suggested)

- Keep Strategy Synchronized with Account - if you didn't get a limit order fill in real life, the strategy would detect it and continue in the logic block with the current limit order.

Re: Pass through
There's always a way to do anything, but the risk is duplicating orders. If everything works properly, it shouldn't be necessary.
0
- ago
#10
I noticed the #1 reason for CancelPending occurs when strategy position size changes AND short position is being covered. I'm using fixed position value amount and based on share price, I shorted 43 shares of ARKK but when go long/cover signal was generated then based on share price and fixed amount - 42 shares will be long. When attempting to cover 43 shares, TD will do it as 1 and 42 separately. This is where WL7 is unable to see if 43 share cover order was filled and moves order into CancelPending status. There is no issue when attempting to short shares and position size changes. Before the cover, 42 shares are sold, and 43 shares are shorted without any breaking up of the order by TD, so no CancelPending issue was seen.



For now, I'll use fixed shares/contract option to see if the issue persists.
0
Cone8
 ( 4.98% )
- ago
#11
Thanks for the update. We're tracking it and will likely to this with the Version 8 update. Since there's no way to use Paper Mode with the API, we're flying a little blind here since the only account we have to test with is my IRA, which cannot short.

QUOTE:
I shorted 43 shares of ARKK
The 1 and 42 are separated due to partial fills. It can't have anything to do with a subsequent order.

I think this issue may have more to do with getting order statuses updated. When might need to poll for it more frequently, or force an update when a new order is in the queue.
0
- ago
#12
After moving to fixed shares/contract option I have seen no CancelPending issues with TDA so far. However, I tried to place the order with IB today to get faster fills and all orders remained in Active status even though they got filled immediately. In the next minute, the Active orders got changed to CancelPending status. I had to kill these manually.



The 45 shares orders that got filled are with TDA and the 90 shares order that remained Active are with IB using the same strategy.

I noticed the timestamp in the order manager is at 5th second and in TWS it shows order got filled at 4th second. I checked WL reported local - TWS is +2.6 seconds


Is it because of the time difference WL couldn't determine whether the order got filled?
0
Cone8
 ( 4.98% )
- ago
#13
We tried to implement TDA's native "Replace Order" for Wealth-Lab 8, but it's not working. As far as we can tell, the API isn't doing what it says it should. I'm in contact with the TDA's API gurus, but it takes many days to get a response.

Time-difference - no. It has no effect for order status. I haven't seen a problem with IB statuses, but we'll check on it. Maybe something changed in the upgrade for TWS 10 compatibility.
0
- ago
#14
I'm using TWS 981.3i build March 22, 2022 stable version. Do I need to move to version 10 to resolve this issue?
0
Cone8
 ( 4.98% )
- ago
#15
QUOTE:
Do I need to move to version 10 to resolve this issue?
Absolutely!
See the Change log for IB Provider Build 16 for the compatibility message - https://www.wealth-lab.com/extension/detail/InteractiveBrokers#changeLog

Upgrade to the the latest IB Provider (Build 20) and you must use at least TWS version 10.12 for compatibility. I think 10.15 is available.
0

Reply

Bookmark

Sort