Login Page - Create Account

Support Board


Date/Time: Sat, 01 Mar 2025 17:30:22 +0000



Attached Orders Attaches the Wrong Order

View Count: 7547

[2021-10-06 14:51:30]
ondafringe - Posts: 309
I have a custom study that submits a market order.

I have:

sc.SupportAttachedOrdersForTrading = true;

I have both of these checked:

Auto-Trading Enabled – Global
Auto-Trading Enabled – Chart

I have the order I want to attach selected in the Trade Window, which is a 5 point Trailing Stop with a 10 point Target.

And even though I don’t think it’s necessary, I have also checked:

Use Attached Orders

However, once the market order fills, instead of attaching the order selected in the Trade Window, it attaches a 20 point stop order with no target. So I have to manually Cancel that order, and then manually attach the order selected in the Trade Window.

The weird thing… that 20 point stop order is a very old order, from months ago, that I used as a Disaster Stop. But that order was deleted a long time ago. It no longer exists. It’s like SC has that order saved somewhere and keeps using/attaching it.

Now... if I manually enter a market order from the Trade Window, then the correct order, the order selected in the Trade Window, gets attached. So the problem only occurs when the entry order is submitted from the custom study.

BTW, I am testing this in the simulator.

Any idea how to correct this?
Date Time Of Last Edit: 2021-10-06 14:55:52
[2021-10-07 01:14:47]
Sierra_Chart Engineering - Posts: 18607
What you instead want to set is this:
sc.UseGUIAttachedOrderSetting = 1;

Remove:
sc.SupportAttachedOrdersForTrading = true;

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
[2021-10-07 01:29:38]
ondafringe - Posts: 309
I'll give it a try.

Thanks.
[2021-10-07 09:47:07]
Sierra Chart Engineering - Posts: 104368
Also make sure you are looking at the correct Trade Window:
Basic Trading and the Trade Window: Opening Trade Window for Chart or Trade DOM
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-10-07 17:47:27]
ondafringe - Posts: 309
That did it. Thank you.

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

Login

Login Page - Create Account