The code as written will rank symbols by the combination of the sum of roc and rsi. This is just for illustrating the coding technique. You have to first come up with a series of indicators you believe result in "good" symbols. Second, you have to have enough understanding of the code that you substitute those new indicators for the ones in the demonstration code. So, say you believe ROC is a good one (higher ROC in a period is "good". Perhaps you also believe that low standard deviation is also "good". Thus you would leave the ROC in the code and change the RSI to a standard deviation indicator. The number of tickers in a watchlist does not matter to the formula---it is applied to all symbols in a watchlist.
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of rijnaars Sent: Thursday, July 17, 2008 1:24 AM To: [email protected] Subject: [amibroker] Re: What a Great Ranking Tool Can anyone help me here which parameters should i adjust for running it on my watchlists. I don not know where adjustments to my watchlists should be done if i for instance have a watchlist of 11 tickers where should i adjust this in the formula? --- In [email protected], "Ken Close" <[EMAIL PROTECTED]> wrote: > > Paul Ho has come up with a supurb ranking tool. I have expanded it to two > indicators. Feel free to expand the code structure to any number of > indicators. > > Possible next step: stick the Tot_Rank values into the OI field for the > symbols, then Plot the Ranks for a visual representation of "where the > symbol is over time". > > The possibilities are endless (or at least enlarged because of Paul's code > idea). Thanks Paul for your creative input. > > Ken > > // 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; > > } > > 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. > ------------------------------------ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links
