Login Page - Create Account

Support Board


Date/Time: Tue, 21 May 2024 16:08:58 +0000



Post From: Implementing simple trailing stop and profit target in ACSIL

[2017-01-12 18:45:31]
User514837 - Posts: 47
I am trying to simply enter the market using ACSIL, by using a simple trailing stop (let's say 10 ticks) and a target of 20 ticks. I don't want attached orders, because I think attached orders makes your orderquantity at least 2. Is the following doing what I would like to do? Simple trailing stop of 10 ticks and target profit of 20 ticks?

s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 1;
  NewOrder.OrderType = SCT_ORDERTYPE_TRAILING_STOP;
  NewOrder.Price1 = sc.BaseData[SC_LAST][sc.Index] + 10*sc.TickSize;
  NewOrder.Target1Offset = 20 * sc.TickSize;