if (entrycriteriamet)
{
if (otherentrycriteriamet)
{
EnterLong(Convert.ToInt32(NumberOfContracts), @"T1_LONG");
sv_profittarget = sv_s1_high+(TickSize*2);
SetProfitTarget(@"T1_LONG", CalculationMode.Price, sv_profittarget, true);
SetTrailStop(@"T1_LONG", CalculationMode.Ticks, 8, false);
}
}
Here is some of my log showing the error.
Order='1930029853/W0628' Name='Trail stop' New state='Accepted' Instrument='ES 09-19' Action='Sell' Limit price=0 Stop price=2987.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='253205498112' Filled=0 Fill price=0 Error='Unable to change order' Native error='Cannot change order '1930029853' because current order values already match.'
Strategy 'STRATEGY1/170820685' submitted an order that generated the following error 'Unable to change order'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
I'd love some feedback on if this is a know issue or if there is some way I can change the code to prevent this issue. I have the entire log showing the original entry and all the log entries that occurred the entire trade, if needed.
Comment