Support Board
Date/Time: Tue, 06 May 2025 23:36:46 +0000
Post From: Trade Window Flatten and Cancel All Orders with fast replay
[2024-12-10 00:24:56] |
User745789 - Posts: 377 |
The above statement is incorrect. The "M >> Flatten Action" settings on the Trade Window determine the action of the "Flatten Button" on that same Trade Window. That is all. It does NOT define the action that is taken when a position is flattened.
I understand. However I have multiple instances of all working orders being cancelled when a position is flattened WITHOUT using the Flatten button. It happens every day. I have been using it that way for a long time. I just tested it in replay on a chart that didn't have a spreadsheet for trading, and where the orders were not OCO attached. I manually placed orders and all working orders where cancelled when the take profit order was hit and the position flattened. HOWEVER: having said that, in replay I can find instances where it doesn't work perfectly - sometimes, not often, unattached working orders remain working when the position is flattened via another working order. Are you using a custom study or the Spreadsheet System for Trading for these trades? The reason we ask is that we wonder if what you are seeing is due to the following setting:
Automated Trading Management: CancelAllWorkingOrdersOnExit I do have numerous spreadsheets for trading operating. But I am not using that setting. I am only using Trade Window >> Menu >> Flatten Action. And it works in live trading every day. However, from now on I will not use the trade window setting for action on flatten. I will use this setting in J27. When the position = 0 (J5=0) then cancel all working orders. Hopefully this will be foolproof in replay backtesting and live trading. Spreadsheet Systems, Alerts and Automated Trading: Cancel Working Orders [J27] It is essential that there be some mechanism in spreadsheet autotrading to cancel all working orders when the position is flattened. And this method is not foolproof, as not all exits come from BuyExit or SellExit actions. https://www.sierrachart.com/index.php?page=doc/AutoTradeManagment.php#CancelAllWorkingOrdersOnExit. I am really hoping cell J27 is the best solution. Thank you for your patience with this so far. EDIT: please see attached "image A" from the Trade Log. This came from live trading. The only mechanism I had in place to cancel working orders on flat position is via Trade Window >> Menu etc. I promise, that is where this cancel action came from. It did not come from any setting in a trading spreadsheet. Now please see "Image B". Same situation, but different product. In this instance SC tried to cancel working orders on flat position, but it was rejected. This was also live trading. What order state would prohibit the cancel request? Date Time Of Last Edit: 2024-12-10 04:12:52
|
![]() ![]() |