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

[amibroker] Re: How to use multiple NASDAQ lists?


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] Re: How to use multiple NASDAQ lists?
  • From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
  • Date: Tue, 30 Dec 2003 00:25:37 -0800
  • In-reply-to: <00e201c3ce6a$a4b42330$0101a8c0@xxxxxxx>

PureBytes Links

Trading Reference Links

Chuck,
Following the conventions
*Year2000 synthesis into WL10
*Year2001 into WL11
*Year2002 into WL12
*Year2003 into WL13
*All above stocks into WL15
*exit open trades by the end of the year
here is the code to backtest them.
Select WL15 for all quotations with

Buy1=Cross(StochD(),30);Sell1=Cross(StochD
(),80);Short1=Sell1;Cover1=Buy1;//the trading rules
Y2000=Year()==2000;
Y2001=Year()==2001;
Y2002=Year()==2002;
Y2003=Year()==2003;
Cond0=Year()==2001 AND Ref(Year(),-1)==2000;//exit by the end of the 
year
Cond1=Year()==2002 AND Ref(Year(),-1)==2001;
Cond2=Year()==2003 AND Ref(Year(),-1)==2002;
Cond3=Year()==2004 AND Ref(Year(),-1)==2003;
Buy=(
InWatchList(10)*Y2000+
InWatchList(11)*Y2001+
InWatchList(12)*Y2002+
InWatchList(13)*Y2003)*Buy1;
Sell=
(InWatchList(10)*Sell1 OR Cond0)+
(InWatchList(11)*Sell1 OR Cond1)+
(InWatchList(12)*Sell1 OR Cond2)+
(InWatchList(13)*Sell1 OR Cond3);
Short=(
InWatchList(10)*Y2000+
InWatchList(11)*Y2001+
InWatchList(12)*Y2002+
InWatchList(13)*Y2003)*Short1;
Cover=
(InWatchList(10)*Cover1 OR Cond0)+
(InWatchList(11)*Cover1 OR Cond1)+
(InWatchList(12)*Cover1 OR Cond2)+
(InWatchList(13)*Cover1 OR Cond3);

I hope the mechanism is clear.
Dimitris Tsokakis

--- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher" 
<chuck_rademacher@x> wrote:
> I'm hoping that one of you guys (or gals) who were able to use the
> historical NASDAQ lists that I posted can now help me.   I 
basically want to
> trade only the stocks on the 1997 list, for instance, in 1997.   
The stocks
> on the 2001 list in 2001.   And so on.
> 
> I'm assuming that I would make a watchlist that contains the sum of 
all of
> the watchlists (1995 to 2003).   I would then create a separate 
watchlist
> for each year.   Then, while trading the master list, my AFL would 
check the
> year using the Year() function and only trade if the stock was in 
the
> watchlist for the corresponding year.   Once in a trade, I won't 
worry about
> exiting if the stock no longer appears in the list.   I have my own 
way of
> determining if the stock is no longer traded.
> 
> Anyone care to help me and, no doubt, others by supplying some code?
> 
> Thanks,
> 
> Chuck


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

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/