PureBytes Links
Trading Reference Links
|
Chuck,
You will have to use the
immediate IF function:
Cond1
= IIf( <FONT
color=#0000ff>Year() == <FONT
color=#ff00ff>1997, <FONT
color=#0000ff>InWatchList(<FONT
color=#ff00ff>47<FONT
color=#000000>), IIf<FONT
color=#000000>(Year() ==
1998, <FONT
color=#0000ff>InWatchList(<FONT
color=#ff00ff>48), False));
etc..
Regards,William <SPAN
class=328411302-30122003>
<FONT
face=Tahoma size=2>-----Original Message-----From: William Peters
[mailto:williampeters@xxxxxxxxxxxx]Sent: Monday December 29, 2003
8:57 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE:
[amibroker] How to use multiple NASDAQ lists?
Hello Chuck,
Some ideas...
(untested)
Set the AA
range From/To date to the total period 1997 - 2003 or whatever period you
are testing.
<FONT
size=2>
Put all the symbols from all the files into
a single watchlist called, say "ALLN100Symbols"
and set the Apply to filter in AA to
that watchlist. (This will save you from having to scan the whole
database)
Add each years list into thier own
watchlist i.e 47 = 1997 48 = 1998 etc etc.
Within your code write an If/Else If
statement like this:
If ( Year() == 1997 )
Cond1 = InWatchlist(47);
else if ( Year() == 1998 )
Cond1 = InWatchlist(48);
etc etc..
add that condition (Cond1) to your buy
or short statement and that should be pretty close..and thanks for the
lists.
Regards,William Peters<A
href=""><FONT
size=3>www.amitools.com
<FONT face=Tahoma
size=2>-----Original Message-----From: Chuck Rademacher
[mailto:chuck_rademacher@xxxxxxxxxx]Sent: Monday December 29, 2003
7:20 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
How to use multiple NASDAQ lists?
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.
<FONT face=Arial color=#0000ff
size=2>
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.
<FONT face=Arial color=#0000ff
size=2>
Anyone
care to help me and, no doubt, others by supplying some
code?
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>Thanks,
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>ChuckSend BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend
SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! 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
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 the Yahoo! Terms of Service.
|