So, for example, let's say I have the following two lines of code that execute once a minute:
stkADX = ADX(14)[0];
ADX(14).Dispose();
Does this release any space? Did I initially allocate enough space to hold the values of ADX for all the bars in my chart, or did I just allocate the most recent value? When the Dispose statement is executed, does it get rid of that space?
Similarly, I have a couple of statements like this:
low10Day = MIN(Lows[1],10)[0];
MIN(Lows[1],10).Dispose();
Even if the answer to the previous question is "yes, it allocated lots of space and yes you are disposing it", does the MIN function that looks at 10 bars eat up enough space to store 10 values, and am I disposing that space?
Finally, how would I get rid of historical data? When the program starts, I loop through the most recent 3000 1-minute bars to do a couple of calculations. After those calculations are done, I never need to look back more than 60 bars, and even then I only do it once a minute. Are all 3000 bars loaded into memory, and if so is there a way I can release 2940 of them?
Comment