Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 06:46:06 +0000



ACSIL Issue sending two stop orders

View Count: 965

[2017-10-06 00:22:05]
knoxville1915 - Posts: 38
Good afternoon,

I have two non-attached stop orders set up to be entered at different prices. Each is for half the position. In my debugging, when only one of the orders is submitted it goes through. If both are sent together as part of the same condition, then only one order goes through.

Can you help me understand this?

Many thanks,
[2017-10-06 01:57:42]
Sierra Chart Engineering - Posts: 104368
You need to understand why one of them is being rejected. Refer to:
Automated Trading From an Advanced Custom Study: Debugging/Troubleshooting Automated Trading Systems
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
[2017-10-06 03:34:59]
knoxville1915 - Posts: 38
I have that piece of code in my program but I do not get an output in my message log. The order is not getting rejected per se. One buyexit becomes cancelled when the other buyexit is sent. The orders have different names in the code, and I have confirmed that they have different InternalOrderIDs by checking the Orders and Positions window.

When I vary the conditions for each order, I can see on my chart and in the Orders and Positions window that the first order automatically gets cancelled even though I have no order cancellation code in my program.

I've combed through the documentation but I cannot seem to find anything related to this matter. Are there any global settings that can prevent the existence of two simultaneous buyexit orders?
[2017-10-06 04:03:13]
knoxville1915 - Posts: 38
Oh dear, I missed this:

"You could also use the BuyExit or SellExit Order Actions as well to flatten or reduce the current Trade Position, however when a study is configured for Unmanaged Automated Trading, you will still have restrictions when using the BuyExit or SellExit Order Actions. Therefore, to not have any restrictions, use only the BuyEntry | BuyOrder and the SellEntry | SellOrder Order Actions."
[2017-10-06 04:57:00]
Sierra Chart Engineering - Posts: 104368
I can see on my chart and in the Orders and Positions window that the first order automatically gets cancelled even though I have no order cancellation code in my program.
In regards to this, you need to look at the Trade Activity Log to find out why the orders are being canceled:

Trade Activity Log

Also refer to:
Automated Trading Management: CancelAllWorkingOrdersOnExit
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