Let's say somewhere in my strategy, I call for the values of a MACD.
double MyDiff = MACD(12,26,9).Diff[0];
It is my understanding, that by calling up the MACD(12,26,9.# dataseries, that NT will build that dataseries, and it becomes available from then on in my strategy. Great.
But then, let's say my strategy decides to no longer use MACD(12,26,9) and begins to use MACD(10,20,5), can I CLEAR THE MEMORY used by MACD(12,26,9)??? The reason is because I have developed my strategy to frequently switch to a different setting of the MACD, and when I run my strategy overnight (NOT in the backtester/optimizer - just normal running of my strategy) it seems that when I get up in the morning NT has crashed from out of memory.
So to avoid this crash I need to add code to clear indicators that I called in my code but are no longer needed.
Can I do this: MACD(12,26,9) = new MACD(); ??
Or if not, is there ANY way to clear it. Please don't tell me there is no way to clear it and that I'm doomed to use up all my memory if I tell my strategy to frequently modify its variables like this.
Comment