Doji: Thanks for the suggestion but it did not help speed things up. Maybe it did but not enough that I could measure. The SP500 still said it would take almost 2 hours to sort. I am still on the hunt... Ken
_____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Doji Sent: Sunday, July 06, 2008 1:20 PM To: [email protected] Subject: Re: [amibroker] Paul Ho: Memory Challenges with Great Ranking Tool - Corrigendum (?) Totrank = rocrank + rsirank; needs to be taken out out of {} (is this what is called a loop?) for version 5.10. // Ranking_Alt01.afl KSC 07/05/2008 // Original code by Paul Ho, Amibroker list 07/05/2008 // Modifications and expansions by Ken Close 07/05/2008 // Will ordinal rank every symbol in watchlist for every bar. mOwnROC = ROC(C, 14); mOwnRSI = RSIa(C, 14); mRoc = 0; mRSI = 0; list = CategoryGetSymbols(categoryWatchlist, 16); ROCcount[0] = rocrank[0] = 0; RSIcount[0] = RSIrank[0] = 0; for(i = 0; (sym = StrExtract(list, i)) != ""; i++) { SetForeign(sym); mRoc = ROC(C, 14); mRSI = RSIa(C, 14); RestorePriceArrays(); n = !IsNull(mRoc); m = !IsNull(mRSI); roccount += n; rsicount += m; rocrank = IIf(Nz(mRoc) > mOwnROC, Rocrank + n, rocrank); rsirank = IIf(Nz(mRsi) > mOwnRSI, Rsirank + m, rsirank); //Totrank = rocrank + rsirank; } Totrank = rocrank + rsirank; ROCn = ROC(C, 14); RSIn = RSIa(C, 14); Filter = 1; Buy = Sell = 0; AddColumn(ROCn, "ROCn",1.2); AddColumn(RSIn, "RSIn",1.2); AddColumn(mRoc, "MROC", 1.2); AddColumn(ROCrank, "ROCRank", 1.0); AddColumn(RSIrank, "rsirank",1.0); AddColumn(Totrank, "Totrank", 1.0); // To check the sorting, run on a watchlist, then click once on the date column, // Then shift click on one of the indicators, ie, RSIn, and you will see the // ordinal values in order.
