What's happening here? Pretty sure my algo is legitimately cancelling the order, but it ends up being listed invalid on live algo page as opposed to backtest. Not making a difference in practice but I'd like to understand what's happening.
2017-02-15 15:41:32 New Order Event: OrderId:29 Symbol:CHTR Quantity:0 Status:CancelPending
2017-02-15 15:41:32 New Order Event: Id:29 Symbol:CHTR Quantity:0 Status:CancelPending
2017-02-15 15:41:32 New Order Event: OrderId:29 Symbol:CHTR Quantity:0 Status:Canceled
2017-02-15 15:41:32 New Order Event: Id:29 Symbol:CHTR Quantity:0 Status:Canceled
2017-02-15 15:41:32 New Order Event: OrderId:29 Symbol:CHTR Quantity:0 Status:Invalid
2017-02-15 15:41:32 New Order Event: Id:29 Symbol:CHTR Quantity:0 Status:Invalid
2017-02-15 15:41:33 Brokerage Warning: Order Canceled - reason:
Jared Broad
Hi Petter. There are many reasons why an order can be marked as invalid. Rather than speculating on them please attach a project to review. If you cannot share it publicly please share through the support tab in the IDE.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Alexandre Catarino
We have written a simple algorithm in an attempt to reproduce the issue.
In this algorithm, we create a limit order with a target price 1% higher than the current one. As soon as the order is submitted, we cancel it:
02/16/2017 16:58:00 UTC: Submit Order: (1) - OrderId: 1 New Limit order for 100 units of CHTR at limit 326.639 Status: Unprocessed 02/16/2017 16:58:00 OrderID: 1 Symbol: CHTR Status: Submitted BrokerId: 1 02/16/2017 16:58:00 OrderID: 1 Symbol: CHTR Status: Submitted 02/16/2017 16:58:00 UTC: Cancel Order: (1) - Status: Unprocessed 02/16/2017 16:58:00 OrderID: 1 Symbol: CHTR Status: CancelPending 02/16/2017 16:58:00 OrderID: 1 Symbol: CHTR Status: Canceled BrokerId: 1 02/16/2017 16:58:00 OrderID: 1 Symbol: CHTR Status: Canceled
The last state of the order is "Canceled" which is also shown in the Live Algorithm Orders tab.
Petter Hansson
Hi Alex,
thank you for your illustration of a case where one ends up in cancelled state, I will try it out on IB paper trading soon.
I'll try to create an isolated test project for what happened in my case. I've been rewriting my order execution code past day so I'm not sure it's going to happen as frequently as previously, might take some time therefore.
Petter Hansson
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!