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

Re: [amibroker] To Sort a WatchList



PureBytes Links

Trading Reference Links

Not impossible, just a bit unwiedly.  Try starting with something like this;
 

procedure SORTWATCHLIST(ListToUse)

{

// Create zero-based Scores array

for( j=0; (CurrentTicker=StrExtract( ListtoUse, j)) != ""; j++)

{

SortToUse = SelectedValue((GetTClose(CurrentTicker) - GetTLow(CurrentTicker)) / GetTClose(CurrentTicker) *100);

TickerScore[j] = SortToUse;

TickerIndex[j] = j; //Index number of the Ticker

//printf("\n" + WriteVal (j) + StrExtract(ListToUse,j) + "\t" + WriteVal(TickerScore[j]));

}

TickerCount= j;

// Sort Tickers by index

for(i = TickerCount-1; i>=0; i--)

{

for (j = 1; j <= i; j++)

{

if (TickerScore[j-1] > TickerScore[j])

{

temp = TickerScore[j-1]; TickerScore[j-1] = TickerScore[j];

TickerScore[j] = temp;

temp = TickerIndex[j-1]; TickerIndex[j-1] = TickerIndex[j];

TickerIndex[j] = temp;

}

}

}

} //procedure

----- Original Message -----
From: Bob Jagow
Sent: Thursday, April 12, 2007 8:22 PM
Subject: [amibroker] To Sort a WatchList

Impossible dream?

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___