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

[amibroker] WatchList Creator (was AmiBroker Performance Continued -- What Settings)



PureBytes Links

Trading Reference Links

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

 
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/