Login Page - Create Account

Support Board


Date/Time: Wed, 26 Feb 2025 16:20:30 +0000



Flatten position for previous month contract

View Count: 526

[2021-05-19 03:56:51]
User987654 - Posts: 69
Hi Support,

I am using ACSIL. I wrote some code that automatically reloads the chart once per day and if it detects a change in sc.Symbol I want to cancel all orders and flatten my position from the previous month contract.

The issue is that once the chart reloads, it rolls to the next month (which is desired behavior) but the sc.FlattenAndCancelAllOrders() function only applies to the current symbol. Is it possible to add a Symbol argument to the function? I am open to other ways to accomplish the same thing.

Thanks
[2021-05-19 15:11:19]
Sierra Chart Engineering - Posts: 104368
We will have to add a new ACSIL function for 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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-05-19 21:44:30]
User987654 - Posts: 69
That would be very helpful, any idea on ETA?
[2021-05-19 22:55:14]
Sierra Chart Engineering - Posts: 104368
It will be out in the next release. This function only works though for non-simulated trading. Not simulated trading.

The function is:
FlattenAndCancelAllOrdersForSymbolAndNonSimTradeAccount
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
Date Time Of Last Edit: 2021-05-19 22:56:41

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

Login

Login Page - Create Account