Using the logic within a ranking column...

#1
Dear readers,

The 'addrankcolumn' function creates ranking columns which are one-based.

Can the rank numbers within the ranking column be used for logic purpose ?
If yes, is the name of the ranking column now the name of the array within a logic statement ?

For example:
rank(relative price strength)<21
//accept all tickers with rank number or position less than No. 21//

If this is wrong, is there an alternative function for such rank logic ?
Please yr kind advice will be most highly appreciated.
I remain.

Mike-Ekwueme....
 
#2
Dear Readers,
c/o: Happy_Singh,
c/o: MM007,

I have made forward improvements to the code for the above-mentioned topic/task (a ranking logic):

Task:

If i recieved a 1st ranking result of the stocks from 1 - 73 in a rank column called rank(volatility) from a "SetSortColumn + AddRankColumn" functions operation. I want to execute a 2nd ranking of another column of stocks (called Navigator Watchlist) in which only the stocks with their respective rank(volatility) between 1 to 40 are shown....

Rough Code:

newwl=CategoryCreate("Navigator Watchlist",categoryWatchlist);
if(LastValue(MA(EstSec_3,260))>0 AND LastValue(EstSec_5)>1 AND LastValue(EstSec_7)>0)
{
CategoryAddSymbol("",categoryWatchlist,newwl);
}
symlist=CategoryGetSymbols(categoryWatchlist,newwl ,0);
StaticVarRemove("StrongBuyStocks*");
for (i=0;(sym=StrExtract(symlist,i))!="";i++)
{
SetForeign("rank(volatility)");
temp=WriteIf(StaticVarGet("rank(volatility)")<41,N ame(),"");
RestorePriceArrays();
StaticVarSetText("StrongBuyStocks"+sym,"temp");
}
StaticVarGenerateRanks("rank","StrongBuyStocks",0, 1224);
for (i=0;(sym=StrExtract(symlist,i))!="";i++)
{
Plot(StaticVarGet("RankStrongBuyStocks"+sym),sym,c olorCustom10+i);
}

Problem: No result shown !!! where did i go wrong ???

Gents & Ladies, i really need yr help. Can anybody advise where my mistakes are ???

I remain.

ResPartner (Mike-Ekwueme)
 

Similar threads