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

[amibroker] Re: One-step top10 exploration



PureBytes Links

Trading Reference Links

Rick,
As you see in 
GetCategorySymbols( category, index ) 
description, index is a market/group/industry/sector/watchlist number:
0..255 for categoryMarket, categoryGroup, categoryIndustry
0..63 for categorySector, categoryWatchlist.
If, for example, your database is in WatchList10, then you should 
change the 
list = GetCategorySymbols( categoryGroup, listnum );
with
list = GetCategorySymbols( categoryWatchlist, listnum );
and replace the
No=254;
with
No=10;
All the rest remain unchanged.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Rick Osborn" <ricko@xxxx> wrote:
> Dimitris
> In a comment in the code you included
> "replace 254 with your Group No
> Can this be changed to any watchlist - and if so how does one do 
that?
> Rick
> 
> 
> ----- Original Message ----- 
>   From: DIMITRIS TSOKAKIS 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Monday, September 08, 2003 1:56 PM
>   Subject: [amibroker] Re: One-step top10 exploration
> 
> 
>   John,
>   I was working part by part on the same machine two different 
methods 
>   and, for my correlations, I missed the last updates. Just take 
care 
>   the preliminary details : I have, in Group254, the 100 N100 
>   stocks+the index ^NDX, total 101 tickers. You may of course 
arrange 
>   these according to your setup, it will not affect the code flow. 
The 
>   category may be a group/watchList etc
>   Dimitris Tsokakis
>   --- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
>   > Hi Dimitris,
>   > 
>   > Thanks for putting this together.
>   > 
>   > Should I be only concerned with the process and not the 
results? 
>   > 
>   > Because I got a completely different result list using freshly 
>   downloaded End of Day Nasdaq100 data from Yahoo. (see attached, 
with 
>   my results on the left and yours on the right).
>   > 
>   > thanks
>   > 
>   > -john
>   >   ----- Original Message ----- 
>   >   From: Dimitris Tsokakis 
>   >   To: amibroker@xxxxxxxxxxxxxxx 
>   >   Sent: Monday, September 08, 2003 2:59 AM
>   >   Subject: [amibroker] One-step top10 exploration
>   > 
>   > 
>   >   In AA window paste the
>   > 
>   >   // top10 exploration
>   >   function select( listnum )
>   >   {
>   >    list = GetCategorySymbols( categoryGroup, listnum );
>   >    Rank = 0;
>   >    for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
>   >    {
>   >      C1 = Foreign( sym, "C" );
>   >      f=LastValue(RSIa(C1,14));
>   >      Rank[BarCount-1-i] = f[i];
>   >    }
>   >    return Rank ; 
>   >   }
>   >   No=254;// replace 254 with your Group No
>   >   R= Select(No);H0=Select(No);
>   >   L1=LastValue(Cum(1));
>   >   N=101;// the population of the database
>   >   TOP=10;// the topX calibration
>   >   for(K=1;K<=TOP;K++)
>   >   {
>   >   H1=LastValue(HHV(H0,n));
>   >   BAR1=LastValue((ValueWhen(H0==H1,Cum(1)-1)));
>   >   H0[BAR1]=-10;
>   >   }
>   >   Filter=H0==-10;
>   >   AddColumn(L1-Cum(1),"ORD",1.0);
>   >   AddColumn(R,"RSI");
>   > 
>   >   Explore now current stock [any stock, the result will be the 
>   same...] for all quotations.
>   >   The result list will give you the ordinal No of the top10 
stocks 
>   and their LastValue(RSI()).
>   >   This is an one-step procedure, thanks to GetCategorySymbols() 
>   function.
>   >   Dimitris Tsokakis
>   > 
>   >         Yahoo! Groups Sponsor 
>   >               ADVERTISEMENT
>   >              
>   >        
>   >        
>   > 
>   >   Send BUG REPORTS to bugs@xxxx
>   >   Send SUGGESTIONS to suggest@xxxx
>   >   -----------------------------------------
>   >   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 the Yahoo! Terms of 
>   Service.
> 
> 
>         Yahoo! Groups Sponsor 
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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 the Yahoo! Terms of 
Service.


------------------------ 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/l.m7sD/LIdGAA/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/