Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 18:24:19 +0000



[Programming Help] - Trailing after Breakeven

View Count: 496

[2020-06-21 23:40:02]
User99735 - Posts: 234
Hi,
I am trying to set stop to the following requirements - "Trailing Stop - [7] ticks initial stop; move to breakeven if price is [4] ticks in profit; trail thereafter at [2] ticks".

Please advice if the following NewOrder setup is correct as per the above requirements
  NewOrder.StopAllOffset = 7 * sc.TickSize;
  NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_STOP;
  NewOrder.TriggeredTrailStopTriggerPriceOffset = 4 * sc.TickSize;
  NewOrder.TriggeredTrailStopTrailPriceOffset = 2 * sc.TickSize;

  NewOrder.MoveToBreakEven.Type = MOVETO_BE_ACTION_TYPE_OFFSET_TRIGGERED;
  NewOrder.MoveToBreakEven.TriggerOffsetInTicks = 4;
Regards

Vivek

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

Login

Login Page - Create Account