Just thought of an example. .


//storing the range of Former candlesup to a maximum of last 100 candles
int numBars;
dual Range[100];
if (Bars gt; 100) numBars=100; otherwise numBars=Bars;
for (int n=0; n lt; numBars; n ) Range[n] = High[n] - Low[n];