Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 15:39:40 +0000



Automate a stop with a manual limit order once the order is in a trade

View Count: 1299

[2017-07-10 19:50:32]
Joel Wisdo - Posts: 15
I am trying to set a stop automatically once the limit order enters a trade. The orders on the DOM are manual limit orders. Once one of the manual orders enters a trade I would like to automatically set a stop based on a predefined stop price from point of entry. Any suggestions?
Date Time Of Last Edit: 2017-07-10 19:50:59
[2017-07-10 19:55:12]
Sierra Chart Engineering - Posts: 104368
This is done through Attached Orders:
Attached Orders
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-07-10 20:40:27]
Joel Wisdo - Posts: 15
This issue I am running into is that the attached stop order initiates once the orders are manually placed on the chart. My client places manual orders. I am trying to write a piece of code that will launch a stop order (or a "buy / Long" or "sell / short' order depending on the entry) once one of the manual placed orders enters into a trade. I am then looking to modify that stop order based certain criteria. I apologize for my ignorance here. I am new to Sierra Chart and trying to get us to all the functions. It's a complex piece of software so it is taking me sometime to learn it. I think I have the modification done but I am having trouble automating the stop order.
[2017-07-10 20:45:23]
Joel Wisdo - Posts: 15
I am using s_ACSTrade to pull info from the entry to find the stop price from the entry point. Here is my code to initiate the stop order. It launches a sell order also though. I guess the easiest way to maybe approach this is to launch a "sell" if the trade is an "buy" but for some reason the code will not launch a "sell" order. Is there something in the sc.defaults that will allow this? Remember there is are 2 manual orders on the DOM. 1 Limit Order and 1 Working Order.

HardStop = CurrentPrice - (AdjustStop.GetInt() * sc.TickSize);
s_SCNewOrder NOrder;
NOrder.OrderQuantity = OrderQuantity.GetInt();

NOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_STOP;
NOrder.Stop1Price = HardStop;
NOrder.InternalOrderID2 = Stop1ID;

int Result = sc.SellEntry(NOrder);

[2017-07-11 04:02:16]
Sierra Chart Engineering - Posts: 104368
This issue I am running into is that the attached stop order initiates once the orders are manually placed on the chart.
No, it does not work this way. The Stop order is actually in a pending state and only becomes active once the parent order fills. Attached Orders: General Management of Attached Orders

You do not need to make this complicated. You will want to use the Attached Order functionality. It will do what you want.
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