I am running lengthy optimizations with multiple variables on dozens of futures contracts at once, and I would like to greatly speed up the process by by exiting out of the optimization's current backtest (current contract with current set of optimizable variables) before the last intraday bar of market data that is loaded in Ninja Trader for that contract.
Can I do this in my Ninja Trader C# strategy code?
More details: I am currently calculating the last date that I would like to test for each contract in the "Initialize()" method of my strategy, and I can write a Print() statement in the "OnBarUpdate()" that says "exit backtest now, since this contract has no more news events on future dates", but I an unable to exit the backtest at this point.
Thanks in advance!
ChiTrader2000
Comment