please point me to articles or hints what could be causing memory leaks when my strategy is run in Optimizer?
Ninja Trader8 starts with roughly 480 MB in RAM, then at each run of Optimizer it adds another 200-300MB consistenly, until my RAM usage is 98% at which point I have to kill the process and start again... this happens after about 10 runs ... what might be causing this?
IsInstantiatedOnEachOptimizationIteration = true
changing it to false does not help
In State.Configure I do add a secondary data-series and two float series for a custom indicator:
// add minute data series to watch for EOD
AddDataSeries(BarsPeriodType.Minute, EODPeriod);
// input data series that AAAAAAAAindicator will use to plot in indicator's panel
// we supply this data here, as opposed to a standard indicator which uses bar data as input
IndicatorLong = new Series<double>(this);
IndicatorShort = new Series<double>(this);
then I fill up the above with historical data in State.DataLoaded, then update at each OnBarUpdate() with the new bar value:
(example)
IndicatorShort[0] = XXXXX.Value[0];
IndicatorLong[0] = YYYYY.Value[0];
Should I release/free all this data somehow after each run to avoid this piling up of memory usage?
thanks in advance,
Momchil
Comment