I run a lot of backtests over a 400 symbol list on the 1min timeframe over a couple year period. I find that running a backtest takes about 30min but uses about 20% of my 128gb of memory, after 2 or 3 backtests NT normally closes during the next backtest. If I close NT before this, it keeps running in the windows task manager after it closes, then I will end task in the task manager and memory will drop a little but will still be at ~30% then on system reboot it is normally about 8%.
I think I have a memory leak in my code. I have looked into adding State.Terminated in my scripts but that hasn't helped. My custom indicator that my strategy is based off of consists of a couple SMA's and ATR's added along with some custom bools and a 2min and daily timeframe is added to the 1min timeframe
Is there a direction that someone would recommend me looking into? Or something that I should look up in the help guides? It seems like data is being stored that is no longer needed but I am not sure how to find out which part or what data is being held on to.
I am somewhat new to this so any help would be greatly appreciated.
Thanks Ryan
Comment