Topic: Error In TrailingStopLoss order type
(2 messages, Page 1 of 1)
Joined: Sep 21, 2017
Hi Team ,
I hope you are doing well.
I am getting below error while I am placing order as TrailingStopLoss .Please let me know. what I am doing wrong:
TrailingStopData and either TrailingStopLimit or TrailingStopLoss must be defined together
Order Draft :
OrderDraft slOrder = new GF.Api.Orders.Drafts.OrderDraft(OrderSide.Buy,
order.Contract.ID, "comment", order.Account.ID, null, null, 2.0, OrderType.TrailingStopLoss,
_price, null, OrderFlags.GTC, ExecInst.None, null, null, null, null, null, null, SubmissionType.Automatic, null, null);
Looks like you are trying to pass a TrailingStopData trailingStopData parameter as null.
To create order, adjusted to the market price its need to set two components is 'price' and 'delta'.
Please use a TrailingStopData Class to set the values.
Thanks for reaching out.