New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
I would like to write a scan to give me a list of stocks when meeting all three of the following criteria.
1. Price breaks the 200 dma.
2. Volume more than twice the average trading of the past four weeks.
3. RS line breaks into positive territory from a neutral or negative territory.
0
Answers
The Predefined Scans page has many different daily scans available for your use. Click on the one you want and then in the upper row there is a button link to Edit Scan Criteria.
https://stockcharts.com/def/servlet/SC.scan
This will open that scan to the scan workbench and you can edit/modify/run/save that scan to your account to use anytime you want to.
They have Volume movers, price crossing moving averages, and a whole bunch more.
RS line is going to be your tough one. There is no predefined scan
The only thing that you have in the workbench is PctRelative, which computes a value over a period of time. You'd have to pick your time period. Example PctRelative 200,RSP is going to give a value of the relationship of the symbol and the RSP over 200 periods.
PctRelative 200 RSP > 0 and 5 days ago PctRelative 200 RSP < 0 would be your option on RS. It doesn't chart that way though. I have no idea why they haven't figured a nifty way to show PctRelative. It would be nice to have RRG as scan options, but they aren't in there yet. Now that Julius de Kempenaer is officially a StockCharts staff member, perhaps that will change.
On the chart you only have RRG and the Price/Price Performance options to show RS. Another option is to ignore the RS requirement in your scan. Save the results of the 1st two requirements to a chartlist and then use the Performance view of that chartlist and put in the Compare To symbol you want to use for the RS calculation. They list several time periods on the Performance view. Click on the period header of choice to sort and then scroll down to where the Perf number is around the zero level. Those would be the ones that you may want to look at for "was neutral or negative breaking into positive.
1. Price breaks the 200 dma.
2. Volume more than twice the average trading of the past four weeks.
In the Technical Indicators drop down, they are both listed in the top section. The Distance from SMA defaults to this:
and [DistFromSMA(200) > 0]
This expression It is asking that the current close is above the SMA 200 close by any amout greater than 0 percent.
To use this for a "break above", I'd use a comparison vs a X crossing option.
A comparison looks at a prior period(s).
and [[DistFromSMA(200) > 0] and [5 days ago DistFromSMA(200) < 0]]
This comparison looks at the current value being greater than 0 percent, or above the MA, and 5 days ago the value was a negative percent, or below the moving average.
The DistFrom works with Price ONLY. With the other MA filters, you've seen that you can use other values, like Volume, or PPO, or pretty much any other value stored in the database. So DistFrom has some plusses and minuses but it's available for use and is very straight forward way to find and compare securities. You can use it in a Rank By statement as well.
As for "breaking into" positive territory on the same day that price breaks the 200 and volume increases dramatically, that trifecta is likely pretty rare. I think I would just test for a positive territory and improving SCTR.
Also, you might have better luck on a weekly chart - weekly close x weekly sma(40, weekly close) and weekly volume > weekly sma(13, weekly volume) * 4 (or whatever). That way, you don't have to pinpoint the exact day of crossover - which may or may not correspond precisely with a surge in volume. Volume surges can be caused by technical events, but are more likely to be caused by news, like surprise earnings, patent approval, etc.