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 -----
Sent: Thursday, April 12, 2007 8:22
PM
Subject: [amibroker] To Sort a
WatchList
__._,_.___
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
__,_._,___
|
|