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.
need help with this weekly scan....
Answers
-
If I remember correctly @Gord 's answers about using MACD to compare MAs and closes - if you are OK with an EMA instead of an SMA, you could write
and [max(10, MACD Hist(1,30,0)) < 0]
Add MACD Hist(1,30,0) to a chart, along with a 1 period EMA and a 30 period EMA to verify the results.
The first two parameters are the lengths of two EMAs (MACD only takes EMAs). The third parameter is an average of the difference between the two emas If that third parameter is 0, the indicator displays just the raw difference between the first two emas. As long as that difference is above zero, the first EMA (1) is above the second (30) EMA; if the difference is below zero, the first is below the second (this assumes the first EMA is the shorter EMA).
A 1 period EMA is the same as the close, so this combination of EMAs will display the difference between the close and the EMA.
So the above scan says the maximum difference between the two EMAs (1 and 30) has not exceeded 0 for the last 10 periods. Remember we are dealing with negative numbers, so "smaller" negative numbers are actually greater, e.g. -5 is greater than -10, so we have to use max() even though the Hist bar for -5 would be shorter than -10 on the indicator display.
0 -
Sorry, that should be
and [max(10, weekly MACD Hist(1,30,0)) < 0]0 -
Markd, great explanation, although one update.
I don't run weekly scans very often so I get caught on this one too.
We need to add "weekly" in front of MAX. The default is always "daily", so without that qualifier we are asking for the weekly MACD to be less than 0 for the last 10 daily periods, not the last 10 weekly periods.
I know this sounds a little strange but the weekly MACD does have a daily value, (ie an intra-week value), you will get a different value on Monday, Tuesday, Wed etc, then at the end of the week it has a set weekly value.
Also a reminder to all, its best to run these weekly scans on the weekend to avoid the intra-week data, unless that's what you want.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