My strategy makes final calculations during OnTermination and outputs to various CSV files. The strategy works fine when applied to a chart or backtested in Strategy Analyzer.
However, the problem arises when I attempt to run it through the optimizer. It seems like it runs through once, but when it moves to the next iteration, one of the CSV files is still in use. Therefore, only one iteration of the optimization occurs and no trades are generated for the rest of the iterations.
I believe it is because the file is still in use from the first run and future runs aren't able to access the file. Any ideas on how to either write concurrently (if that is even possible?) or to wait and then write when available. It's important that this be able to be done from the Optimizer in the Strategy Analyzer. Thanks for any insight!
Comment