PureBytes Links
Trading Reference Links
|
Here is another solution for the top10 list of WL5, as for the Stochd
() array.
// TOP LIST
top=10;WLno=5;
g=0;x=0;k=0;topList="";M="";
List=CategoryGetSymbols(categoryWatchlist,WLno);
for(d=1;d<top;d++)
{
for(i=0;(sym=StrExtract(List,i))!="";i++)
{
SetForeign(sym);
x=StochD();
RestorePriceArrays();
g=IIf(x>g,x,g);
}
for(i=0;(sym=StrExtract(List,i))!="";i++)
{
SetForeign(sym);
x=StochD();
topList=topList+WriteIf(x==g,sym,"")+WriteIf(x==g,",","");
M=M+WriteIf(X!=G,SYM,"")+WriteIf(X!=G,",","");
}
List=m;g=0;x=0;m="";
}
Filter=1;// any current stock for the n=1 last quotations
AddTextColumn(topList,"top"+WriteVal(top,1.0)+"List of WL"+WriteVal
(WLno,1.0));
Title="top"+WriteVal(top,1.0)+"List of WL"+WriteVal(WLno,1.0)
+" : "+topList;
Use it in IB or AA, the topList is free [outside any loop] for
further use.
The trick was to remove from the initial list the top stock of each
cycle. No composites, no auxiliary arrays, quite fast, no external
plugins, it seems good...
Dimitris Tsokakis
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
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
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/
|