Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 04:35:00 +0000



Flatten & Cancel at Set Time did not work

View Count: 652

[2023-09-20 20:46:42]
User370531 - Posts: 55
I want to be out of all positions before market close and have set a time of 4:30p EST to flatten all CME positions and cancel all working orders. I was watching it live to see if it will work, and I got this error below. I had 20 open positions and each had a corresponding TP and SL working order.

Order cancellation failed | Teton CME Order Routing (Order cancel reject). Info: Message rate limit reached.

I couldn't find any information on this error. What is it related to and how can I fix it going forward?
[2023-09-20 23:26:12]
Sierra_Chart Engineering - Posts: 17190
Who is your clearing firm? You need to contact them, and ask them to increase the message rate limit for your account and explain what has happened. Probably would be good to set it to something like 100 messages per 10 seconds to be safe.

We can help you with this. First let us know who your clearing firm and broker is.

Also Teton order routing is going to offer this functionality on the server side. It has been developed, and will be released soon for live trading. It will not be affected by a message limit like this.
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: 2023-09-20 23:26:26
[2023-09-21 04:52:15]
User370531 - Posts: 55
Thank you - Optimus Futures is my broker and and Ironbeam is my clearing firm. How should I determine what to set the message rate limit to? Is it based on how many open positions/working orders there may be that need to be flattened?
[2023-09-21 10:28:45]
Sierra_Chart Engineering - Posts: 17190
The number of messages that needs to be allowed is equal to the number of orders that has to be canceled at once, and the additional number of new orders to flatten the positions that have to be sent at that time. And then you would want to increase that by 25% to have an additional safe margin.
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
[2023-09-21 10:53:28]
User370531 - Posts: 55
So if I want to be able to cancel 1000 orders at a time (high enough limit that I won’t actually reach), it should be 1000 + 2000 (for the TP/SL order cancellations) = 3000. Can we set it to that, any downside to setting a very high limit (eg: 100,000)?
[2023-09-21 12:11:34]
Sierra_Chart Engineering - Posts: 17190
Yes there is a major downside to setting a very high limit for the order rate, this will result in fines from the exchange, and shutdown of the iLink connection jeopardizing everyone else. No clearing firm would ever allow that unless you have your own dedicated iLink.

Are you really canceling that number of orders 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, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-21 12:12:13
[2023-09-21 14:46:45]
User370531 - Posts: 55
In backtesting, my auto trading may be in up to 500 contracts at a time, and since this is based on day margin, I need to close out before market close. If a high limit is not feasible due to the issues you described, I suppose a better approach would be to flatten the orders more slowly than immediately all at once. Is there a way to do this in Sierra Chart such that I don’t need to be manually involved in closing these out? I don’t actually need them all closed out in an instant, I am fine with a few minute window.
[2023-09-21 14:50:55]
John - SC Support - Posts: 36309
You do not need to worry about the rate for Backtesting, as that is in Simulation Mode and not actually sending orders to the exchange.

You need to think about how many orders you are dealing with for live trading.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-09-21 15:41:00]
User370531 - Posts: 55
What I meant is that based on my backtesting (outside of SC), I am expecting to have potentially 500 or more contracts open that I need to close before market close. Since I don’t need them to be flattened immediately ( a few minute window is fine), is there another approach without changing the message limit?
[2023-09-21 16:15:58]
John - SC Support - Posts: 36309
The only other option would be to have a custom study that closed out the orders for you in some controlled method. Refer to the following:
Automated Trading From an Advanced Custom Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-09-21 19:32:09]
User370531 - Posts: 55
I believe that Global Settings > General Trade Settings > General > Hold market order until pending cancel orders are confirmed fixes the "message rate limit reached" issue. Can you confirm if my understanding is correct or if I'm missing something?
[2023-09-22 00:13:11]
Sierra_Chart Engineering - Posts: 17190
To some extent it may help but if some orders are not canceled the market orders will be held until they are all canceled.
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
[2023-09-23 23:28:53]
User61168 - Posts: 403
is there another approach without changing the message limit?

couple of options to explore...
1) You could use "TimeinForce" set to Day for all your pending orders to expire at market close
2) create multiple Trading via simple alert studies for Buy/Sell exits. use the "allow trading only during time range" setting to break down for closing of open trades into small chucks.
3) depending on your chart type, use a single study in #2 with Evaluate on Bar Close=Enabled along with a filter to position quantity to do it in small chucks at close of each bar.
Date Time Of Last Edit: 2023-09-24 00:45:48

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

Login

Login Page - Create Account