Support Board
Date/Time: Wed, 26 Feb 2025 15:57:17 +0000
Post From: Flatten position for previous month contract
[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 |