10 day Moving Averages (10 dMA) turning direction scan
As part of a broad scan I need to have an embedded scan that finds 10 dMA's turning up.
I tried building this:
[[SMA (10, close) > SMA (10, 1 days ago close)] and [SMA (10, 1 days ago close) > SMA (10, 2 days ago close)]]]
and it returned nothing.
Is here anyway to build a scan that finds moving averages as they turn up or have a positive slope over the last two or three days?
Thanks in advance,
Sam
I tried building this:
[[SMA (10, close) > SMA (10, 1 days ago close)] and [SMA (10, 1 days ago close) > SMA (10, 2 days ago close)]]]
and it returned nothing.
Is here anyway to build a scan that finds moving averages as they turn up or have a positive slope over the last two or three days?
Thanks in advance,
Sam
0
Comments
-
Try this:
In order for there to be a turn, you have to test for the 10MA being higher at some point in the past, and then lower at some closer point in the past
and [sma(10,close) < 2 days ago sma(10,close)]
and [sma(10, close) > 1 days ago sma(10,close)]
Note: the terms are a little different than yours (the "days ago" precede the sma term, not inside it).
This code catches a one day turn up, but since the MA is so short, it might not be a real turn.
You could play with the "days ago" parameters to get what you want. Maybe 5 and 2?
Also, since this gets alot of hits, you might want to limit the universe if you aren't already - e.g. [group is sp500] or [close > 20] and [volume > 100000] or whatever.0 -
AWESOME. Thanks. It was moving the "1 days ago" to in front of the "SMA" that did the trick.
Thank you so much
Sam0
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
