I am experiencing issues where my strategies are submitting and executing orders right on the opening bell and I am unable to understand why.
My strategies are set to 'Calculate.OnBarClose', use the 'US Equities RTH' trading hours template and to prevent any order execution on the open I have added this line of code...
if (State == State.Realtime && ToTime(Time[0]) >= 092900 && ToTime(Time[0]) < 093100) return;
The odd thing about this behaviour is that after the trade stopped out, I ran the Strategy Performance "Real Time & Historical" and the trade wasn't recorded on the list of trades. when it occurred previously on another strategy, I also ran a backtest after the close and the trade wasn't on the list of trades either. I used high order fil resolution with tick data for both of these checks.
It has happened to me a handful of times before on other strategies but I've never understood why, it is not consistent on a single strategy. I don't believe this is the expected behaviour.
Other than waiting until 9:31am to manually enable my strategies can you offer any advice?
Thanks,
Neil

Comment