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

RE: [amibroker] An Early Christmas Gift for Quotes Plus users



PureBytes Links

Trading Reference Links

Mark,
One Yr Target price comes from the Yahoo extra Fundamental Data. Therefore
one of a couple things could be wrong. Most likely you have not downloaded
the Yahoo Fundamental Data.  Here is how you do it.  Open AmiQuote in your
Tools Menu. On the source pull down choose Yahoo Fundamental-Basic, Tell
AmiQuote to get tickers from AmiBroker, the down load by pushing the Green
Arrow. This goes fairly fast (about 5 min on Broadband). When that completes
 change source to Yahoo Fundamentals-Extra. Go to edit and choose Mark All
to re-mark your tickers, then hit the Green arrow again. This one takes
about an hour to complete if AmiQuote is set for 10 downloads at a time.
(Check your settings). Once your done, close AmiQuote and re-run the
Exploration. You should have all the fields at this point. One thing to
remember is that Yahoo does not have this extra data on ALL stocks, so there
may be a few empty entries.  Since the Fundamental data does not change
daily, I only run the above scans in AmiQuote about once a week. 
 
Enjoy,
Don
 
-------Original Message-------
 
From: MarkK
Date: 12/10/2006 3:26:45 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] An Early Christmas Gift for Quotes Plus users
 
Don,
 
Thank you very much for the AFL
Question
On the column AddColumn (Tgt,"One Yr Target Price",8.2);
All that comes up is blank space, is a number suppose to appear in there
from the data AB is picking up from QP3?
 
Mark
 



From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Don Lindberg
Sent: Sunday, December 10, 2006 1:16 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] An Early Christmas Gift for Quotes Plus users
 
During the past year I have gotten a lot of help from this group, so I have
decided to give a little back.
I have created an Exploration that is based on the William O'Neil CAN SLIM
System. It relies on data that is only available to Quotes Plus users. (my
apologies to the rest of you) It allows you to change Parameters of several
values before you run the Exploration, so you can choose a very tight or
very loose Exploration. When the Exploration completes it writes the data to
the Watch List that you specified in Parameters at the start of the run. It
also clears that Watch List of previously stored information.  The
Exploration uses color to highlight the best stocks in the list.  I cannot
claim full credit for this Script, as I borrowed ideas from several other
users. (Notably Joe Landry). However I take full responsibility for my
adaptions.
 
Read the remarks in the AFL, as they explain what the code is doing and
point out area's you need to be aware of.  I hope you find this useful, or
at least stimulating to create your own Exploration. I have pasted the code
below, so you need only "cut and paste" to use it.
 
Enjoy and Happy Holidays,
 
//Code starts here
// This Exploration will only work for those of you who are using Quotes
Plus as their Data Source. It is an attempt to find quality 
// stocks with Fundamental Ratings that meet the minimum requirements of
William O'Neil's CAN SLIM System as used in Investors Business Daily.
// It doesn't cover all the points due to the limitations of the data fields
available.
// I have adapted this AFL from one that Joe Landry posted recently. In
addition the section for clearing 
// the old Watchlist comes from Joe as well. Joe Landry quotes as follows:
// 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.
//
// BE WARNED this is an Exploration to find a certain grouping of stocks.
You still have to use your brain
// and ANALYSE the results!
//
// Here is an Exploration that allows you to use Quotes Plus extra data AND
// Yahoo Fundamental 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. I have set Parameter
defaults below O'Niel's minimum values. Adjust to your taste.
// Even with these low defaults the Exploration pulls some nice stocks.
// In order to use the Yahoo data, you must run AmiQuote and choose the
Extra Fundamental Data. Since the Yahoo Fundamental
// data doesn't change daily, I just run this update once a week.
// It takes me about 10 minutes to run this Exploration against my whole
database. Remember just run for one days worth of data.
// Enjoy, Don Lindberg
// Here is where we get our Data
EPSRank=GetExtraData("epsrank");
QRSRank=GetExtraData("qrs");
ROE=GetExtraData("ROE");
QPRank = EPSRank+QRSRank+RSI(10) ;
EPS=GetFnData("EPS");
Y1EPSG=GetExtraData("Yr1EPSGrowth");
Y5EPSG=GetExtraData("Yr5EPSGrowth");
Sales=GetExtraData("Sales");
InstHold=GetExtraData("InstHolds");
Tgt=GetFnData("OneYearTargetPrice");
PM=GetFnData("ProfitMargin");
// Here is where we set Our Parameter default Values
Pr=Param( "Min Price",5,0,1000,1);
Wl=Param( "Watch List #",63,0,64,1); //I have set the default Watch List to
63 so you don't accidently dump data on top of one of your prize Watchlists
Ep=Param( "EPS Rank", 70, 40, 100, 1);
Qp=Param( "QRS Rank", 70, 40, 100, 1); 
Re=Param( "ROE",5,0,1000,1);
Rs=Param( "RSI",70,40,100,1);
Sls=Param( "Sales",0,0,1000000,1);
Y1=Param( "1 Yr EPS Growth",0,0,10000,1);
Y5=Param( "5 Yr EPS Growth",0,0,10000,1);
IH=Param( "Inst Holdings",5,0,1000,1);
//Now we clear the Watch List from last run
// 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 an
Exploration and it's the first stock 
{ 
ClearList = GetCategorySymbols(categoryWatchlist,wl);
For( I = 0; ( symC = StrExtract(ClearList, I) ) != ""; I++ )
{
CategoryRemoveSymbol( symC, categoryWatchlist,wl);
}
}
//Here is where the filter values are dynamically set based on the
Parameters we choose when we started the Exploration
Score = Filter= C>pr AND MA(V,10)>=100000 AND EPSRank>=ep AND ROE>=re AND
QRSRank >=qp AND RSI(10)>=rs AND Sales>=sls AND 
Y1EPSG>=Y1 AND Y5EPSG>=Y5 AND InstHold >=IH; 
//This is the section that does all the work of putting the stocks that meet
our criteria into the Watch List of our choice
If (LastValue(Score))
{
CategoryAddSymbol( "", categoryWatchlist, wl ); //Here is where the Watch
List number gets inserted
}
// And of course we have our Auto Analysis Output Screen. A bit of color
allows the REALLY good one to stand out.
AddTextColumn( FullName(), "Company Name",1.0,colorBlack,colorYellow,170 );
AddColumn(Close,"Close",1.2);
AddColumn(QPRank,"QPRank",1.2,IIf( QPRank >= 265, (colorGreen ),
(colorOrange )));
AddColumn (EPSRank,"EPS Rank",1.2,IIf( EPSRank >= 90, (colorGreen ),
(colorOrange )));
AddColumn (QRSRank,"QRS Rank",1.2,IIf( QRSRank >= 90, (colorGreen ),
(colorOrange )));
AddColumn (RSI(10) ," RSI",1.2,IIf( RSI(10) >= 75, (colorGreen ),
(colorOrange )));
AddColumn (EPS," EPS",1.2,IIf( EPS >= 1, (colorGreen ), (colorOrange )));
AddColumn (ROE," ROE",1.2,IIf( ROE >= 15, (colorGreen ), (colorOrange )));
AddColumn (Volume,"Volume",1.0,1,2,80);
AddColumn (Y1EPSG,"1 Yr EPS Gwth",1.2,IIf( Y1EPSG >= 100, (colorGreen ),
(colorOrange )));
AddColumn (Y5EPSG,"5 Yr EPS Gwth",1.2,IIf( Y5EPSG >= 100, (colorGreen ),
(colorOrange )));
AddColumn (Sales,"Sales",1.0,1,2,80);
AddColumn (InstHold,"% Inst Holdings",1.2);
AddColumn (Tgt,"One Yr Target Price",8.2);
AddColumn (PM,"Profit Margin",1.2);
//Code ends here.
 

Donald F Lindberg
 
   


 
 



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.16/582 - Release Date: 12/11/2006 4:32 PM