Hello Don...
I've got your screen working and it's going to take a few minutes to walk 
through the all the tickers.  It's producing a select list of stocks 
representing an IBD strategy which goes BUY HIGH and (hopefully) SELL HIGHER. 
I've found that this works in an uptrending market, but then a lot of 
approaches work in an uptrending market including
TA with moving averages.  Note that HANS is still there although it's story may 
be over. 

You may want to clear your watchlist before you fill it with a new issues from 
different screen.  Here are two clips from my
stuff that I use. 

Write it so that you clear the watchlist only once, and not at every issue in 
the filter list;  and so you'll need
to gate it with a Status("Action") == 4 and Status("Stocknum") == 0  as tests. 
See in the second clip.  

Hope this helps - careful or you'll clear the wrong watchlist. 
JOE 

// ============================= Clip 1 
===============================================
function ClearaWatchlist( listnum ) 
{ 
   // retrieve comma-separated list of symbols in watch list 
   list = CategoryGetSymbols( categoryWatchlist, listnum ); 
   for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) 
   { 
      CategoryRemoveSymbol(sym,categoryWatchlist,Listnum);
   } 
   return; 
} 

// testing program
Clearawatchlist(1); 
Filter =1; 
AddColumn(Close,"Name"); 

// =============================== second clip with 
===============================
// But do this only once as you scan or explore    SCAN code is 3 EXPLORE code 
is 4
if ( Status( "action" ) == 4 AND Status( "stocknum" ) == 0 )    // running a 
scan and it's the first stock 
{   
// clear Watchlists used to store composite symbols of QP Sector Runs
   ClearList = GetCategorySymbols(categoryWatchlist, WL);
   for( i = 0; ( symC = StrExtract(ClearList, i) ) != ""; i++ )
   {
    CategoryRemoveSymbol( symC, categoryWatchlist, WL );
   }
}

  ----- Original Message ----- 
  From: Don Lindberg 
  To: [email protected] 
  Sent: Saturday, December 09, 2006 3:06 PM
  Subject: Re: [amibroker] help on a watchlist


        Jim and Joe and Group,

        I got fascinated by your ideas and started doing a bit of playing 
around. Came up with an Adjustable Exploration that automatically saves to a 
Watchlist . Hope you find this useful.

        Code follows, just cut and paste into Formula Window.

        // I have adapted this AFL from one that Joe Landry posted recently.

        // Here is an Exploration that allows you to use Quotes Plus extra data 
to scan for

        // IBD like rising stocks, and automatically put them into a Watchlist. 
You have the

        // ability to tailor your Parameters each time you run the Exploration 
by choosing the 

        // Parameters button in Auto Analysis Screen. 

        // If you look at how the code is structured I am sure you can make 
many useful

        // modifications for your own use.

        // Enjoy, Don Lindberg

        EPSRank=GetExtraData("epsrank");

        QRSRank=GetExtraData("qrs");

        ROE=GetExtraData("ROE");

        Qprank = EPSRank+QRSRank+RSI(10) ;

        Ep=Param( "EPS Rank", 85, 75, 100, 1);

        Qp=Param( "QRS Rank", 85, 75, 100, 1); 

        Re=Param( "ROE",15,10,1000,1);

        Rs=Param( "RSI",75,60,100,1);



        Score = Filter= C>10 AND MA(V,10)>150000 AND EPSRank>ep AND ROE>re AND 
QRSRank >qp AND RSI(10)>rs;

        If (LastValue(Score))

        {

        CategoryAddSymbol( "", categoryWatchlist, 22 ); // Put your own 
Watchlist number in here.

        }

        AddColumn(Close,"close",1.2);

        AddColumn(qprank," QPR",1.2); 

        AddColumn (EPSRank," EPS Rank",1.2);

        AddColumn (QRSRank," QRS Rank",1.2);

        AddColumn (ROE," ROE",1.2);

        AddColumn (RSI(10) ," RSI",1.2);

        AddColumn (Volume," Volume",1.0);

        AddColumn (MACD() ,"MACD" ,1.2);

        AddColumn (ADX() ,"ADX",1.);


        -------Original Message-------

        From: Joe Landry
        Date: 12/09/06 05:10:43
        To: [email protected]
        Subject: Re: [amibroker] help on a watchlist


        Jim - This works, and it's a case of where IIF is not used.  You're not 

        operating on arrays and I think you want to control the flow of the AFL 
code.  

        To try it out select for a filter a market (eg NASDAQ) and select 1 bar 
for the range, run Explore

        HTH

        JOE  

        qprank = GetExtraData("epsrank")+GetExtraData("qrs")+RSI(6) ;

        score = Filter= C>4 AND MA(V,11)>150000 AND qprank > 200;

        if (LastValue(Score))

        {

        CategoryAddSymbol( "", categoryWatchlist, 7 );

        }

        AddColumn(qprank,"QPR"); 

        AddColumn(Close,"close",1.2);

        AddColumn (Volume,"volume",1.0);

        AddColumn (MACD() ,"macd" ,1.2);

        AddColumn (ADX() ,"adx",1.);

        ----- Original Message ----- 
        From: JIM WIEHE 
        To: [email protected] 
        Sent: Saturday, December 09, 2006 5:39 AM
        Subject: Re: [amibroker] help on a watchlist


        thanks but i already tried that one, it did not work
        either. the results were the same as my other method
        in that all the common stocks go into the watchlist. 

        --- Anthony Faragasso <[EMAIL PROTECTED]> wrote:

        > qprank =
        > GetExtraData("epsrank")+GetExtraData("qrs")+RSI(6) ;
        > 
        > Filter= C>4 AND MA(V,11)>150000 AND qprank>200;
        > 
        > CategoryAddSymbol( "", categoryWatchlist, 7 );
        > 
        > ----- Original Message ----- 
        > From: jim_wiehe 
        > To: [email protected] 
        > Sent: Saturday, December 09, 2006 5:24 AM
        > Subject: [amibroker] help on a watchlist
        > 
        > 
        > I am trying to be a little more productive with a
        > prefilter 
        > performed on common stocks. My goal is to have the
        > basic prescan 
        > place the results automatically into a watchlist.
        > My results are the 
        > complete list of common stocks going into the
        > watchlist. AA menu 
        > produces accurate results but what's going into
        > the watchlist is 
        > not. Anybody have a suggestion?
        > 
        > qprank =
        > GetExtraData("epsrank")+GetExtraData("qrs")+RSI(6) ;
        > IIf(Filter= C>4 AND MA(V,11)>150000 AND
        > qprank>200,CategoryAddSymbol
        > ( "", categoryWatchlist, 7 ),0 );
        > 
        > AddColumn(Close,"close",1.2);
        > AddColumn (Volume,"volume",1.0);
        > AddColumn (MACD() ,"macd" ,1.2);
        > AddColumn (ADX() ,"adx",1.);
        > 
        > Thanks in advance
        > 
        > Jim
        > 
        > 
        > 
        > 
        > 
        > 
        >
        ----------------------------------------------------------
        > 
        > avast! Antivirus: Inbound message clean. 
        > 
        > Virus Database (VPS): 0655-1, 12/08/2006
        > Tested on: 12/9! /2006 5: 28:13 AM
        > avast! - copyright (c) 1988-2006 ALWIL Software.
        > 
        > 

        __________________________________________________________
        Do you Yahoo!?
        Everyone is raving about the all-new Yahoo! Mail beta.
        http://new.mail.yahoo.com



       
               
       


   

Reply via email to