I'm getting an exception (attached). It tells me to see the help guide, which tells me I need this code:
else if (State == State.Realtime)
{
// One time only, as we transition from historical convert any old historical order
// object references to the new live order submitted to the real-time account
// We only want to make this call on the entries because while transitioning into a
// realtime order it turns those stops and targets into live trades.
if (EntryShort != null)
{
EntryShort = GetRealtimeOrder(EntryShort);
}
if (EntryLong != null)
{
EntryLong = GetRealtimeOrder(EntryLong);
}
}
For now, I can get around this by setting Wait Until Flat, but a user might want to select Immediately Submit, which will throw this exception because of the trailing stop code I have in there.

Comment