In the strategy, entry, profit target, and protective stop orders are created at various times. The protective stop orders (ExitLongStop) are always cancelled the next bar, but the entry and profit target orders (EnterLongStopLimit and ExitLongLimit) remain in force as they should.
Already using "TimeInForce = Cbi.TimeInForce.Day" in the Initialize block -- I understand this is what is supposed to keep orders in force all day until filled or cancelled.
Right now I'm forced to use a kludgy workaround, but it may become unwieldy or unworkable as the strategy grows or becomes more complex. What could be the explanation of this inconsistent order persistence ?
Comment