Example Recent Entries

April 26, 2011

Modify, Develop and Test a Custom Scan

By Gord Greer
ExampleTechnique

Some of you might recognize this example from a CSTA webinar I did last Dec, but I thought it was a good time to update and share it with all StockCharts users.  The example starts with a simple predefined scan and shows how it can be modified, step by step.

(Note the techniques described use the advanced scan interface for writing custom scans, thus you will require at least a Basic membership to create these scans).

When reviewing the charts for the S&P500 index we see that the index closed above the Feb and April levels.  Now individual stocks don't always follow the index exactly but we can use the scan engine to find which are leading or lagging the index.  Also we have to be aware that the $SPX is the S&P 500 market cap weighted index, ie Exxon and Apple account for 6% of the index.  We could also look at the $SPXEW which is the equal weighted S&P-500 index where each of the 500 stocks accounts for 0.2%, this index exceeded the Feb highs in April and exceeded the April highs today.

SPX SPXEW

So lets find out how the individual stocks in the index are doing.  We'll limit our initial scan to the S&P-500 and insert one of the predefined scans "New 52 week high".

1 input

Now running this scan yields 98 hits, but I'm more interested in closing values than the daily highs and really only interested in looking back into Jan.  Now we could change only todays high to a close above the previous intra-day high but in this case I'll change both the "highs" to "close" and just look for the previous maximum back say 90 days instead of 260 trading days.

[type = stock]
and [group is SP500]
and [today's close > yesterday's daily max(90,close)]

This gives us 113 hits. 
But I know some stocks in the index may not have had a new high close today, they may have had a new high a few days ago and pulled back a few cents today.  So lets look for a new high close anytime during say the last 5 days which is higher than the highest close for the previous 90 days (starting 6 days ago).

[type = stock]
and [group is SP500]
and [max(5, close) > 6 days ago daily max(90,close)]

This gives us 163 hits, which corresponds to 32% of the stocks in the S&P-500 hitting a recent new high close in the last 5 days.  But I'm also interested in what the Small and Mid cap stocks are doing so I'll add them to the list and by using the comment prefix of // or #, we can turn these individual clauses ON and OFF.  (any line prefixed with // or # is considered a comment and not evaluated)

[type = stock]
// and [group is SP500]
and [group is SP400]
// and [group is SP600]
and [max(5, close) > 6 days ago daily max(90,close)] 

This yields the following hits;
SP500,  163
SP400,  113
SP600,  111
Total =  387

Now we also have another option if we wanted to look at the Large, Mid and Small caps simultaneously, we could create a grouped "OR" clause, enclosed by an extra set of square brackets.  Note this function is only available in the advanced scan engine interface and I have turned OFF the individual clauses.  (Note the S&P-1500 is currently not available in the scan engine as a predefined group, but you can chart it under the symbol $SPSUPX)

[type = stock]
// and [group is SP500]
// and [group is SP400]
// and [group is SP600]
and [ [group is SP500] or [group is SP400] or [group is SP600] ] 
and [max(5, close) > 6 days ago daily max(90,close)] 

This gives us the same 387 hits as the individual scans.

Now if we look at the $SPXEW-500 Equal Weight index, we see that it is about 1% above its recent highs, so lets limit our scan to only stocks which significantly exceed that.  Lets try 5% above the past highs and lets use the S&P-1500 group, (use the multiplier function).

[type = stock]
//and [group is SP500]
//and [group is SP400]
//and [group is SP600]
and [[group is SP500] or [group is SP400] or [group is SP600]]
and [max(5, close) > 6 days ago daily max(90,close) * 1.05

This gives us 45 hits.

In summary I verify each section (clause) before proceeding to the next clause.  I find the quickest way is to review 10-20 charts to see if they meet the scan criteria and I try to make this as visual as possible, (its just quicker).  So before I run the scan I set up a simple chart for only the time frame of the scan and only plot what the scan is looking for.  In this case the chart covers Feb till now and is a performance type chart which makes the min 5% gain easy to see.  I save this chart as my default style and after I run my scan I can easily dump the output into my "00 Temp" fav list (it’s the first list so its already in the drop down box, just hit go) and all the charts will be created with this chart style. 

Note; if for some reason you need to keep your default chart style you can also change the chart style after you have dumped the group to a new fav list, just set up a new style on one of the charts and then use the "Apply Style to All" button, but this will take a few more steps and you will have to redo those steps every time you run and dump new scan results.

1 output

At this point you can also click on the table headers and sort by "Sector" or "Industry" to see where most of the hits are coming from.


Then select the 10 per page view and quickly scroll thru 10-20 charts to verify the scan is finding what you asked for, or what you thought you asked for.   If necessary go back and modify the coding.  Then select differnt indexes or add more specific technical criteria.

2 output

The following is a graphical representation of the scan which is often helpful when developing and laying out scans, especially the more complicated ones.

Scan graphic

I hope this discussion has given you some new ideas on creating, modifying and testing your own customs scans.

Happy scanning,

Gord

(note: I don't work for StockCharts, I'm just a long time user always trying to learn more and willing to share what I've already learned.  If you have comments related to this article I'll try to answer them here, if you have other comments or suggestions send them directly to StockCharts thru the support page).

 

April 24, 2011

Scans, Where is the "Crosses Below" function ??

By Gord Greer
ExampleTechnique

Q:  I've used the crosses above function but I can't find the crosses below function, where is it ??

A: Don't feel frustrated, this is just part of the learning curve and it's one of the most frequently asked questions on scanning.  Many articles have been written on the subject but as it keeps coming up I'll try to put a little different slant on the subject.

Actually the crosses below function is reduntant, we just have to think of the crosses above function from the other point of view.  It all just depends on what your mind likes to think of as the reference point.  When "A" crosses ABOVE "B" we have to remember that from the other point of view "B" is crossing BELOW "A".

Here's an example to help get you thinking of different ways to read the coding:

and [Close > 10.00]

- Read from left to right, this clause looks for stocks where the close is greater than $10.00
- Read from right to left, this clause looks for stocks where $10.00 is less than the close.

We could also find the same stocks by writing the clause as follows, it just depends on how your mind likes to think of it, both clauses achieve the same result.

and [ 10.00 < Close ]

Now lets look for stocks where the 20 SMA has crossed ABOVE the 50 SMA

and [ SMA(20, close) X SMA(50, close) ]
or we could write it as
and [ SMA(20, close) Crosses SMA(50, close) ]

- Read from left to right, this clause looks for stocks where the 20 day SMA of the close has crossed ABOVE the 50 day SMA
- Read from right to left, this clause looks for stocks where the 50 day SMA of the close has crossed BELOW the 20 day SMA

Thus to find stocks where the 20 SMA crosses BELOW the 50 SMA, just write it as the 50 SMA crossing ABOVE the 20 SMA, as follows;

and [ SMA(50, close) X SMA(20, close) ]
or we could write it as
and [ SMA(50, close) Crosses SMA(20, close) ]

1spx crosses


Sometimes we need to think outside the box and sometimes we just need to look at the box from the other side.

Final note on the crossing function,  when scanning for "A" crossing "B" we need to remember this is actually the short form of the following two clauses, (less than or equal to yesterday, and greater than today).

and [ "A" one day ago < = "B" one day ago ]
and [ "A" today > "B" today ]

Now the scanning engine calculates and compares these values to several decimal points, so in order to avoid picking up very small crosses I often use the two line method and I require the cross to be greater than say 1%  (use the multipier function on the second parameter).

and [ "A" one day ago < = "B" one day ago ]
and [ "A" today > "B" today * 1.01 ]

Happy scanning

Gord

Note: Free members have access to hundreds of pre-defined scans, but in order to create and modify your own custom scans as above, you will need at least a Basic StockCharts.com membership.

October 30, 2010

Laying Out a Scan

By Gord Greer
ExampleTechnique

Q:  Can I scan for a stock that has 5 consecutive days down, then an inside day on the 6th day.

A:  Yes, its its a little longer than most scans but its really not difficult, just break it up into sections.  First think about the criteria which must be met today and what criteria must be met in the previous several days. It often helps in the beginning to blow up and print out a chart which has the characteristics you are looking for.  If you can't find such a chart just draw one, it doesn't have to be pretty or accurate, it just has to show the concept you are looking for.  The drawing can then be annotated with the required data formulas.

Here's your basic scan in an annotated drawing. (Note we will keep it simple at this point and just use the open and close data, ie ignoring the candle tails, highs and lows).

Vscan3m

It does takes a few minutes but just start from the beginning and enter each criteria element one at a time. Here's what it would look like in the basic scan engine.

1 scanm

Click here to open the above scan in a new window

Once the above scan is loaded into the Basic scan page you can use the "Advanced User Interface" button at the bottom to see the coding in the Advanced scan engine.  Note I've added a few line returns to break up each section onto its own line, makes it a little easier to follow.

[type = stock]
and [daily sma(20,daily volume) > 40000]
and [daily close > daily open]
and [daily close < yesterday's daily open]
and [daily open > yesterday's daily close]
and [yesterday's daily close < yesterday's daily open]
and [yesterday's daily close < 2 days ago daily close]
and [2 days ago daily close < 2 days ago daily open]
and [2 days ago daily close < 3 days ago daily close]
and [3 days ago daily close < 3 days ago daily open]
and [3 days ago daily close < 4 days ago daily close]
and [4 days ago daily close < 4 days ago daily open]
and [4 days ago daily close < 5 days ago daily close]
and [5 days ago daily close < 5 days ago daily open]

Now if I was to create this scan directly I would use the Advanced scan interface which allows you to copy and paste, this makes it much quicker for any scans which have alot of repetition and similar clauses.  I would also not use the term "daily" in any of the clauses, its the default time frame so really isn't necessary in this scan.  Also I prefer to use the term "1 day ago" rather then "yesterday", just makes it a little easier to follow the flow of the scan.

[type = stock]
and [sma(20, volume) > 40000]
and [ close >  open]
and [ close < 1 day ago open]
and [ open > 1 day ago close]
and [1 day ago close < 1 day ago  open]
and [1 day ago close < 2 days ago close]
and [2 days ago close < 2 days ago open]
and [2 days ago close < 3 days ago close]
etc,  etc.

Hope this gives you some ideas to get started scanning.

cheers

 

May 14, 2010

Scans, Bullish MACD Crossover...

By Gord Greer
ExampleTechnique

As a scanning example, lets look in detail at one of the predefined scans, the "Bullish MACD Crossover".

You can see the coding for this scan by selecting and inserting it into the Basic Scan page.  Open the Basic Scan page and in the lower right, select the desired scan from the drop down menu and use the insert button.

1 MACDa

Now for starters you should familiarize yourself with the definition of the scan and also how the MACD indicator is calculated and used, links are shown below.

From the StockCharts scan definitions page, just click the link below the scan input form.

http://stockcharts.com/help/doku.php?id=support:predefined_scans

"Bullish MACD Crossovers - Stocks whose MACD line crossed above the signal line today after being below the signal line for the previous three days. The MACD parameters used are 26 and 12 and the signal line is a 9-day EMA of the MACD line."

To understand the indicator, click the "About Indicators" just below the indicators section of any sharpchart input page.
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_average_conve

Now lets look in detail at the actual scan coding, here's what it looks like in the Basic Scan interface.

1 MACD

And if you hit the "Advanced User Interface" button at the bottom of the page you'll see what the coding looks like in the Advanced version.

1 MACD adv

Now to make it easier to read and understand I usually add a few line returns to separate each criteria clause onto a separate line.  Then I save these blocks of code, with explanation notes to a text file (say MS Notepad), then I can easily reuse any coding by just cutting and pasting it into a new scan.

[type = stock]
and [country = us]
and [daily sma(20,daily volume) > 40000]
and [yesterday's daily macd line(12,26,9) < 0]
and [daily macd line(12,26,9) >= daily macd signal(12,26,9)]
and [yesterday's daily macd line(12,26,9) < yesterday's daily macd signal(12,26,9)]
and [2 days ago daily macd line(12,26,9) < 2 days ago daily macd signal(12,26,9)]
and [3 days ago daily macd line(12,26,9) < 3 days ago daily macd signal(12,26,9)]
and [3 days ago daily macd hist(12,26,9) < 3 days ago daily macd signal(12,26,9) * 0.25]

For analysis of the scan I've identified the various criteria sections as 1 thru 9 on the basic scan page above.  So here's the text description of the scan.

1 For the last market close:
2 United States Stocks with...
3 20-day Simple Moving Average of Volume for today is greater than 40000
4 Daily MACD Line(12,26,9) for yesterday is less than 0
5 Daily MACD Line(12,26,9) for today is greater than or equal to Daily MACD Signal(12,26,9) for today
6 Daily MACD Line(12,26,9) for yesterday is less than Daily MACD Signal(12,26,9) for yesterday
7 Daily MACD Line(12,26,9) for 2 days ago is less than Daily MACD Signal(12,26,9) for 2 days ago
8 Daily MACD Line(12,26,9) for 3 days ago is less than Daily MACD Signal(12,26,9) for 3 days ago
9 Daily MACD Histogram(12,26,9) for 3 days ago is less than Daily MACD Signal(12,26,9) for 3 days ago times 0.25


Now here's a little more detail as to what each section means.

1- Sets the scan to use the last EOD market close data

2- Looks for only US Stocks

3- Requires the SMA20 of Volume to be greater than 40,000 shares, thus eliminates all stocks which are thinly traded or haven't traded in some time.

5- This is the cross (or near cross), it requires the MACD today to be greater than or equal to the Signal line.
 
4 & 6 & 7 & 8
Requires the MACD to be below the 0 line (negative), ie the MACD 12 day EMA is below the 26 day EMA.  Also requires the MACD to have been below the Signal line for each of the previous 3 days.

9- This final criteria is a little trickier, it requires that the value of the MACD Hist (3 days ago) to be less than the Signal line *(times) 0.25,  IE the Hist is the diff between the MACD and the Signal line (9 EMA of MACD), so we want the diff to be greater than 25% of the Signal, that is we want at least some minimum separation 3 days ago , this eliminates stocks that were very close 3 days ago and have now just crossed, (basically flat line MACD).  To see this more readily or to have a greater move, increase the multiplier value to say Signal line *3 and thus we'll have fewer results as the move now has to be much greater.

So here's a chart of ADOBE which was one of the scan results.

1 MACD ADBE

Now the above chart might be something you would look at when evaluating stocks but its not much help when evaluating the scan.  Below are the chart settings I defined to more easily evaluate and verify this scan.  First I set the time frame to be equal to or just slightly longer than the duration of the longest criteria of the scan, then I eliminate everything except what the scan is looking for.  In this case the scan is only looking for MACD, MACD HIST and Volume SMA20, note I also made the price invisible and have shown the MACD behind the price, (ignore the values on the right side of the chart as they are the price values of the ADBE stock). 

Another trick is to temporarily save these chart settings as your default, then when you run the scan the results can be saved into a new Favorites list and when you review that list all the charts will already be in this format.  It makes checking the validity of the scan much easier and after you've confirmed the scan is working as desired you can just switch all the charts to whatever settings you use for the stock analysis.

So here's the Adobe chart with the settings I would use to evaluate the scan and I've annotated it with all the criteria we were looking for.  Note with respect to the MACD Line and MACD Signal lines,  they appear as continuous lines but really the chart is just connecting the dots from the EOD data for each day, thus I've drawn square boxes around the data points which the scan is actually looking at.

  1 MACD ADBE g


I hope this gives you a little more background to modify an existing scan or create your own from scratch.

Happy Scanning…

 

May 09, 2010

Scan Your Favorite Lists for Unusual Activity

By Gord Greer
ExampleTechnique

We all have various watch lists, however reviewing a large number of stock lists on a regular basis can be quite time consuming.  The CandleGlance & MarketCarpet tools can help with a quick visual review, but it's still easy to let a few slip under the radar.   Another alternative is to periodically run a scan on all your lists and look for unusual activity in price or volume.  You could also include such things as overbought / oversold, indicator levels or such things as crossovers etc, the options are limitless.

You can run these types of scans in the Basic Scan Interface but you would have to run them on one list at a time and with only one criteria at a time.  I prefer to use the Advanced Scan Interface for this type of scan as it gives us the option of using the "OR" function which allows us to combine many criteria into one scan.

Now when using the "OR" function in combination with the "AND" function we have to be very careful with how we construct the brackets in the overall expression.

Lets look at how we would build up the scan, starting simple and then adding to it.

1- Scan Fav list #1 for stocks with closing price action 25% above SMA20.

[favorites list = 1]
and [close > SMA(20, close) * 1.25]

2- We now have 3 lists and want to scan all of them at once, (list 1 or 2 or 3), for any stocks with a closing price 25% above SMA20.  Now here's where you have to be careful with the "OR" / "AND" functions.  The first line groups all the lists together with the "OR" function and we surround that criteria with square brackets so it becomes one criteria.  Thus all stocks in any one of the lists are included in the scan "AND" are all evaluated against the last criteria which selects only the stocks meeting the price action.

[[favorites list = 1] or [favorites list = 2] or [favorites list = 3]]
and [close > SMA(20, close) * 1.25]

But won't I just get a Syntax error if I didn't get the coding just right?  Short Answer is NO, the Advanced Scanning Engine cannot read your mind, it will evaluate whatever you've asked for, which may not be exactly what you thought you were asking for and there are no Syntax errors. 

Lets say we wrote the scan as follows, everything is fine with no syntax errors, but some stocks show up that don't meet the criteria.

[favorites list = 1]
or [favorites list = 2]
or [favorites list = 3]
and [close > SMA(20, close) * 1.25]

The problem is the first 3 lines select all the stocks in the all the Fav lists, the last line is the price criteria but it is only connected with the "AND" function to list # 3, thus only stocks in list #3 that don't meet the price criteria will be eliminated from the total list.

3- Now lets say we are also interested in Volume and want to find any stocks where the Price "OR" Volume is 25% above SMA20.  Again note the position of the extra square brackets.

[[favorites list = 1] or [favorites list = 2] or [favorites list = 3]]
and
[[close > SMA(20, close) * 1.25] or [Volume > SMA(20, Volume) * 1.25]]

At this point I think you get the idea, just add and modify whatever other criteria you are looking for.  Create and save a few different scans, Bear / Bull with various price, volume, indicator levels, crossovers or divergences etc etc.   However if you add TOO many options, you won't know which one tripped the scan for an individual stock when you're reviewing the output charts, but with only a few criteria its usually pretty obvious.

Final Note: The above scans will only pick up stocks which are contained in the scan database, if you have pink sheet stocks or others in a list (which are not in the base), you'll still have to review those charts manually.

Good luck scanning

**** Edit:

Sorry I should have given a little more detail on adding a Fav List to your custom scans which can be done in two ways.

1- Basic scan interface; use the Global Filters "Group" dropdown menu and at the bottom of the list you will see all your Fav Lists with the names you  have given each list.  Just select and then update the criteria.  Note in the Basic interface you can only select one list at a time.

1 scan fav

2- Advanced scan interface; use the dropdown menu for "Favorites Lists", select the one you want and hit insert. Note in the advanced scan interface we don't use the given name for the list, we use the list number which is assigned by the StockCharts system.  Thus any time you need to know what the number is for a particular list, just check the Fav lists menu in the scan engine.

1 scan fav adv

Cheers

May 09, 2010

Why didn't my Scan pick up stock "XYZ" ??

By Gord Greer
ExampleLimitsTechnique

Q: Why didn't my scan pick up stock "XYZ", I've checked the scan, its all OK and "XYZ" meets all the criteria ?

A: Assuming there are no logic errors in the scan, it is probably the simple case of stock "XYZ" not being in the scan engine database.  Not all stocks we can plot are contained in the scan engine database, but there is an easy way to verify whether your stock is in the scan base or not.

The scan engine database is a very large collection of live data which is stored on a separate computer system in fast RAM memory.  It contains 800 trading days of; high, low, open, close and volume, for about 20,000 stocks, that’s a ton of data.  This database is updated about every 15 mins throughout the day with new data and this all happens while people are running scans, not an easy task to keep everything straight.

In order to keep the size / cost of the equipment and the time to run a scan down to a reasonable level, the database is limited to only the more common stocks with readily available data.  IE pink sheet stocks are normally not included in the Scanning database as this would significantly increase the number of stocks and thus the cost and time to run a scan.

So in order to check if your stock "XYZ" is in the database we'll have to use the Advanced User Interface for the Scan engine.  Under the "Ticker Properties" drop down menu, select "Symbol" and then insert.  This will add the criteria "and [symbol  starts with 'A']" to the default scan expression. 

Now we'll need to modify this criteria and delete everything else in the expression so we are left with only one criteria, [symbol  =  'XYZ'] .  Run the scan, if "XYZ" is returned then its in the database and something is wrong in the logic of your scan.  If its not returned then its not in the base and thus the reason the scan did not find it.

1 scan symbol

April 28, 2010

Scans Alt Uses, Whats in an Index / Sector or Download to Excel

By Gord Greer
ExampleTechnique

When analyzing the market we often have a desire to know what is driving an index or a sector.  Thus we need to know which individual stocks make up that index or sector.  Now with a bit of internet research we can usually find the makeup of the item in question.  But here's an easier way, available to all Extra Users and it creates the stocks of interest in a ready to load StockCharts list.  All we have to do is scan for the index or sector.  

In the basic scan interface the options are a little limited, here's an example of scanning for the individual stock components of the Dow Industrials. 

1- Pull up the Basic scan window and open the Global Filter, Group, dropdown menu
2 - Under Major Indicies select the Dow Industrials
2a - Set the Ave Vol filter to ANY
3 - Update Criteria
4 - Check the Criteria description, if not correct make changes and update again
5 - Run Scan

1index1

Now the results window will usually open in a new tab, although all browsers and operating systems are often a little different.  So here's the output list of the 30 Dow Industrial stocks and we now have 5 different options.

1- Display these results in a market carpet
2- Put these results into a New favorites list  (create a new list)
3- Download these results in CSV format (for spreadsheets like Excel)
4- Replace the contents of a "Favorites" list with these results, (previous contents are deleted)
5 -Merge / Add these results to one of my existing "Favorites" lists (previous contents are retained).   This one is very handy when running several scans and building a single composite list.

1index2
Now in order to look at a much larger list of indexes and sectors we'll have to switch to the "Advanced User Interface", just hit the button at the bottom of the screen.  You should see the same scan we just developed, but now it's in the coding for the Advanced Scan interface.

Lets go thru the steps to look at a different sector, say Railroads.

1- [type = stock] and [group is 'dow30'] , Highlight and Delete the "and [group is 'dow30']" part of the scan
    If you arrived directly at this window you would see the default scan,
    [type is stock] and [sma(20,volume) > 40000],  Highlight and Delete the "and [sma(20,volume) > 40000]" part of the scan.
2- Pull up the Sectors and Industries menu
3- Select under Transportation Sector highlight Railroads
4- Hit Insert and you should see [type is stock] and [group is Railroads]
5- Now hit the Check Syntax button and correct any errors
6- Run Scan

1index3
We now have the Railroads sector list of 13 stocks and the same 5 output options as described in the first example.  In this case lets download them to an Excel spreadsheet.  A pop-up window will ask if we want to open it directly with "MS Excel", (if that's your default) or select another program, or if you select save it to a file you will then be able to give it a name and location where you want it saved.

 

1index4

 I usually just open it with Excel to verify its what I need, make any changes to the column widths and delete and columns of data I don't need.  IE the "Open, High, Low, Close, Volume" data is the scans closing data which may not be of interest to me if I only need the name and symbols.  I can then from Excel use the Save As option and give it a file name and location of my choice.

1index5

Note the graphics for the above examples are screen shots taken on a Windows XP-3 system running a  FireFox ver 3.6 browser.  If you are running a different operating system, or Browser or different versions, the look of the screens and possibly the terminology will be slightly different, but the concepts and procedures will be the same.

One more tool, happy scanning.

April 26, 2010

Scans Alt Uses, Add Stock Names to a Fav List

By Gord Greer
ExampleTechnique

In case you're not familiar with the method of using the "Add Many" function for creating a new list or adding to an existing list, I will start with a brief over and then show you how to use the scan function to add stock names to that list.   The "Add Many" function is handy because it allows you to add about 25 symbols to a list at once, however the drawback is you don't get the company names like you would if entering them one at a time, you'll just see the term "Default Style".
Note this method applies to StockCharts members of the Extra level or higher.

Here's one of my lists on Yahoo which I use to monitor news and events.  I like Yahoo because of the ability to customize your watch lists in almost any format you want, but their charting is nowhere near StockCharts.


1 bulk1

So I'll pull up the list on "Rails" and select edit, which will bring up the portfolio editing screen.  I can then select all the stock symbols in the portfolio and copy them.
1 bulk2


Now open the "Create a New List" window on Stockcharts, input the list name "Rail" and hit enter.


1 bulk3

At the bottom of the new list, under the "Add Many" section, paste in the stock symbol list.  If the list is from Yahoo or another source which does not use commas to separate the symbols you'll have to add them now.  The commas don't have to be right after the symbol, anywhere between the symbols is fine.  Note: this input field is limited to about 80 characters, so depending on the length of the ticker symbols you should be able to enter about 20-25 at a time.  Then click "Add Many"

Edit Gord: Aug 16, 2011,  I've been informed by another user (Doug), that this limitation now longer applies.  It seems the programmers at StockCharts just keep making these little continuous improvements.  I just verified this by downloading the S&P500 into Excel, then used the Concatenate function to add a comma to each symbol and add them all together.  I was then able to enter all 500 symbols in a single block using the add many function.

1 bulk4



Now we have our new list with stock symbols but we don't have the company names, just "Default Style".   For me that’s fine, I can get by with just the symbols but some users prefer to also see the name.  If you only need to add 1 or 2 names you could use the "edit info" button for each stock, this pulls up another window where you can add the name and comments.   Note I also added an extra symbol to the list ADMGQ, it’s a pink sheet symbol I can chart but its not in the scan engine database, you'll see what happens later. 1 bulk5

Lets say there are too many to enter manually so lets use the scan method.  Pull up a scan window, open the Global Filter "Group" drop down menu and select the list "Rail", also set the Avg Vol filter to "Any".   Hit the Update Criteria button, then the "Run Scan" Button.
1 bulk6

Now we see the scan output table, complete with the company names.  Note that the ADMGQ pink sheet stock is not in the list, as its not in the scan database.  There are several options here but in this case we want the function "Merge these results into the following list".  Just select the list "Rail" and hit "Go".  This will merge the scan results into the existing list adding the company names, it will also leave the ADMGQ stock in the list.  Note if we had used the replace function then the ADMGQ stock and any others not in the scan would be eliminated from the list. 1 bulk7
1 bulk8

Now here's the list in Summary mode, showing ADMGQ - Default Style, but all the other stocks now show the company names. 1 bulk9

One final note of caution, this system works best with a new list.  If you have lists which contain charts with annotations, different time frames and different indicators on each chart, then be careful.  It is very easy to overwrite your entire list with these new scan results and replace all the charts with new ones using your default chart style.

One more trick for the toolbox, happy scanning.

April 23, 2010

Scans, Some Alternative Uses, Getting Started

By Gord Greer
ExampleTechnique

If you've used scans for some time you're probably already aware of these tricks, however if you're new to scans you may find some of these ideas useful in your daily analysis.  It's also a good way to introduce yourself to the scanning tool in general.  So here's a short list tricks I use on a regular basis which should get you thinking.   In separate posts I'll give you a brief explanation of how to use each one, I don't want to make this particular post too lengthy.

1 - Track down the stock symbol for an unidentified chart.

We've all seen that special chart of interest posted on the internet, however the name & symbol have been hidden and we'd like to know what it is for further analysis.  Well as long as we can identify the time frame and a few specifics such as the approximate stock price and volume, its fairly easy to track it down with a simple scan.

2 - Scan your hold or watch lists for unusual activity in order to alert you that something is changing.

We all have various watch lists, however reviewing a large number of stocks on a regular basis can be quite time consuming.  The CandleGlance & MarketCarpet tools can help with a quick visual review, but it's still easy to let a few slip under the radar.   Another alternative is to periodically run a scan on your lists which looks for unusual activity in price, volume and you could also include such things as overbought / oversold or a combination of other indicators.

3 - Scan an index to find the stocks which it contains or scan a sector list to find other stocks in a sector of interest , ie; what's in the Nasdaq 100, or what's in the Bio, Railroad or  Coal sector, etc.

4 - Scan the scan engine for a symbol to find if it is contained in the scan engine.  Very useful when your scans don't pick up a stock you think it should have.

5 - Scan a favorites list which has been bulk loaded and all you see is the symbol / "name default", the stock names don't appear and it’s a chore to add them manually.

6 - Output a favorite list of stocks into an Excel spreadsheet or other database.  Often we want to do a spreadsheet analysis on a stock list and inputting more than 10 stock symbols becomes a bit of a chore.  However you can just scan the list, then select the output function "Download these results in CSV format" and then save to a file or open it with say MS Excel.

Note: some of the above tricks will only fully work for symbols that are in the scan engine database, (if you have pinks etc in a fav list they may not be in the scan database and thus will require some manual adjustment).

If you have more scan tricks you think other users could benefit from, please comment and I'll add them to a future post.

Getting Started:

On this subject some users have indicated they have trouble getting started with scans and have difficulty finding information on what they should read to get started, so here's "my" current list of Stockcharts documentation on scanning with the all the links in one place.  These articles are all excellent and should give you a good starting point, I have them all bookmarked for easy access and use them often.  For specific problems I also make extensive use of the "Search The Site" function on the home page.

Scanning is not difficult, it just takes a little reading and practice.  I compare it to learning a new operating system or software program, start with the simple stuff, then move up and in no time it will become easy and you'll be looking for new challenges.

 

Standard scan workbench documentation
http://support.stockcharts.com/forums/30077/entries/21296

Using the Standard Scan Workbench
http://stockcharts.com/help/doku.php?id=support:standard_scans

Advanced Scan Workbench documentation
http://support.stockcharts.com/entries/21297-advanced-scan-workbench-user-documentation

Advanced Scans
http://stockcharts.com/help/doku.php?id=support:advanced_scans

Getting Started With Stock Scans - Tutorial
http://support.stockcharts.com/forums/30077/entries/31212

Getting Started With Stock Scans
http://stockcharts.com/help/doku.php?id=support:getting_started_with

Understanding Stock Scans
http://stockcharts.com/help/doku.php?id=support:understanding_scans

Predefined Scans Definitions
http://stockcharts.com/help/doku.php?id=support:predefined_scans

Scan Criteria Examples
http://stockcharts.com/def/servlet/ScanUI?act=examples

StockCharts Blogs - Scanning Stocks
http://blogs.stockcharts.com/scanning/

Scan Hall of Fame
http://stockcharts.com/help/doku.php?id=support:scan_hof

StockCharts.com Support Forum on InvestorHub.com
http://investorshub.com/boards/board.asp?board_id=1277


March 21, 2010

Scanning for Min / Max over a Set Time Duration

By Gord Greer
ExampleTechnique

This is one of the powerful features of the StockCharts scanning engine and I'm sure once you've mastered it you'll use it in most of your scans, in one from or another.

Lets start with looking at one of the predefined scans and see how it's constructed.  This is also one of the best ways to learn about building your own scans. 

Pull up the Standard scan engine and in the bottom right hand corner you can select and insert one or more of the available predefined scans, note its best to review (study) them one at a time.   AND you can also modify and /or combine any of them to suit your personal scanning needs.

MaxMin001a

In the Standard Scan Engine, we'll now see the following coding.

MaxMin002a

We see the scan requires the current "High" today (ie 0 trading days ago) to be > "greater than" the Max. High observed anywhere over the previous 260 days, starting yesterday (ie 1 day ago).  Note if we didn't specify starting "yesterday" for this "Max High" part of the criteria then this section would also include todays high which is contained in the first 'High" criteria section and thus no stocks would meet the criteria.

In the Advanced Scan Engine, we would see the following coding.  Note you can see the Advanced coding for any Standard scan by just pressing the "Advanced User Interface" button at the bottom of the scan page.  All coding will be converted and displayed in the Advanced format.

MaxMin003
If we wanted a new high "Close" instead of just the "High" (which could be an intraday high), there is no canned scan for this but we can modify the coding above.  Just replace the High with Close and replace the Max. High with Max. Close, from the dropdown menus as follows.

MaxMin004

In graphical form the scan looks something like this:

MaxMin006

In the last article "Scanning for Near Crosses", Jack posted the following question in the comment section. (thanks for your input Jack)

"…I want to scan for stocks that have been in an uptrend for a minimum of the last 60 days and have been in a tight consolidation for a minimum of the last 7 market days. Over this 7 day period the price has not varied more than plus or minus .6% from the mean price of the 7 day period. Does that make sense? Is such a scan possible?..."

This is a prime example of using the Min Max over time functions, with respect to the uptrend section of the question we'll just use something simple like requiring the current 20 day SMA to be 5% greater than the 20 day SMA from 60 days ago.  

Now for the consolidation section we want the Max close during the last 7 days to be less than  the current 7 day SMA plus 0.6%, (SMA(7) * 1.006).  And we want the Min close during the last 7 days to be greater than  the current 7 day SMA less 0.6%, (SMA(7) * 0.994).  Thus the scan criteria would look like this in the Basic scan engine, to see the coding in the Advanced scan engine just press the "Advanced User Interface" button at he bottom of the screen.

MaxMin007
Running this scan for the close on March 19, 2010 brings up Raytheon (RTN) as one of the stocks meeting the criteria.  Here's the chart and I've annotated it with the scan criteria.

MaxMin008 Click here to bring up a live version of this chart in a new window, (without annotations).

Note this may not look like your standard chart but for ease of verifying the scan I always set up a default chart that closely mirrors the scan criteria and eliminates all other information that’s not in the scan.  Thus I've set up the chart above to have a 3 months duration, selected just the closing prices as dots, SMA-20 and shown only the SMA-7  moving average envelopes with a +/- 0.6% range, that’s the ENV(7, 0.6).   

If you're an Extra member save the chart settings as default, then from the scan output window I save the contents to my "00 Temp" folder (starts with 00 so its always the first on the list, just hit go).  Then on the next screen switch from "Summary" to "10 per Page View" and all you charts are displayed with the default chart settings that mirror the scan to be verified.  This makes the review quick and if you spot anything which does not meet the criteria, then its back to the scan coding page to see where you went wrong, usually its some < or >  symbols backwards, or some missing brackets, or an error in the logic. 

Hope this gives you some new ideas. I'll leave the comments section open for a few days, however don't expect an immediate response as I only have time to check in here every couple of days.   

Good luck scanning.