Last night for the first time in 7 months, my strategy placed duplicate entry orders and I would like clarification of my understanding before I make a change, please.
With the managed approach to entry orders, "By default, orders submitted via Entry() and Exit() methods automatically cancel at the end of a bar if not re-submitted".
I am using "entryOrder1 = EnterShort( nContracts1, entryName1 );"
Within OnExecution(), I set a flag to prevent the entry order code running again if the entry order is executed.
CalculateOnBarClose = false;
EntriesPerDirection = 3;
EntryHandling = EntryHandling.UniqueEntries;
TimeInForce = Cbi.TimeInForce.Day;
Is it possible that the arrival of the next tick was earlier than the execution of the entry order, resulting in the entry order being placed again?
My understanding was that the entry order would be cancelled and resubmitted if it was not already executed, so it should still result in only one entry.
Regardless of the cause, I think I can prevent this occuring by setting EntriesPerDirection = 1; Right?
If EntriesPerDirection = 3; in Initialize(), but I change it to 1 in the New Strategy settings when the strategy is added in the Control Center, which takes precedence?
Sorry about the many questions, but this is trading live and I don't want to make unnecessary changes.
Cheers
Tony
Comment