Support Board
Date/Time: Fri, 29 Nov 2024 16:43:03 +0000
Post From: Triggered Step Trailing Stop in ACSIL not moving
[2023-02-02 15:58:12] |
JTW1979 - Posts: 6 |
I'm having a hard time understanding the documentation for the Triggered Step Trailing Stop. What I'm trying to do is have the stop move up 2 points when the price rises 4 points above the current stop. The order executes as expected and the move to breakeven operates as expected. However, the stop never budges after the move to breakeven executes. s_SCNewOrder newOrder; newOrder.OrderQuantity = sc.TradeWindowOrderQuantity; newOrder.TimeInForce = SCT_TIF_DAY; // Set up limit chase -- this works newOrder.OrderType = SCT_ORDERTYPE_LIMIT_CHASE; newOrder.Price1 = sc.BaseData[SC_LAST][sc.ArraySize - 1]; newOrder.MaximumChaseAsPrice = 6 * sc.TickSize; // Set up move to breakeven -- this works newOrder.MoveToBreakEven.Type = MOVETO_BE_ACTION_TYPE_OFFSET_TRIGGERED; newOrder.MoveToBreakEven.TriggerOffsetInTicks = 2 / sc.TickSize; // When price moves two points above execution price ... newOrder.MoveToBreakEven.BreakEvenLevelOffsetInTicks = 1.25 / sc.TickSize; // ... move price 1.25 points above execution price // Set up triggered trailing stop -- this does not work newOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_TRIGGERED_STEP_TRAILING_STOP; newOrder.Stop1Offset = 2; // Initial stop 2 points below execution price newOrder.TriggeredTrailStopTriggerPriceOffset = 4; // When price moves 4 points above current stop ... newOrder.TriggeredTrailStopTrailPriceOffset = 2; // ... increase stop by 2 points |