Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 13:10:28 +0000



CancelAllOrders and place new order

View Count: 789

[2014-12-10 02:13:33]
onnb - Posts: 660
I have a study that auto trades. In some cases, it places a limit order and if that order doesn't get filled within a certain time period, it cancels it and immediately places a market order. In replay it works fine but running it live, I have a Trade Activity Log where the order gets canceled but a new order is not placed.

I have a couple of questions about this:

1. In general, is it ok to cancel a working order and then immediately place a new order (all in the same iteration of the study function)? We are thinking that maybe we need to wait a bit in between canceling one order and placing a new one.
2. In this case, does SC cancel the order with the broker and only after being canceled places the new order or does all this happen in parallel?



[2014-12-10 04:00:52]
Sierra Chart Engineering - Posts: 104368
When you say the new order is not placed what exactly does that mean? do you not see it at all? If so, check your code and see what the problem is.

1. Yes. No problem at all. But whether the connected trading service will accept the order or not, we do not know. Sometimes the risk management system can reject it due to margin requirements.

2. It all happens at once.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account