I am running a ranking code (published here previously)
which will assign ordinal ranks to an indicator.
This code has worked flawlessly until today when I ran it on
a Watch list containing 8800 symbols.
In the following lines of code:
for (i = 1;
i <= WLQty; i++)
StaticVarSet("RSI_Rank_" +
NumToStr(RSISymNo[i],
1.0), i);
StaticVarSet("ROC_Rank_" +
NumToStr(ROCSymNo[i],
1.0), i);
i shows a Subscript Out of Range error message "You
must not access array elements outside 0...Barcount -1 range.
As the number of symbols in the Watch list will establish a
value of WLQty much in excess of the Barcount, then I guess the error is
inevitable.
Is the "i" subscript related to barcount instead
of the quantity "WLQty" because it is an array variable in the
NumToStr function?
Is there a way to set up Static Variables related to symbol
elements well in excess of BarCount?
Sure would appreciate some of the advanced programmers here
offering a hint on this issue.