EMA/SMA scan
Comments
-
You would just subtract the two terms in question, and compare the result to some number you want them to be less than. So the basic form is:
and [a - b < c]
"a" and "b" are the EMA and SMA of your choice, like ema(50,close) and sma(10,close). "c" is the difference between them of your choice - 0, 1, 2.5, etc.
But there are some wrinkles.
If you want only positive results (a is above b on the chart, or same thing, b is below a), then
and [a > b]
and [ a - b < c]
only negative results (a is below b):
and [a < b]
and [ a - b > c]
Note the change of the comparison operator for negative numbers from < (less than) to > (greater than). Also "c" would be a negative number: -1, -2.5, etc.
If you don't care whether the result is positive or negative, then you need the absval() function:
and [absval(a-b) < c]
Watch your parentheses with this one.
If you want to compare multiple mas, just repeat the appropriate statements for each comparison.
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
