Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 18:07:27 +0000



[User Discussion] - Understanding trailing stops.

View Count: 2765

[2015-06-24 23:44:16]
CustomIndicators - Posts: 126
I'm having a little trouble understanding the trailing stop. Could you please help clear this up so I can be sure that I know what I'm doing?


// Trailing stop order. This has no Attached Orders.

// The trailing offset is the difference between the current market price for the Symbol of the chart the trading study is applied to

// and the price set by NewOrder.Price1

// Create an s_SCNewOrder object.
s_SCNewOrder NewOrder;

NewOrder.OrderQuantity = 2;
NewOrder.OrderType = SCT_ORDERTYPE_TRAILING_STOP;
NewOrder.Price1 = sc.BaseData[SC_LAST][sc.Index] - 10*sc.TickSize;

sc.SellOrder(NewOrder);

On this line:
NewOrder.Price1 = sc.BaseData[SC_LAST][sc.Index] - 10*sc.TickSize;
Is the 10, the amount of offset ticks? So, for the ES, that would be 2.5 points?
What is the *sc.TickSize all about? I thought that sc.TickSize was for how many ticks are in a bar. How is that related to the 10? I'm using 5 minute candles.
[2015-06-25 03:44:36]
Sierra Chart Engineering - Posts: 104368
Refer to the documentation for the ACSIL member (sc.TickSize) in question.
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: 2015-06-25 09:50:12
[2015-06-25 04:29:24]
CustomIndicators - Posts: 126
I did. I read the whole page at least 5 times, and its not clear enough on trailing stops. It doesn't even tell what the sc.TickSize does to the order price. That's why I'm asking about it. Why would you multiply a constantly changing tick size by 10, and call it a correct exit price?
[2015-06-25 04:55:42]
Kiwi - Posts: 374
The tickSize isn't changing. For HSI it would be 1. For ES 0.25.

What changed is the last price resulting in a trailing stop. Although that code moves price back and forward. Look up kiwis trailing stop for one that's more complete.

Google:

kiwi's trailing stop site:sierrachart.com
Date Time Of Last Edit: 2015-06-25 04:58:51
[2015-06-25 05:18:06]
CustomIndicators - Posts: 126
Ah, thank you Kiwi. You cleared it up for me :)

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

Login

Login Page - Create Account