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.
20/50 DaY SMA Crossover
Comments
-
Post what you have so far and some one will tweak it.0
-
[type = stock] AND [Daily SMA(50,Daily Volume) >9999999]
and [SMA(20,volume) > 9999999]
This seems to provide the crossover, however it does not calculate for the most recent day. It present the crossover that has occurred in the recent past. I am attempting to identify stocks that are currently experiencing the crossover. Thank you for your assistance with this.0 -
OK. The ones you are getting are just a coincidence, since nothing in your scan mentions moving averages of prices.
Moving averages of price are usually based on the close. So, for instance, the 20 day sma ("simple" moving average) would be
sma(20, close)
SMAs for any other duration would just change the 20 to whatever number.
There are two ways to catch a crossover, the long way, and the short way.
The long way is to compare the two smas yesterday (1 day ago) and today. Yesterday, one sma should have been below the other, and today it should be above. So:
and [1 day ago sma(20, close) < 1 day ago sma(50, close)]
and [sma(20, close) > sma(50, close)]
Note that if you have no modifier (like "1 day ago") in front of an indicator or overly (like sma(20, close), an overlay), then the scan engine assumes you mean today's value.
The short way is to use the cross above operator "x":
and [sma(20, close) x sma(50,close)]
When you use the "x" operator, the scan engine knows you what you mean the same thing as the long way.
The "Instructions" link is a good introduction to working with the scan engine. It explains the various operators, like "x", and how to use the "Scan Builder" section on the advanced scan page, which is real timesaver:
stockcharts.com/docs/doku.php?id=scans:advanced_scan_workbench
There are also several links on that page to instructional videos which are helpful.
Like anything, the scan engine requires a little study before you can really do what you want to do, but it pays off.0 -
Sorry, I mauled on of those sentences - should be:
When you use the "x" operator, the scan engine knows you mean the same thing as the long way.0 -
Thank you for your help!0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area