[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] rank afl watchlist



PureBytes Links

Trading Reference Links

hello,
just want to know if this code returns the rank of a ticker among the 
watchlist???

stephane


list = GetCategorySymbols( categoryWatchlist, 1 );//return WL 1
Count = 0;//initialize
for( i = 0; ( ticker = StrExtract( list, i ) ) != ""; i++ ) 
Count++; // nbre de ticker dans WL 1
//Plot(Count,"",2,1);

for( i = 0; i<Count; i++ ) 
{
ticker=StrExtract( list, i ) ;//return Close
my = ROC( Foreign(ticker,"C"), 30 );

	for(j=0;j<BarCount;j++)
	{
	Perf[i]=my[j];
	}
} 

Rank[0]=0;
my = ROC(C, 30 );
for(i = 0; i < BarCount; i++)
	{
		nNb = 0;
		for (j=0; j<Count; j++)
		{
			if (my[i] <= Perf[j])
			nNb++;
		}
		Rank[i] =nNb ;
	}
Plot(Rank,"",colorBlue,1);


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/