Circling back on the exit on session close, I have noticed that instead of my strategy exiting 30 seconds before the session close (as selected when I enabled the strategy and ExitOnSessionCloseSeconds = 30 under StateDefaults) it is exiting at the start of the last candle. See below pic of the code I am using and a pic of the output window. In the below pic, I am using the 5 min chart of the ES.
The same happens when I use the 15 min chart. exitOnCloseWait will change to true at the start of the last candle of the trading session. So on the 15 min chart, exitOnCloseWait will change to true immediately at 3:45pm EST instead of 30 seconds prior to session close which is what I have set for ExitOnSessionCloseSeconds. Whatever time chart I use, it seems to always change to true at the start of the last candle. Why would this be happening?

Comment