Cancel/Replace limit order fails with "Cancelled due to an existing conflicting order"
Author: doccanter
Creation Date: 6/8/2020 5:53 PM
profile picture

doccanter

#1
After reading the orders FAQ and a number of previous threads, it seems that the following statement governs the cancelling/replacing of limit orders:

"Changes in a stop or limit price will also cause the previous stop or limit order to be canceled before the new order is placed. In the case of live trading, Wealth-Lab Pro employs the Cancel and Replace method, which is handled by Fidelity's backend trading subsystem"

However, I am seeing different results in my live Fidelity trading. When my sell logic generates a new limit order, I see where the previous limit order status is cancelled/pending and the new limit order shows below, and after a delay the previous order will show as cancelled (as expected) but the new limit order will error out with an explanation of something like "cancelled due to an existing conflicting order". Do you have any thoughts as to why this is occurring? Would it matter if the share count in the two orders were not equal? Thanks in advance
profile picture

Eugene

#2
profile picture

doccanter

#3
if you would, let me review my understanding of the cancel and replace method:
1) there is an existing, open SellAtLimit order for one security at Fidelity
2) the next time the program goes through the sell logic it generates another SellAtLimit order for the same security, although the number of shares and the limit price will likely differ somewhat (I do have the trading option enabled to sell all existing shares even if the order amount is slightly different)
3) under this scenario, the first order would be cancelled first and then the second order would be placed active with Fidelity

if this understanding is correct, it seems to me that the reason I may be getting the above-described condition is because the system is trying to place the second order while the first order is still in a "cancel pending" state and it therefore "sees" an existing conflicting order and errors out on the second order. One thing I've observed is that sometimes the cancel and replace executes correctly (maybe at times of lower market volume?) and to me that lends credence to my hypothesis. What do you think of this theory? If you think it has merit any thoughts as to how I can address this issue to get a true cancel and replace execution all the time? Thanks
profile picture

superticker

#4
Just to clarify, Wealth-Lab runs a simulation, which has nothing to do with what's happening at the exchange. What's happening at the exchange is controlled by you and the Orders window, not the simulation running on Wealth-Lab.

So when you do a cancel/replace on the Orders window, you are talking to the exchange, not Wealth-Lab. Leave Wealth-Lab out of it. Now Wealth-Lab can post orders to the Orders windows, but you have to do something to get those orders placed, replaced, or canceled once that happens.

Now Auto-Trading may work differently. But I don't use that; too dangerous. I like to stay in the loop when the trigger is pulled. And I only trade a small percentage of the Wealth-Lab Alerts.
profile picture

doccanter

#5
Well, I may have described my situation poorly, but I do understand the difference between the WL program and the live fidelity orders tool. I am still curious as to why the orders are not always cancelling/replacing on the live Fidelity orders tool based on my understanding of how the WL program transmits order signals. If someone can shed some light on my previous question I would appreciate it , thank you
profile picture

Cone

#6
Hi doc,
I saw that behavior in testing last year, but later was not able to duplicate it when I got a programmer's attention about it. Indeed, the condition occurred when the order quantity was changed to match the position, the order errored out with the "conflicting order" message. This is coming from the backend, so at this point probably the best you can do is turn off the "exit all shares" option and make sure that you send the correct size for the exit.

We recommend using Raw Profit sizing while trading live to eliminate Portfolio Sizing effects. When your Portfolio goes up or down several percent, then just adjust the RP sizing for that trading day to match your desired portfolio % wager. Hope that makes sense.
profile picture

doccanter

#7
Thank you Cone! Going to try this today
profile picture

gregChen

#8
Tried this before. If bought 2500 shares from Fidelity
One can sell:
100 shares first at limit, and 2400 shares at market

One has to manually cancel the 100 share limit order from WL Orders Window and then place a market order to sell 100 shares.

Have not found a way for limit orders to Auto-trading in Fidelity using WL.

If WL could generates "Cancel Order" for active limit orders, a new market order generated from an alert should be able to override the pervious limit order. So WL-Pro users can use limit orders for Auto-Trading. Thanks
profile picture

Cone

#9
Hi gregChen, it doesn't sound like you're really Auto-Trading. Auto Trading would certainly cancel orders that were not currently "alerts". If you're staging orders and then clicking to place them, then yes, you have to manually cancel Day TIF orders that you no longer want to be Active. Does that make sense?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).