- 2.1K All Categories
- 1.7K StockCharts
- 322 SharpCharts
- 88 Other Charting Tools
- 39 Saved Charts and ChartLists
- 1.1K Scanning
- 56 Data Issues
- 126 Other StockCharts Questions
- 152 Technical Analysis
- 116 Using Technical Analysis
- 1 InterMarket and International
- 14 Market and Breadth Indicators
- 21 Market Analysis
- 76 Trading
- 76 Trading Strategies
- 143 S.C.A.N the StockCharts Answer Network forum
- 49 Using this StockCharts Answer Network forum
- 94 s.c.a.n. archives
- 11 Off-Topic
- 8 The Cogitation & Rumination Emporium
- 3 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.