In my script in the Initialize() function, I have ExitOnClose = false.
However, when I run a backtest, it still sells all of my shares on the last day before it exits. I would like for the backtest to terminate with open positions. Otherwise, it messes up the statistics for my automated strategy.
I've added a couple of screenshots to show you what is happening.
Any help would be much appreciated. I'm at a loss here.
Comment