API Support Forum
OEC API > API Support > Trailing Stop Orders being rejected
Author Topic: Trailing Stop Orders being rejected
(1 messages, Page 1 of 1)
Moderators: VPfau
PDavies541
Posts: 21
Joined: Feb 01, 2013


Posted: Apr 10, 2018 @ 12:14 AM             Msg. 1 of 1
Hi

We are struggling with trailing stop orders.

Here is the part of the code where we set the trailing parameters

if (order.TrailTicks > 0 && order.OrderType == JTEnumerations.OrderType.Stop)
{

myOrderDraft.SetTSData(myOrderDraft.Contract.CurrentPrice.LastPrice, (double)(order.TrailTicks - myOrderDraft.Contract.TickSize));
}

OEC.API.OrderParts myInvalidOrderParts = myOrderDraft.GetInvalidParts();

if (myInvalidOrderParts != OEC.API.OrderParts.None)
{
JTLogger.AppLog("JTOECOrderHandler.OrderSubmit: Order Error - myInvalidOrderParts: " + myInvalidOrderParts.ToString());
}


What's happening is we always end up with the "Extendedparameters" error coming back from GetInvalidParts

Any idea what we are doing wrong?

We are testing with a demo futures account with the ESM8 contract.

Cheers

Pete
Peter Davies