Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 20:17:45 +0000



Attachted Orders on an Advanced Custom Study

View Count: 1052

[2014-01-01 14:38:43]
User17195 - Posts: 1
Hello, I' m a customer of Sierra Chart and I try to d oan advanced custom study.
It is an automatic trading system, but I' ve got a problem with Attachted Orders.
I do an example:

s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 1;
  NewOrder.OrderType = SCT_LIMIT;
NewOrder.Price1 = sc.Close;
  NewOrder.Target1Offset = sc.High;
  NewOrder.Stop1Offset = sc.Low;

But when I go to see the backtest I see that it isn't correct.
I want to know if it is correct.
Thanks a lot.
Bye and a happpy new year.
[2014-01-03 17:12:02]
Sierra Chart Engineering - Posts: 104368
This code is not correct. You are specifying these as actual trade prices when they should be an offset from the parent order price which is set with NewOrder.Price1:
NewOrder.Target1Offset = sc.High;
NewOrder.Stop1Offset = sc.Low;

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
Date Time Of Last Edit: 2014-01-03 17:13:28

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

Login

Login Page - Create Account