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

RE: [amibroker] Ranking of MG Industry Groups



PureBytes Links

Trading Reference Links

Check-out the function:

SetSortColumns( col1, col2, .... )  

Cheers,

Gordon Sutherland

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of marketmonk777
Sent: Saturday, 23 June 2007 8:02 p.m.
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Ranking of MG Industry Groups

Hi folks,

I run an analysis each weekend on the 240 MG Industry Groups (Main
plus Subs) to calculate various metrics like the 1 day, 5 day, 21 day,
63 day, and 250 price change (in %).

What I would like to do is rank each of those columns.

Here is some simple code that looks up last year's closing price and
calculates the YTD performance:

// Last Year's closing value and YTD performance
LYC = ValueWhen( Year()!= Ref(Year(),1), C );
AddColumn(LYC,"L YR C" , 3.2, colorDarkRed, colorLightGrey, 60);
YTDP = (  (C - LYC)/ LYC )*100;
AddColumn(YTDP,"YTD %", 3.1, colorDarkRed, colorLightGrey, 50);

How would I generate a ranking from 1 (best) to 240 (worst) based on
this column?

Can I run multiple rankings for the other columns as well?

Regards,

MM

  



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links







Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/