Support Board
Date/Time: Sun, 22 Dec 2024 16:20:28 +0000
Post From: Understanding trailing stops.
[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. |