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

RE: [amibroker] Re: Bugged out (1) - RANK()



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Tony,
<FONT face=Arial color=#0000ff 
size=2> 
I'm 
new to AMI Broker and I haven't used the "explore" feature and probably will not 
since<FONT face=Arial color=#0000ff 
size=2> I use the "scan" feature as "stockcharts.com" for all my filtering 
so I don't have to download stock data to search.
<FONT face=Arial color=#0000ff 
size=2> 
Sorry 
I can't help...
<FONT face=Arial color=#0000ff 
size=2> 
<SPAN 
class=000352222-26052003>                        
Walt

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx]Sent: Monday, May 26, 2003 6:08 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
  Re: Bugged out (1) - RANK()
  Walt,
   
  Could you give a brief example using your 
  functions....in explore..
   
  Thank you
  Anthony
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A title=WSCHWARZ@xxxxxxxxxxxxx 
    href="">walt 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Monday, May 26, 2003 3:18 
PM
    Subject: RE: [amibroker] Re: Bugged out 
    (1) - RANK()
    
    <SPAN 
    class=812181719-26052003>Here are two functions that should jump-start your 
    efforts;
    <SPAN 
    class=812181719-26052003> 
    <SPAN 
    class=812181719-26052003>
    //walt Schwarz May 2003
    // sort & rank functions
    // beta 4.38 and up...
    /<FONT face="Courier New" color=#008000 
    size=1>/*****************************/<FONT face="Courier New" 
    color=#800000 size=1>
    function 
    sort(inlist)
    {
    //sort 
    inlist
    temp=0<FONT 
    face="Courier New" size=1>;
    <FONT face="Courier New" color=#800000 
    size=1>for(i = 
    BarCount-<FONT face="Courier New" color=#ff00ff 
    size=1>1; i>=<FONT 
    face="Courier New" color=#ff00ff size=1>0<FONT face="Courier New" 
    size=1>; i--)
    {
    <FONT face="Courier New" color=#800000 
    size=1>for (j = <FONT 
    face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
    size=1>; j <= i; j++)
    {
    <FONT face="Courier New" color=#800000 
    size=1>if (inlist[j-<FONT 
    face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
    size=1>] > inlist[j])
    {
    temp = inlist[j-<FONT face="Courier New" color=#ff00ff 
    size=1>1];
    inlist[j-<FONT face="Courier New" color=#ff00ff 
    size=1>1] = inlist[j];
    inlist[j] = temp;
    }
    }
    }
    //nlist now 
    sorted
    <FONT face="Courier New" color=#800000 
    size=1>return inlist;
    }
    /<FONT face="Courier New" color=#008000 
    size=1>/*****************************************/<FONT 
    face="Courier New" color=#800000 size=1>
    function 
    rankIt(rankItem,inlist)
    {
    //see 
    where rankItem fits…
    rank=0<FONT 
    face="Courier New" size=1>;
    <FONT face="Courier New" color=#800000 
    size=1>for(i = 
    BarCount-<FONT face="Courier New" color=#ff00ff 
    size=1>1; i>=<FONT 
    face="Courier New" color=#ff00ff size=1>0<FONT face="Courier New" 
    size=1>; i--)
    {
    <FONT face="Courier New" color=#800000 
    size=1>if(rankItem > inlist[i] 
    )
    {
    rank=i; 
    i=-1<FONT 
    face="Courier New" size=1>;
    }
    }
    <FONT face="Courier New" color=#800000 
    size=1>return 
    rank/BarCount*<FONT face="Courier New" color=#ff00ff 
    size=1>100;
    }
    //********************************************/<FONT 
    face="Courier New" size=1>
    //sort the Values...
    sz=sort(C);<FONT face="Courier New" color=#008000 
    size=1>
    //find where an item is ranked...<FONT face="Courier New" 
    size=1>
    item=2<FONT 
    face="Courier New" size=1>;
    rank=rankIt(item,sz);<FONT face="Courier New" color=#0000ff 
    size=1>
    Plot(sz,<FONT 
    face="Courier New" color=#ff00ff size=1>"sort"<FONT 
    face="Courier New" size=1><FONT 
    color=#000000>,colorRed);<FONT face="Courier New" 
    color=#0000ff size=1>
    Plot<FONT face="Courier New" color=#000000 
    size=1>(rank,<FONT face="Courier New" color=#ff00ff 
    size=1>"rank"<FONT 
    color=#000000>,colorBlue);
    
      <FONT face=Tahoma 
      size=2>-----Original Message-----From: rlb21079 
      [mailto:rlb21079@xxxxxxxxxx]Sent: Monday, May 26, 2003 1:58 
      PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
      Re: Bugged out (1) - RANK()Thanks for the 
      tips.  I have read the Users Guide twice and have searched it for 
      specifics often.  The ROC() is a useful funtion, but right now 
      will not be of much use.  My problem biggest problem has been my 
      inability to compare one ticker to another, or more specifically one 
      ticker's volume to the volume of all other tickers in a market.  
      This seems to be the essential aspect to creating a ranking of stocks, 
      as per volume, change in price, ROC(), or whatever.  There 
      doesn't seem to be a function like say RANK(), the parameters of which 
      might be: "Ticker for comparison," "Group/Market/Watchlist for 
      comparing," "Array to compare"There, of course, could be many 
      variations on a function such as this and I haven't thought them 
      through - but it would be useful.It would allow for the creation 
      of Composite Tickers based on such popular measures as Most Active per 
      Volume, per percentage change, per percentage increase in volume, 
      etc.Thankyou for your time,-Rich--- In 
      amibroker@xxxxxxxxxxxxxxx, Udo.Harke@xxxx wrote:> Rich,> 
      > maybe you should devise a selection of those particular stocks 
      based on the AFL library function ROC() by comparing today's progress 
      ( > 0) versus the preceding day's change of price (> 0 too) 
      expressed as percentage?> > Some information about this 
      function is also contained in the User's Guide which is a companion 
      product issued with AmiBroker!> > Best regards,> 
      > Udo> >   -----Ursprüngliche 
      Nachricht----- >   Von: rlb21079 >   An: 
      amibroker@xxxxxxxxxxxxxxx >   Gesendet: Sonntag, den 25. 
      Mai 2003 22:58 Uhr>   Betreff: [amibroker] Re: Bugged out 
      (1)> > >   I'm very sorry to all reading my 
      previous posts.  Esp. Tomasz.  I >   wanted to 
      create a composite ticker holding each day a single value 
      >   comprised of the sum of the direction of change for 
      the 15 most >   active stocks of that given day.  If 
      the 15 most actively traded >   stocks were all positive, 
      then value would be +15, if all but one >   then value 
      would be +13...etc.  I inteded the requirement of the 
      >   rangefrom and rangeto dates to be the same b/c I 
      figured I needed to >   run the explore once for 
      every day I wanted to calculate the number.  >   
      The code wasn't done, this was just the first couple steps to isolate 
      >   the 15 most actives, but I really can't figure any 
      other way.  I'll >   get more practice with 
      something easier and hopefully be able to do >   this 
      later.>   All the best,>   Rich> 
      > > > 
      >         Yahoo! Groups 
      Sponsor >        
      >        > 
      >   Send BUG REPORTS to bugs@xxxx>   
      Send SUGGESTIONS to suggest@xxxx>   
      ----------------------------------------->   Post 
      AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
      >   (Web page: <A 
      href="">http://groups.yahoo.com/group/amiquote/messages/)>   
      -------------------------------------------->   Check 
      group FAQ at: <A 
      href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
      > >   Your use of Yahoo! Groups is subject to the 
      Yahoo! Terms of Service.Send BUG REPORTS to 
      bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
      suggest@xxxxxxxxxxxxx-----------------------------------------Post 
      AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
      <A 
      href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
      group FAQ at: <A 
      href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
      Your use of Yahoo! Groups is subject to the <A 
      href="">Yahoo! Terms of Service. 
      
    Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
    
  <BLOCKQUOTE 
  ><FONT 
    face="Courier New">---Outgoing mail is certified Virus 
    Free.Checked by AVG anti-virus system (<A 
    href="">http://www.grisoft.com).Version: 
    6.0.483 / Virus Database: 279 - Release Date: 
5/19/2003Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.