Momentum indicators

McClellan Oscillator: Formula, Worked Example, A/D Line and TRIN

The McClellan Oscillator is the 19-day minus the 39-day exponential average of net advances, a MACD of market breadth. How it is calculated step by step, how to read it, and the advance-decline line and Arms Index used with it.

· Founder of PatternsWizard
Checked 8 min read
Advances minus declines, each dayFast EMA, about 19 daysSlow EMA, about 39 days (dashed)McClellan Oscillator = fast EMA minus slow EMAAbove zero: the fast trend leadsBelow zero: declines are gainingTime
On this page
  1. How the McClellan Oscillator is calculated
  2. How to read the McClellan Oscillator
  3. The advance-decline line
  4. The Arms Index (TRIN)
  5. Does it work?
  6. Frequently asked questions

The McClellan Oscillator is a breadth indicator: it does not look at the price of an index but at how many of its stocks went up and how many went down each day. It is the gap between two exponential moving averages of that daily difference, a fast one and a slow one, like a MACD applied to market breadth. Sherman and Marian McClellan developed it in 1969, with the Summation Index that adds up its values. Below: the formula with a worked example, how it is read, and the two other breadth indicators it is often used with, the advance-decline line and the Arms Index (TRIN).

There is no McClellan curve on this page. The indicator needs the daily count of advancing and declining stocks on an exchange, which our data does not include, and we do not draw curves from data we do not have. The diagram below is a schematic; the examples with real readings are those published by StockCharts, cited as such.

How the McClellan Oscillator is built

Advances minus declines, each dayFast EMA, about 19 daysSlow EMA, about 39 days (dashed)McClellan Oscillator = fast EMA minus slow EMAAbove zero: the fast trend leadsBelow zero: declines are gainingTime
Bars
advancing issues minus declining issues on each day
Fast EMA
smoothing constant one tenth, about 19 days
Slow EMA
smoothing constant one twentieth, about 39 days
Schematic, not market data.The fast and slow trends of net advances and their difference, the oscillator.

How the McClellan Oscillator is calculated

Each day, take the number of advancing issues minus the number of declining issues: the net advances, or A − D. Smooth it with two exponential moving averages that the McClellans called the 10% Trend and the 5% Trend, after their smoothing constants. The oscillator is the 10% Trend minus the 5% Trend. With the usual formula linking a smoothing constant to a period, 2 / (n + 1), 10% corresponds to 19 days and 5% to 39 days, which is why most platforms describe it as a 19-day EMA minus a 39-day EMA. Tom McClellan, their son, writes that he prefers not to name these averages by a number of days, since an exponential average never completely forgets old data.

The ratio-adjusted version

The number of stocks listed on an exchange changes over the years, and a net advance of +500 does not mean the same thing with 2,000 issues as with 3,500. StockCharts therefore computes a ratio-adjusted version: net advances divided by advances plus declines, multiplied by 1,000 (RANA), then the same two averages. In a hypothetical case, a net advance of +500 gives a RANA of 250 when 2,000 issues advance or decline, and about 143 when 3,500 do.

The same net advance of +500, ratio-adjusted (RANA)

2,000 issues advancing or declining2503,500 issues advancing or decliningabout 143
Hypothetical example, computed from the assumptions in the text.RANA = (advances − declines) / (advances + declines) × 1,000.

StockCharts writes that the adjustment takes into account the changing number of issues traded on the NYSE and Nasdaq. StockCharts gives an example from July 2010: net advances ranged from +2,293 to −1,806 that month, and RANA from +753 to −595.

How to read the McClellan Oscillator

StockCharts describes three kinds of signal, the same as for the MACD.

  • Above or below zero. Positive, the fast trend is above the slow one and advances are gaining the upper hand; negative, declines dominate. It can stay on one side for weeks in a strong trend.
  • Breadth thrusts. A surge from deep negative to strong positive readings, typically from below −50 to above +50 on the ratio-adjusted scale. StockCharts shows the Nasdaq version surging more than 150 points, from −80 to +80, at the March 2009 low, and writes that not all thrusts lead to extended advances.
  • Divergences. The index makes a new low and the oscillator a higher low, or the reverse at a top. StockCharts adds that lower highs after a breadth thrust are normal, and that it is enough for the oscillator to stay positive.

A breadth thrust on the McClellan Oscillator

+500−50Breadth thrust:below −50 to above +50Lower highs above zeroare normal after a thrustRatio-adjusted McClellan Oscillator, drawn by hand.
Schematic, not market data. Drawn by hand to show the reading, not computed.

The Summation Index is the running total of the oscillator. Tom McClellan writes that it is neutral at +1,000 when calculated and calibrated properly.

The advance-decline line

The advance-decline line (A/D line) is the simplest breadth indicator: the running total of net advances. The McClellan Oscillator is, in StockCharts’ words, the MACD of the A/D line. Its level depends on the date the total starts, so only its shape and direction matter. It is read against the index: an A/D line that makes new highs with the index confirms broad participation; one that fails to confirm a new high warns that fewer stocks are carrying the rise. StockCharts cites the NYSE Composite in 2007: it made new highs in July while the A/D line had peaked at the beginning of June, then new highs again in October while the A/D line fell well short of its July high, divergences that came before the 2008 bear market.

An advance-decline line that fails to confirm the index

Indexnew highsAdvance-decline linepeaklower highsFewer stocks carry each new high of the index:breadth fails to confirm the rise.
Schematic, not market data. Drawn by hand to show the reading, not computed.

Two quirks limit it. Every stock counts as +1 or −1 whatever its size, so the line reflects small and mid caps more than the largest companies. And the Nasdaq A/D line can fall for years while the index rises: StockCharts shows it declining from 2010 to 2012 as the Nasdaq advanced, partly because failing companies leave the index but their declines stay in the total.

The Arms Index (TRIN)

Richard W. Arms developed the Arms Index, or TRIN (short-term trading index), in 1967. It divides the advance-decline ratio by the ratio of advancing volume to declining volume.

Below 1, the volume of rising stocks is strong relative to their number; above 1, it is weak. Strong up days therefore push the TRIN down and strong down days push it up, which makes it move against the market. StockCharts treats readings above 3 as oversold and below 0.50 as overbought for the unsmoothed NYSE TRIN, and 1.20 and 0.80 for a 10-day average of the Nasdaq version. It recommends trading in the direction of the underlying trend, for instance taking only the oversold readings when the index is above a rising 100-day average.

Does it work?

We cannot measure it: breadth data is not part of our bench, which tests chart patterns detected by rule against random entries (see our methodology). The published examples above were picked to illustrate the signals; they are not a test over every case. For the same reason, the indicator has no equivalent on a single stock, a currency pair or a cryptocurrency: there is no count of advancing and declining issues to build it from.

Related pages: the MACD, whose construction the oscillator copies, the Chaikin Oscillator, the MACD of a volume line, the rate of change, and the list of momentum indicators.

Every pattern's results on one sheet

The only pattern cheat sheet with tested stats: 152 patterns, what the textbook says and what really happened on 6 markets. Free PDF, sent to your inbox.

The PDF by email, plus our newsletter: new tests and results that change. Unsubscribe anytime. Privacy.

Frequently asked questions

What is the McClellan Oscillator?

A market breadth indicator: the difference between a fast and a slow exponential average of daily net advances, the number of rising stocks minus the number of falling stocks on an exchange. Positive readings mean advances are gaining the upper hand.

How is the McClellan Oscillator calculated?

Smooth daily net advances with a 10% exponential average (about 19 days) and a 5% one (about 39 days), then subtract the second from the first. StockCharts uses a ratio-adjusted version, net advances divided by advances plus declines, times 1,000.

What is the McClellan Summation Index?

The running total of the McClellan Oscillator. Tom McClellan writes that it is neutral at +1,000 when calculated and calibrated properly.

What is a breadth thrust on the McClellan Oscillator?

A surge from deep negative readings to strong positive ones, typically from below −50 to above +50 on the ratio-adjusted scale. StockCharts notes that most important lows are marked by such a surge but that not every thrust leads to an extended advance.

Can the McClellan Oscillator be used for crypto or forex?

No. It is built from the count of advancing and declining issues on an exchange; a single cryptocurrency or currency pair has no such count.

Sources

  1. McClellan Financial Publications, Calculating the McClellan Oscillator (archived capture, 2010)
  2. StockCharts ChartSchool, McClellan Oscillator
  3. StockCharts ChartSchool, Advance-Decline Line
  4. StockCharts ChartSchool, Arms Index (TRIN)
, Founder of PatternsWizard

Passionate about finance, quantitative trading and data analysis. Amaury built the PatternsWizard test bench, which detects each pattern on full price history and measures what happened next against random entries.

PatternsWizard tests chart and candlestick patterns on full market history, against random entries. How we test patterns.

179 patterns testedRandom-walk self-test passed

All momentum indicators articles