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

RE: [amibroker] Re: Conditional WatchLists per Inspection Point



PureBytes Links

Trading Reference Links

Dimitris:  thank you.  I have studied the code (by eye) and will insert
it into AB and experiment.

More later.

Ken

-----Original Message-----
From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@xxxxxxxxx] 
Sent: Wednesday, November 12, 2003 2:10 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Conditional WatchLists per Inspection Point

Ken,
now you may see an attempt at
http://groups.yahoo.com/group/amibroker/message/51794
The criterion per IP was not an indicator value but the Equity 
itself, I think it is more interesting.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> Dimitris:  this is very exciting (and a good teaching tool as are 
many
> of your messages).
> 
>  
> 
> Recalling my objective to control the buying and selling of a new
> watchlist created between Inspection Points, may I conclude that
> eventually this code can be placed into the AA window for a 
backtest.
> 
>  
> 
> It appears that If I write new Watchlists WL40 to WL44, that then 
the
> code may continue and first trade against WL40 until a new IP 
arrives,
> then trade against WL41 until the next IP arrives, etc. and all the
> while continuing to create a composite equity line for all WL 
backtests
> over the full range.
> 
>  
> 
> I hope this is the goal and I hope it is possible.  With your 
excellent
> information I will myself attempt to achieve this, but the odds are 
low
> of my success, so I await yours.
> 
>  
> 
> Ken
> 
>  
> 
> -----Original Message-----
> From: Dimitris Tsokakis [mailto:TSOKAKIS@x...] 
> Sent: Saturday, November 08, 2003 7:05 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Conditional WatchLists per Inspection Point
> 
>  
> 
> 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
> 
> 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 creation
> 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;//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;
> 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
> CategoryAddSymbol(w,categoryWatchlist,40+u-q); but it does not work
> Note2. Each w is a string like
> "LNCR,TLAB,FHCC,ESRX,PAYX,GNTX,SIAL,ADCT,XLNX,PDCO"
> 
>             I do not know if it is technically possible in
> CategoryAddSymbols() to use a string like this instead of a single
> Name()
> 
>             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
> 
>             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
>  
> 
<http://rd.yahoo.com/M=267637.4116732.5333197.1261774/D=egroupweb/S=17
05
> 
632198:HM/A=1853619/R=0/SIG=11tr82r20/*http:/www.netflix.com/Default?
mqs
> o=60178356&partid=4116732> click here
> 
> 
>  
> <http://us.adserver.yahoo.com/l?
M=267637.4116732.5333197.1261774/D=egrou
> pmail/S=:HM/A=1853619/rand=922963631> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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!
> <http://docs.yahoo.com/info/terms/>  Terms of Service.



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
http://docs.yahoo.com/info/terms/ 



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/