I'm currently facing a little issue with the use of the Optimizer in the Strategy Analyser.
It is around the Results window (so after an optimization, the window that will display either the results of all or of the top X number of optimization for the specific data series); the issue is that, the Results (so amount of trades, PnL and everything) are totally different from the Result window, to when i launch the script on a chart based on the same data series, or simply when i click on the specific optimization on the Result Window. (with the exact same parameters)
I have seen one thread about this subject, yet the issue came from the fact that the person was using random number generation, which i am not ( https://ninjatrader.com/support/foru...ad.php?t=98666 )
Using or not using the "IsInstantiedOnEachOptimization" makes no difference in the randomness of the Results window. I do reset in the script (in DataLoaded) every single variables, order object, series, session iterator, etc; i also reset the values of the indicators in each indicator in their state dataloaded. (i put them to 0, false, recreate the new series, or DateTime.MinValue, yet i do not set the values of int and double to MinValue like shown here : https://ninjatrader.com/support/help...niteration.htm )
The script is quite extensive (+20000 lines), so i would mostly like if you have any ideas of where those random results in the Results Performance of the Optimizer could come from, since when opening a specific result in the optimizer (from what i understand it re-run the test), i have always the same values and no randomness, same as when running it on a standard optimization or chart; that i use no random creation in the script, that i reset every variables for the strategy and the indicators in their State DataLoaded, and that i do not make any difference to the way the code work when in optimizer or not (unless to the use of a special case to keep using a session iterator, yet this logic is used in the standard strategy analyser, which work just as expected).
I would gladly appreciate some help, since this issue make it not possible to use the Optimizer with the script, it can still run, yet, since the results are not correct, the "top" parameters set for the specific data series, are also not correct (and change each time i relaunch the optimization).
Thank you so much for reading this quite long post, have a great day !
Comment