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.
Stock close above 20 SMA

in Scanning
Hi,
I am looking to scan for stocks that have closed above 20 SMA for let's say 50-60 days consecutively. How do I scan with this criteria?
I am looking to scan for stocks that have closed above 20 SMA for let's say 50-60 days consecutively. How do I scan with this criteria?
0
Comments
-
In general, one way to test whether price is above its MA is:
and [PPO LIne (1, x, 1) > 0]
where "x" is the length of the MA.
This is kind of an "off label" use for this indicator.
(
See this link for how it's usually used:
https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_oscillators_ppo
)
So, you can re-phrase the question, how to test for PPO Line above 0 for x days. And you can re-phrase that question as, how to test for a minimum value for x days - in your case that minimum value is 0.
The scan engine has a function to test for minimum values - min( ) - explained here:
http://stockcharts.com/docs/doku.php?st=functions&id=scans:functions
So,
and [min(50, PPO Line(1,x,1)) > 0]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