PureBytes Links
Trading Reference Links
|
The
START=DateNum()==1000530
;per=200;EVENT=BarsSince(START)%per==0;Plot(event,"",2,2);defines 5
Inspection Points from 30/5/2000 till now.
At each IP we shall create a WatchList with the top10 StochD
stocks.
A date will be printed on the pane for each IP for the
verification.
[My checks were fine]
I have a database of the N100 stocks+the index ^NDX in
Group254 from Jan3, 2000 till now.
The Group254 does not include any other stock or
index.
In an empty Indicator Builder window paste the
// Conditional WatchList creation, by D. Tsokakis,
Nov2003
START=DateNum()==1000530
;per=200;EVENT=BarsSince(START)%per==0;Plot(event,"",colorWhite,2);u=LastValue(Cum(event));No=254;Title="The
top10 StochD are";for(q=u;q>0;q--){list = GetCategorySymbols(
categoryGroup, No );R = 0; Count1=0; for( i = 0; ( sym = StrExtract(
list, i ) ) != ""; i++
){SetForeign(sym);f=StochD();R[BarCount-1-i] =
LastValue(ValueWhen(event,f,q));Count1=Count1+1;}
G=0;L1=LastValue(Cum(1));TOP=10;W="";Counter=0;for(K=1;K<=TOP;K++){H1=LastValue(HHV(R,Count1));BAR1=LastValue((ValueWhen(R==H1,Cum(1)-1)));R[BAR1]=-100000;Counter=Counter+1;G[L1-CountER]=-H1;w=w+StrExtract(List,L1-bar1-1)+WriteIf(k<top,",","");}Title=Title+"\nW"+WriteVal(u-q,1.0)+"
: "+w;}Title=Title+"\n"+WriteIf(event,Date(),"");
To check the top10, explore for the specific EVENT dates
with
<FONT
size=2>x=StochD();Filter=1;AddColumn(x,"StochD");
as in the att. gif.
These WatchLists do not belong to the symbol tree, they are
created for in-code use.
The next step is to see what we can do with these W0 to
W4.
Dimitris Tsokakis
PS:
We may send W0 to W4 to 5 empty WatchLists
of the symbol tree, say WL40, WL41, WL42, WL43, WL44
with the
START=DateNum()==1000530
;per=200;EVENT=BarsSince(START)%per==0;Plot(event,"",colorWhite,2);u=LastValue(Cum(event));//
Conditional WatchList creationNo=254;Title="The top10 StochD
are";for(q=u;q>0;q--){list = GetCategorySymbols( categoryGroup,
No );R = 0; Count1=0; for( i = 0; ( sym = StrExtract( list, i ) ) !=
""; i++ ){SetForeign(sym);f=StochD();R[BarCount-1-i] =
LastValue(ValueWhen(event,f,q));Count1=Count1+1;}
G=0;L1=LastValue(Cum(1));TOP=10;W="";Counter=0;//Title="Top10
StochD"+"\n";for(K=1;K<=TOP;K++){H1=LastValue(HHV(R,Count1));BAR1=LastValue((ValueWhen(R==H1,Cum(1)-1)));R[BAR1]=-100000;Counter=Counter+1;G[L1-CountER]=-H1;w=w+StrExtract(List,L1-bar1-1)+WriteIf(k<top,",","");}Title=Title+"\nW"+WriteVal(u-q,1.0)+"
: "+w;<FONT
color=#ff0000>for(K=0;K<TOP;K++){CategoryAddSymbol(StrExtract(W,K),categoryWatchlist,40+u-q);}}Title=Title+"\n"+WriteIf(event,Date(),"");
Hit Apply and then View->RefreshAll
Note1. I tried a
direct use of <FONT
color=#ff0000>CategoryAddSymbol(w,categoryWatchlist,40+u-q);
but it does not
workNote2. Each w is a string like
"LNCR,TLAB,FHCC,ESRX,PAYX,GNTX,SIAL,ADCT,XLNX,PDCO"
<FONT
size=2> I
do not know if it is technically possible in CategoryAddSymbols() to use a
string like this instead of a single Name()
<FONT
size=2> in
some future upgrade, I think it would be interesting...
Note3. I do not know, yet, how to
remove ALL symbols from a WL at once in Ind. Builder, where the "" [current
stock] is
<FONT
size=2> only
the selected stock
Note4. I do not know also how can I give the
"RefreshAll" order from the IB code.
Last [optimistic] note. At least I know my name and
it is not bad at all !!
Dimitris Tsokakis
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.
Attachment:
WL.gif
Attachment:
Description: "Description: GIF image"
|