Code to scan for a positive slope for the 26 week price EMA
Best Answers
-
Could you post the scan coding you are having problems with and someone will take a look at it.
I assume you are using a Slope period of 2 as you are just comparing this week to last week.
and [weekly Slope(2, weekly EMA(26, close)) > 0]
0 -
How about:
and [ ema(26, weekly close) = max(5, ema(26, weekly close))]
So this says, find all stocks where the ema 26 is the highest it has been in 5 weeks. That doesn't allow any wiggle room to include rising emas that have turned down this week.
Edit the 5 in max(5, ...) to narrow/expand the types of situations you get. If you keep the number small, you can get situations where the ema is coming off a low. If you lengthen it, you will get longer trends (although they could be wavy).0
Answers
-
Thanks to gord and markd. You answered the question and provided a description of the output. Your appreciated.0
Categories
- All Categories
- 2.4K StockCharts
- 397 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 74 Data Issues
- 177 Other StockCharts Questions
- 224 Technical Analysis
- 155 Using Technical Analysis
- 6 InterMarket and International
- 19 Market and Breadth Indicators
- 44 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 162 S.C.A.N the StockCharts Answer Network forum
- 64 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 7 Off-Topic
- 7 The Cogitation & Rumination Emporium
- Forum Test Area

