PureBytes Links
Trading Reference Links
|
Hello Bernard
I am glad to share this but do note that it comes on an "as
is" basis without any guaranttee of any kind. It is not
"perfect" but it works well enough for my use.
The code is very specific to working with the naming
conventions of CSI stock data. Some of the code deals with
detecting which stocks are inactive. The numbers in the
ticker name are unique CSI ID numbers which have to be
added so that two stocks do not have the same file name in
AB and thus overwrite each other's data. Sometimes a stocks
exchange will give a new stock the ticker that used to be
used by a delisted stocks.
Also, at one time the CSI export to AB included British and
Canadian stocks so there is AFL code to detect these by the
"-T", "-L", etc. additions to the ticker. I think CSI no
longer exports these foreign stocks to AB, but I have not
bothered to redo my AFL code.
Similarly, CSI includes "preferred" stocks (they have a
"+B" or similar marker in the ticker name. Some AFL code
detects these stocks so they can be excluded when I test.
If you think some AFL lines are redundant, they may well
be. I have often thought the code could be made a bit more
efficient, but have not gotten to that since it works well
enough for my use.
So remember, this code is shared on an "as is" basis
without any quaranttee of any kind. Take what you like from
it and be sure to double check that it does what you want
it to.
b
--- Bernard Bourée <bernard@xxxxxxxxxx> wrote:
Hi b
I would be interested in your "watchlist creator"
Thanks
Bernard
bernard@xxxxxxxxxx
b a écrit :Joe:
Glad I can help. I owe a big debt to this group for all the
help I have received over the past 3 years. It is nice to
give back to the group.
Yes, there is a way to quickly clear the watchlists. Here
is the snip to do that. The lines of code are short so
Yahoo will not likely break the code by wrapping the lines.
//---------------------------------------------
//----Assignments to Watchlists----------------
//These 4 lines will clear watchlists 50 to 62.
//---------------------------------------------
for( i = 50; i < 63; i++ )
{
CategoryRemoveSymbol( "", categoryWatchlist, i ) ;
} //VIP: no ";" after "}"
//--------------------------------------------
//--End of snip-------------------------------
//--------------------------------------------
This snip and the previous one comes from my "Watchlist
Creator" that I run after updating my CSI database.
CSI provides almost "too many" stocks (about 25,000
stocks), but I want to test my ideas on delisted stocks as
well as active ones and CSI is the only provider that gives
me this. However, CSI gives many other types of stocks that
I am not interested in testing - such as "preferred" shares
for US stocks, stocks that only trade on the various
Canadian exchanges, and British stocks. My "watchlist
creator" is a way to exclude most of these so I can run
tests on US common stocks and ETFs (both delisted and still
active). The code I shared earlier extends the watchlist
creation to exclude stocks that lack the minimum liquidity
that I would trade.
The full AFL code of the "watchlist creator" is rather long
and tedious so I will not post it unless someone wants to
see it.
b
--- Joe Landry <jelandry@xxxxxxxxxxxxx> wrote:
> B
> Thanks for posting this, it is really useful and will
> circulate to our local group.
>
> If you're running these screens on a daily basis, is
> there a way "programatically" to
> erase the subject watchlist, that is 'make empty' so
> that you have a fresh set of tickers that meet
> your criteria each time you run this code.
>
> Best regards
> JOE
>
> ----- Original Message -----
> From: b
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Thursday, June 23, 2005 3:24 PM
> Subject: RE: [amibroker] AmiBroker Performance
> Continued -- What Settings are Fastest?
>
>
> Tomasz and others:
>
> This is a very interesting and helpful discussion. I am
> sure I speak for many others.
>
> Since my current system is limited to 1.5 GB of RAM, I
> have
> also used special watchlists to reduce the number of
> stocks
> that AB needs so everything fits into RAM.
>
> Here is a snip of AFL to give the idea how these
> watchlists
> can be created. The key is to use "CUM" to find any
> stock
> that needs to be in the watchlist.
>
> Watch for line wrap problems when copying the code.
>
> b
>
> //----------------------------------------------
> //For increased testing speed,
> //it is helpful to group stocks into
> //watchlists with minimum volume,
> //and also by price ranges. Note, if a stock meets
> //the criteria of a watchlist for even
> //a single day, it is included in the watchlist.
>
> // although I trade with 100k mininum vol, this uses
> // 50k since 100k gives too few stocks prior to 1998
>
> av50 = MA(V,5) > 50000;// use 100k for stocks over $10
>
> p1_10 = av50 AND OI >= 100 AND OI < 1000;
> p10_up = av50 AND OI >= 1000;
>
> Cum_p1_10 = LastValue(Cum(p1_10) ,True);
> Cum_p10_up = LastValue(Cum(p10_up) ,True);
>
> if(Cum_p1_10) CategoryAddSymbol( "", CategoryWatchlist,
> 56
> ) ;//US 1-10
> if(Cum_p10_up)CategoryAddSymbol( "", categoryWatchlist,
> 58
> ) ;//US 10+
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
> Please note that this group is for discussion between
> users only.
>
> To get support from AmiBroker please send an e-mail
> directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
>
------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>
> b.. To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of Service.
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection
around
http://mail.yahoo.com
Please note that this group is for discussion between
users only.
To get support from AmiBroker please send an e-mail
directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
-- Bernard Bouréebernard@xxxxxxxxxxxxx: +33 6 09 11
05 91
Please note that this group is for discussion between users
only.
To get support from AmiBroker please send an e-mail
directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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:
http://docs.yahoo.com/info/terms/
Attachment:
Description: 2264873789-1_CSI_WatchlistCreator_6b.afl
|