Joe: thanks for this detail.  I have been searching and capturing published
code around these very issues, but had not seen the messages from NW Trader.

I am still on my quest to a) empty a watchlist; b) load a tls of symbols
programmatically; c) calculate an ATC average on this newly loaded list of
symbols, and d) save the ATC to another watchlist.

This speaks to my objective to produce ATCs of all the major ETFs (from
their holdings), which exceed the number of Watchlists available.  If I can
accomplish the above steps, then Watchlist number should not be a
limitation.

Can you or anyone give me an example of how to load a tls or txt file of
symbols programmatically and then perform an ATC on them.

I asked this several weeks ago, got no replies, and did not press for help
because of other tasks at the time.  I really would like some help on the
step b) above as I think I can accomplish the other steps from all of the
code snippits I have gathered.

Please help.

Thanks,

Ken 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Joe Landry
Sent: Friday, September 15, 2006 6:56 AM
To: [email protected]
Subject: Re: [amibroker] I need a little help with an ATC

Don -  The routines from a thread dating March of 2006 may help you to
Clear, Repopulate, and Add Exploration issues to watchlist.  There are
several contributions to that thread ending with the one by Patrick.  Other
contributors in the area have also been Dan Clark, Jeff, Steve Dugas. I'm
not in the Yahoo file so I don't know the message numbers.  Search on
NWTrader or Dan Clark.

In some of the writing I just found I noted some folks start with their 
"universe" of stocks numbering  8000 -10,000 or All Issues.    As the TC2000

Worden Bros. folks have taught,  you're probably be better to start with a
list of stocks that are tradeable( your definition)  with criteria like 
closing price and traded volume.   Here's my range  >$5, > $10 or 
 >$15.....Volume  > 50K, >100K or >200K.  This will reduce the number of
stocks that have to be loaded into your internal database (the 1st time
through) to 1/3 and screened.  I start with this daily from QP with the
criteria => 1) Is stock?, 2)Price > 5 and 3)Volume > 50K and work with a 
"universe" of just over 3500.   You can do this programmatically with AB as 
the first
job step.

Thanks for the recent posting to the Yahoo files.  Another place you can
post is in the AFL Library.


HTH
Joe L.


Hi Dave,

I'm joining the party late, so apologies if this has already been suggested 
and tried or if this isn't close to what you're looking for -- of late I've 
had no time to keep up with reading the group or do any AB work.  This is 
something I believe I got the basics of from Dan, adapted long ago and 
perhaps there are newer and better ways to do, but it works for my 
watchlists.  Via the parameters, you may clear, replace or add to a 
watchlist which you can select by number.  The default is to not clear, and 
if clearing then to refill.

As I use it, in other explorations, it allows me to manage watchlists daily 
and weekly -- altho I've not had time to do much in explorations and have 
been existing on a diet of daily trades in stocks I know well and which have

good % moves daily.  This is a trimmed down version of the output, but one 
can add ATR, Avg Range, RSI, ADX and a host of other columns to help refine 
the information.  The multiple column sort now makes this a very viable way 
for me to ID trading candidates.

AA Code is below and attached.  Enjoy.

Peace and Justice   ---   Patrick



// Basic Watchlist Management

// Code to clear a watchlist, repopulate that watchlist or add exploration 
results to an existing watchlist

w = Param("Empty Watchlist First? Yes = 1, No = 2" , 2, 1, 2, 1);

w1 = Param("Autofill Watchlist? Yes = 1, No = 2" , 1, 1, 2, 1);

x = Param ( "Add Results to an Existing Watchlist? Yes = 1, No = 2" , 2 , 1 
, 2 , 1 ) ; // select whether to add results to watchlist or not

y = Param("Set Watchlist Number", 2, 2, 60,1); // sets the watchlist number,

but reserves the first 2 and last 4 watchlists

Clear = IIf(w ==1, x==2, 0); if( LastValue(Clear) ) 
{CategoryRemoveSymbol("", categoryWatchlist, y); }

// -------- Parameter Variables for 
Exploration --------------------------------

TCH = Param("High close value ", 20, 5, 300, 0.5);

TCL = Param("Low close value " , 5, 1, 10, 0.25);

AVP = Param("Period for Avg Vol " , 21, 5, 240, 1);

SV = Param("Stock minimum Avg Vol " , 125000, 50000, 1000000, 5000);

My_Conditions = Close >= tcl AND Close <= tch AND MA( Volume, avp ) > sv;

Filter= My_Conditions;

Buy= Filter;

autoFILL = IIf( w1==1, Filter,0 ) ;

Add = IIf( x==1, Filter , 0 ) ;

if( LastValue( Add ORautoFill ) )

{ CategoryAddSymbol( "", categoryWatchlist, y ); }


----- Original Message ----- 
From: "Don Lindberg" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, September 15, 2006 2:33 AM
Subject: [amibroker] I need a little help with an ATC


> Group.
>
> I have created several ATC's to build composite indexes of some of
> my WatchList. Here is the code I used.
>
> /* AddToComposite statements are for Automatic Analysis -> Scan */
> /* add Close price to our index OHLC fields */
> AddToComposite(Open, "~CAN SLIM Select Index", "O" );
> AddToComposite(High, "~CAN SLIM Select Index", "H" );
> AddToComposite(Low, "~CAN SLIM Select Index", "L" );
> AddToComposite(Close, "~CAN SLIM Select Index", "C" );
> AddToComposite(Volume, "~CAN SLIM Select Index", "V" );
> /* add one to open intest field (we use this field as a counter) */
> AddToComposite( 1, "~CAN SLIM Select Index", "I" );
> Buy = 0; // required by scan mode
> /* this part is for Indicator Builder */
> PlotForeign("~CAN SLIM Select Index", "~CAN SLIM Select Index",
> colorBlack, style=styleLine);
> Plot(Foreign("~CAN SLIM Select Index","C"),"~CAN SLIM Select
> Index",1,8);
>
> It works fine, however I have to define a filter every time I run
> one of these against a particular Watchlist (In this example the
> Watchlist is caled CAN SLIM Select).
>
> My question is.... Can I put a line of code in this AFL that will
> make it use a specific Watchlist without my having to define a filter
> on the AA screen. I'm sure one of you programming Guru's can show me
> how to do this.
>
> Your help is greatly appreciated.
>
> Don Lindberg
>
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
>
>
> 




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






 





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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to