Support Board
Date/Time: Thu, 26 Jun 2025 22:25:53 +0000
cancel order behaviour
View Count: 756
[2021-11-02 14:43:08] |
User268846 - Posts: 17 |
Hello, if there is a unfilled limit parent order with two attached orders and the order cancel function is called for the parent order id then the parent order and the child orders will be cancelled. so far thats clear. now lets assume the parent order is filled and the order cancel function is called for the parent order id: 1) what error code will order cancel return in this case? 2) Will the open position be closed or will the order cancellation just fail since the order is filled already? 3) will the attached orders be cancelled even the parent is filled already? we have an issue with error handling in one of our automated trading studies. Our server is located in chicago and the chart update interval is 10ms (so overall latency is about 50ms). we still facing the situation that sc.GetTradePosition says order is not filled but it already is filled due to the delay. What we basically want to do is cancel all orders if parent is not filled, but do nothing if parent is filled already. When we just cancel all orders we sometimes end up with a position without attached orders. thats why our idea is now to just cancel the parent order hoping that if its already filled that order cancellation will fail and the position and attached orders will stay in the market. thanks |
[2021-11-03 00:46:24] |
Sierra_Chart Engineering - Posts: 20004 |
1) what error code will order cancel return in this case?
No error2) Will the open position be closed or will the order cancellation just fail since the order is filled already? Position will not be closed. Order cancellation of the parent will fail. 3) will the attached orders be cancelled even the parent is filled already?
No. There is specific handling to prevent that. However, confirm in your case to be sure.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2021-11-03 00:46:59
|
[2021-11-03 08:01:55] |
User268846 - Posts: 17 |
Thank you, I will confirm |
To post a message in this thread, you need to log in with your Sierra Chart account: