Summary of my problem:
I developed an indicator that works as a strategy (let's call ELTTS). It has 17 inputs that can be varied (setups) and two outputs. One output is a signal -1 or 0 or 1 that is to use for automation the other output is its own backtest (the strategy profit in the data range defined in the graph). So far so good, works great.
However as are many input set-ups it takes a lot of time to adjust the best set-up manually. To solve this problem I developed another indicator that tracks the best setups "to ELTTS" using "genetic algorithms". Everything is good so far.
During development I found that the NinjaTrader gets lost because of the "large memory consumption". Being that I was careful to always clean arrays, lists and arrays in addition to always break the references of the variables in memory (always insert (int) or (double) in front).
I verified that I can not leave the algorithm naturally converge because it generates innumerable loops and the NT can not take (consume all memory and locks).
Because of this I put a timer in the system, eg I set to 100,000 backtests and when it reaches "10 min processing" I force stopping the process. The resulting backtests the number depends on the size of the database. In this example got make 1000 backtests in 10 minutes for a small size base. When the processing time exceeds 10 min "the system stops" and gives me the results of the best tracked set-ups.
I identified that if I run the genetic algorithm immediately after starting the NinjaTrader the system promptly gives me the results in 10 minutes. However if after run once time the algorithm and after I rerun the algorithm genetic a NinjaTrader frie my memory and takes a lot longer than 10min to give me the answer and sometimes not respond.
I wonder what's going on? And if you have any tips to resolve this the problem of NinjaTrader memory fryer. kkkk
Another question
When i put values in the DataSeries that way myDataSerie.Set(value) is diferent than myDataSerie[0] = value?
Thank you
Comment