- All Categories
- 2.2K StockCharts
- 388 SharpCharts
- 127 Other Charting Tools
- 58 Saved Charts and ChartLists
- 1.4K Scanning
- 68 Data Issues
- 159 Other StockCharts Questions
- 215 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 39 Market Analysis
- 100 Trading
- 100 Trading Strategies
- 161 S.C.A.N the StockCharts Answer Network forum
- 66 Using this StockCharts Answer Network forum
- 95 s.c.a.n. archives
- 15 Off-Topic
- 10 The Cogitation & Rumination Emporium
- 5 Forum Test Area

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.

## Answers

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.

and [max(10, weekly MACD Hist(1,30,0)) < 0]

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.