When inside of the OnBarUpdate() method of an NT8 Strategy, is there a way to determine if the Strategy is not being viewed in a chart, i.e. it is currently running in an invisible back-test or optimization, and is not being viewed in either a realtime chart or a chart in the back-test results section?
I am asking because I want my back-tests and optimizations to run as fast as possible by running all the non-visual buy and sell logic, but not running all the drawing code that I am doing in OnBarUpdate(). Note that my logic can't go in the OnRender() section. Also, I want those visuals to appear even on back-test results charts. Also, even if the NT8 methods like Draw.Dot(...) don't draw when not in a chart, I am still doing lots of calculations before I call Draw.Dot(...) and those calculations have no purpose other than to figure out what dot to draw. It is these calculations that I don't want to run if the strategy is not on a chart.
Thank you in advance,
EquityTrader
Comment