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

RE: [amibroker] I have my doubts on accuracy of line drawing in AB



PureBytes Links

Trading Reference Links

THANKS Anthony,
I assume this sorts and ranks a watchlist, based on 20 ROC correct ?
Could this be implemented in the QRS function in order to rank RS 
results a la IBD RS ranking ?  Because the QRS function give the raw 
number but not the ranking like QRS or IBD RS does.

I thank you

// QP QRS Calculations
Buy=Sell=Short=Cover=0;
Filter=Status("LastBarInTest") AND BarCount-1 > 252;
SetOption("NoDefaultColumns",False);
Price = Close;

// using numbers (faster)
b=BarCount-1;

RankNum = (Price[b]/price[b-62]*2+
Price[b-63]/Price[b-125]+
Price[b-126]/Price[b-188]+
Price[b-189]/Price[b-251])/5;

AddColumn(RankNum,"RankNum",1.2);



--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> 
wrote:
> //replace your watchlist number 
> 
> list = CategoryGetSymbols( categoryWatchlist, 0 );
> 
> p = 20;
> 
> Count1=0;
> 
> rank = 0;
> 
> symVal = 0;
> 
> relval = 0;
> 
> Ownval = ROC(C,p);
> 
> for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> 
> {
> 
> symVal = Nz(Foreign( sym, "Close" ));
> 
> relval = ROC(symval, p);
> 
> n=Nz(IIf(relVal!=0,1,0));
> 
> Count1[BarCount-1]=Count1[BarCount-1]+n[BarCount-1];
> 
> if(relval[BarCount-1] > Ownval[BarCount-1])
> 
> rank[BarCount-1] = rank[BarCount-1]+1;
> 
> }
> 
> AddColumn(Count1,"count",1.0);
> 
> AddColumn(rank,"rank",1.0);
> 
> rank[BarCount-1] = int(100*(Count1[BarCount-1]-rank[BarCount-
1])/Count1
> 
> [BarCount-1]);
> 
> Filter = 1;
> 
> AddColumn(Ownval,"ROC",1.2);
> 
> AddColumn(rank,"rank",1.0);



------------------------ 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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

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