7:15 am bar - place a EntryLongStopLimit order (aka buy stop )
8:15 am bar - Buy stop order is triggered and limit order is placed and filled. OnOrderUpdate method is used to place target limit and stop loss (market) orders above and below the average entry price respectively using the proper entry signal name.
9:15 am bar - Stop loss (market) order is hit to close the position. A new EntryShortStopLimit order (aka sell stop) is placed but is ignored per the message above.
I would have thought that the previous trade's outstanding exit order (target limit order) would have been cancelled via OCO and therefore not interfere with the new entry being placed in the opposite direction on the same bar.
1) Am I missing something or is this behavior expected?
2) Is there a way to have previous trade exits and new orders be placed in the opposite direction on the same bar?
3) Can you confirm whether "fix your strategy" messages of this nature are displayed once for the first occurrence or for each occurrence encountered within a strategy backtest?
Thanks,
Whitmark
PS Note the typo in the error message "site" vs "side".
Comment