Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 17:18:35 +0000



TriggeredTrailStopTriggerPriceOffset is being ignored for attached order

View Count: 1106

[2017-11-07 12:22:29]
User287992 - Posts: 51
I have StopLimit order with TriggeredTrailingStop order attached with trigger price offset set, but Stop order starts to trail immediately. Strategies built on v1614 and before worked well with same code (at the moment using version 1635)

s_SCNewOrder NewOrder;
NewOrder.OrderQuantity = (unsigned int) OrderAmount;
NewOrder.OrderType = SCT_ORDERTYPE_STOP_LIMIT;
NewOrder.AttachedOrderStop1Type = SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_3_OFFSETS;
NewOrder.TriggeredTrailStopTriggerPriceOffset = TicksForTrailingStopLoss * sc.TickSize;
NewOrder.TriggeredTrailStopTrailPriceOffset = TrailingStopTickDistance * sc.TickSize;

NewOrder.TimeInForce = SCT_TIF_GTC;

NewOrder.Price1 = HighData[sc.Index-1] + OrderHighLowOffset * sc.TickSize;
NewOrder.Price2 = NewOrder.Price1;
NewOrder.Stop1Price = NewOrder.Price1 - StopLoss * sc.TickSize;

Result = sc.BuyEntry(NewOrder);
...


Attached order has following parameters set:
Price1: 1727.4, Price2: 1727.4
Type: 9, TriggerOffset: 2.000000, TrailOffset: 0.200000, StopPrice: 1725.40

It starts trailing immediately, even before fullfilling the Offset (it should trail after hitting 1729.4)
imagePaused 300X GC-201708-NYMEX [CB] [M] 5 Min #1 2017-11-07 .png / V - Attached On 2017-11-07 12:19:12 UTC - Size: 48.37 KB - 414 views
attachmentTradeActivityLog.txt - Attached On 2017-11-07 12:21:33 UTC - Size: 3.79 KB - 351 views
[2017-11-08 04:41:25]
Sierra Chart Engineering - Posts: 104368
We had a look at this, and there are no changes in this area of the code at all and we see no obvious problems.

You need to look carefully at your code and make sure you are setting both of these offsets correctly.
NewOrder.TriggeredTrailStopTriggerPriceOffset = TicksForTrailingStopLoss * sc.TickSize;
NewOrder.TriggeredTrailStopTrailPriceOffset = TrailingStopTickDistance * sc.TickSize;

We recommend performing step-by-step debugging:
Step-By-Step ACSIL Debugging
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: 2017-11-08 04:42:10
[2017-11-08 13:44:13]
User287992 - Posts: 51
Neither we did any changes. We didnt even rebuilt the strategy.

I have run one chart (study in there is built on 1608) unchanged between SC versions and there is behavior change between versions 1623 and 1625

1623 - works
1625 - incorrect trailing behavior
Date Time Of Last Edit: 2017-11-08 13:44:46
imageSC_1623.png / V - Attached On 2017-11-08 13:43:40 UTC - Size: 53.78 KB - 375 views
imageSC_1625.png / V - Attached On 2017-11-08 13:43:43 UTC - Size: 54.74 KB - 347 views
[2017-11-08 20:39:20]
Sierra Chart Engineering - Posts: 104368
We have verified the issue. It is a serious issue involving order type matching between ACSIL and the main Sierra Chart program. We are working on implementing a solution now so that it is corrected and does not happen again.

The problem arose when we added Limit if Touched 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-11-09 04:34:42]
Sierra Chart Engineering - Posts: 104368
This is now resolved in version 1640.
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