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

[amibroker] Re: Two Days after the Bullish Inflection



PureBytes Links

Trading Reference Links

Ken,
you may select any candidate for further research.
On this topic, there is a great AFL inprovement :
I begin with the two lines

// ticker selection0
SetForeign("^NDX");
C1=C;

to get ^NDX Close for all stocks.
In order to investigate my whole N100 database, I needed the

// ticker selection1
NUM=Optimize("NUM",0,0,100,1);
N=
WriteIf(NUM==0,"^NDX",
WriteIf(NUM==1,"AAPL",
WriteIf(NUM==2,"ADBE",
WriteIf(NUM==3,"ADCT",
WriteIf(NUM==4,"ALTR",
WriteIf(NUM==5,"AMAT",
WriteIf(NUM==6,"AMGN",
WriteIf(NUM==7,"AMZN",
WriteIf(NUM==8,"APCC",
WriteIf(NUM==9,"APOL",
WriteIf(NUM==10,"BBBY",
WriteIf(NUM==11,"BEAS",
WriteIf(NUM==12,"BGEN",
WriteIf(NUM==13,"BMET",
WriteIf(NUM==14,"BRCD",
WriteIf(NUM==15,"BRCM",
WriteIf(NUM==16,"CDWC",
WriteIf(NUM==17,"CEPH",
WriteIf(NUM==18,"CHIR",
WriteIf(NUM==19,"CHKP",
WriteIf(NUM==20,"CHRW",
WriteIf(NUM==21,"CIEN",
WriteIf(NUM==22,"CMCSA",
WriteIf(NUM==23,"CMVT",
WriteIf(NUM==24,"COST",
WriteIf(NUM==25,"CPWR",
WriteIf(NUM==26,"CSCO",
WriteIf(NUM==27,"CTAS",
WriteIf(NUM==28,"CTXS",
WriteIf(NUM==29,"DELL",
WriteIf(NUM==30,"DISH",
WriteIf(NUM==31,"DLTR",
WriteIf(NUM==32,"EBAY",
WriteIf(NUM==33,"ERICY",
WriteIf(NUM==34,"ERTS",
WriteIf(NUM==35,"ESRX",
WriteIf(NUM==36,"EXPD",
WriteIf(NUM==37,"FAST",
WriteIf(NUM==38,"FHCC",
WriteIf(NUM==39,"FISV",
WriteIf(NUM==40,"FLEX",
WriteIf(NUM==41,"GENZ",
WriteIf(NUM==42,"GILD",
WriteIf(NUM==43,"GNTX",
WriteIf(NUM==44,"HGSI",
WriteIf(NUM==45,"HSIC",
WriteIf(NUM==46,"ICOS",
WriteIf(NUM==47,"IDPH",
WriteIf(NUM==48,"INTC",
WriteIf(NUM==49,"INTU",
WriteIf(NUM==50,"IVGN",
WriteIf(NUM==51,"JDSU",
WriteIf(NUM==52,"JNPR",
WriteIf(NUM==53,"KLAC",
WriteIf(NUM==54,"LAMR",
WriteIf(NUM==55,"LLTC",
WriteIf(NUM==56,"LNCR",
WriteIf(NUM==57,"MCHP",
WriteIf(NUM==58,"MEDI",
WriteIf(NUM==59,"MERQ",
WriteIf(NUM==60,"MLNM",
WriteIf(NUM==61,"MNST",
WriteIf(NUM==62,"MOLX",
WriteIf(NUM==63,"MSFT",
WriteIf(NUM==64,"MXIM",
WriteIf(NUM==65,"NTAP",
WriteIf(NUM==66,"NVDA",
WriteIf(NUM==67,"NVLS",
WriteIf(NUM==68,"NXTL",
WriteIf(NUM==69,"ORCL",
WriteIf(NUM==70,"PAYX",
WriteIf(NUM==71,"PCAR",
WriteIf(NUM==72,"PDCO",
WriteIf(NUM==73,"PETM",
WriteIf(NUM==74,"PIXR",
WriteIf(NUM==75,"PSFT",
WriteIf(NUM==76,"PTEN",
WriteIf(NUM==77,"QCOM",
WriteIf(NUM==78,"QLGC",
WriteIf(NUM==79,"RFMD",
WriteIf(NUM==80,"ROST",
WriteIf(NUM==81,"RYAAY",
WriteIf(NUM==82,"SANM",
WriteIf(NUM==83,"SBUX",
WriteIf(NUM==84,"SEBL",
WriteIf(NUM==85,"SIAL",
WriteIf(NUM==86,"SNPS",
WriteIf(NUM==87,"SPLS",
WriteIf(NUM==88,"SPOT",
WriteIf(NUM==89,"SSCC",
WriteIf(NUM==90,"SUNW",
WriteIf(NUM==91,"SYMC",
WriteIf(NUM==92,"TEVA",
WriteIf(NUM==93,"TLAB",
WriteIf(NUM==94,"USAI",
WriteIf(NUM==95,"VRSN",
WriteIf(NUM==96,"VRTS",
WriteIf(NUM==97,"WFMI",
WriteIf(NUM==98,"XLNX",
WriteIf(NUM==99,"XRAY",
"YHOO"
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
))))))))))))))))))))))))))))));
SetForeign(N);
C1=C;

carefully written and updated whenever a new symbol was added or 
another was out of the N100 list.
Now, for the same job, we need

// ticker selection2
NUM=Optimize("NUM",9,0,100,1);
list = GetCategorySymbols( categoryGroup, 254 );
symbol = StrExtract( list, NUM );
SetForeign(symbol);
C1=C;

without any further care. Just put the N100 stocks into Group254 [or 
any other Group, WL, etc] and run the optimization.
The result list will automatically select the best candidate among 
the N100 symbols.
I have used in the past the // ticker selection1, there is no doubt 
you may run kilometers of code lines to reach the target.
The // ticker selection2 gives an air of civilisation in our 
communication and I am sure you will agree.
We may enjoy this excellent AFL environment and feel lucky, once 
again, we met Tomasz in our way to Rome
[because, as you know, there are many ways to Rome, VV, GG, BB, ZZ 
etc...]
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> Thanks Dave:   too bad I don't stay current with all of the new
> commands..appreciate the reply.
> 
>  
> 
> Ken
> 
>  
> 
> -----Original Message-----
> From: Dave Merrill [mailto:dmerrill@x...] 
> Sent: Tuesday, September 30, 2003 4:35 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: Two Days after the Bullish Inflection
> 
>  
> 
> using SetForeign means that the trade signals won't come from the 
price
> of the current stock, but from the NDX. you should do what you've 
done,
> replace the symbol in that call with whatever the NASDAQ composite 
index
> is on your system. before you did that, the call had no effect, and
> signals were derived from the stocks you tested themselves. not a 
bad
> thing to investigate anyway...
> 
>  
> 
> dave
> 
> DT:  I find this quite interesting after plotting and backtesing 
numbers
> of stocks and watchlists.
> 
> I do not understand .... " All signals are based on ^NDX chart."
> 
> I do not understand the use of the SetForeign command and what it 
does
> in this context.  I comment it out and nothing changes.  
> 
> Errrrrr.....I just changed "^NDX" to my index symbol "NDX-X" and the
> returns tripled......Errrrrr......Why??
> 
> This was attractive when I was using it incorrectly, and now it is 
even
> better.
> 
> How do you come up with these things???????
> 
> Thanks for any further explanation.
> 
> Ken
> 
> -----Original Message-----
> From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...] 
> Sent: Tuesday, September 30, 2003 10:22 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Two Days after the Bullish Inflection
> 
> The main purpose was to show the use of inflection points.
> The results are not bad, if you consider it is a TTM [Trade The 
> Market] system. All signals are based on ^NDX chart. 
> This approach [and the successful behavior of the majority] gives a 
> good reason to use ^NDX as a trading platform.
> The comparison with B&H is also good to me.
> We didn't decide on Jan1 to Buy & Hold, as far as I remember !!
> We mainly decided to trade a cloudy market with very sad bearish 
> memories. When I was searching, last spring, for prolonged uptrend 
> indications, the request was a bit funny, many traders were waiting 
> another bearish episode and *nobody* would trust a B&H strategy.The 
> other useful result of this study is the transformation of Price 
> directly into an oscillation [without the indirect methods like 
RSI, 
> Stochastics etc]. Give me some time, the project is ready, but it 
> needs the bloody writing time !!
> Thank you for your comments.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
> wrote:
> > thanks for this Dimitris, it looks very interesting.
> > 
> > unfortunately, I don't see the performance results as positively 
as 
> you seem
> > to. over the past year, the NASDAQ 100 stocks show Annual system 
% 
> return of
> > 44.13%, but Annual B&H % return was 65.01%. for 2003, Annual 
system 
> % return
> > was 29.73%, but Annual B&H % return was 54.14%. for all quotes 
> (QuotesPlus),
> > Annual system % return was 19.14%, Annual B&H % return 30.58%.
> > 
> > there may be other ways we can make use of this principle, which 
> seems quite
> > right-headed, but for reasons that aren't entirely clear to me, 
it 
> doesn't
> > perform that well in its current state.
> > 
> > dave
> 
> 
> 
> 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
> http://docs.yahoo.com/info/terms/ 
> 
> 
> 
> 
> 
> 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. 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> 
> ADVERTISEMENT
>  
> 
<http://rd.yahoo.com/M=194081.3897168.5135684.1261774/D=egroupweb/S=17
05
> 
632198:HM/A=1732163/R=0/SIG=11n0nglqg/*http:/www.ediets.com/start.cfm?
co
> de=30510&media=zone> click here
> 
> 
>  
> <http://us.adserver.yahoo.com/l?
M=194081.3897168.5135684.1261774/D=egrou
> pmail/S=:HM/A=1732163/rand=234152947> 
> 
> 
> 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.


------------------------ 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/