I have a minute-database with more than 3 million bars. The problem I have is
that i'm using loops and complex calculations and the program is crashing.
I would just like to perform these calculations on the bars that are within the
AA date range. How can I find out the barindex of the first and last bar within
the AA date range??
The code should work something like this:
for(i=firstBarinRange;i<lastBarinRange; i++){....}
I was trying this to get the last bar in the range:
index = BarIndex();
lastindex = SelectedValue(index);
The problem with this is that the index array is being calculated for ALL bars
and it is very slow. But any similar code to get the first index of the range
will do.
Any help is appreciated. Thanks in advance.