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, the advance-decline line and Arms Index used with it, and what its signals did when we rebuilt it from our own daily data on US stocks.

· Founder of PatternsWizard
Checked 13 min read
How the McClellan Oscillator is built: daily bars of advancing minus declining issues, above and below zero, with a fast and a slow exponential moving average of them. Below, the McClellan Oscillator, the fast average minus the slow one, crossing above and below its zero line.
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? The signals on our own breadth data
  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).

The indicator needs the daily count of advancing and declining stocks on an exchange. Our price data does not include the official NYSE or Nasdaq counts, so the diagram below is a schematic and the examples with real readings are those published by StockCharts, cited as such. Further down, we rebuild the count from our own daily closes of US stocks and test the signals on the S&P 500.

How the McClellan Oscillator is built

How the McClellan Oscillator is built: daily bars of advancing minus declining issues, above and below zero, with a fast and a slow exponential moving average of them. Below, the McClellan Oscillator, the fast average minus the slow one, crossing above and below its zero line.
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)

The same net advance of +500, ratio-adjusted (RANA). 2,000 issues advancing or declining: 250; 3,500 issues advancing or declining: about 143. Hypothetical example, computed from the assumptions in the text.
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

A breadth thrust on the McClellan Oscillator: the ratio-adjusted McClellan Oscillator with its zero line and dashed levels at plus 50 and minus 50. It falls below minus 50, then surges above plus 50 within a few days: the breadth thrust, shaded. Afterwards it makes lower highs while staying above zero, which StockCharts calls normal after a thrust.
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

An advance-decline line that fails to confirm the index: upper panel: an index that makes three rising highs. Lower panel: the advance-decline line peaks at the first high and makes lower highs at the second and third, so fewer stocks carry each new high of the index: a bearish divergence of breadth.
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? The signals on our own breadth data

We rebuilt the oscillator from our daily closes of US stocks: the 1,707 current and former members of the S&P 1500 that we hold. Each day, a stock counts as advancing if it closed above the previous close and declining if it closed below. We start on January 3, 1997, the first day with at least 500 stocks priced, and end on October 28, 2026: 7,502 sessions. We use the ratio-adjusted version the page describes, 1,000 times net advances divided by advances plus declines, smoothed with the 10% and 5% trends, because the number of stocks grows over the period.

Stocks in our breadth count, average per day

Stocks in our breadth count, average per day. 1997: 608; 2000: 803; 2005: 1,031; 2010: 1,170; 2015: 1,367; 2020: 1,541; 2025: 1,680. Our computation; the inputs and the method are in the text.
Our computation; the inputs and the method are in the text.US stocks of our universe with a close on the day and the day before, from 1997-01-03 to 2026-10-28. Many delisted companies are missing, so the count rises over time and the stocks kept are survivors.

The count went from 597 stocks on the first day to 1,697 on the last. On the raw, unadjusted scale, the oscillator's average size, ignoring the sign, was 21.7 in 1998 and 47.6 in 2025, only because more stocks were counted: that is the distortion the ratio adjustment removes.

On this scale, 90% of the readings fell between −69 and +65. The oscillator was above +100 on 0.5% of the days and below −100 on 1.1%. Its lowest reading, −152, came on December 24, 2018, and its highest, +134, on January 18, 2019.

The rules we tested

We fixed the rules before looking at any result, from the signals described above: a cross above zero, a cross below zero, a breadth thrust (a cross above +50 within 20 sessions of a reading below −50), a fall below −100 and a rise above +100. For each signal, we measured the S&P 500 index from the close of the signal day to the close 5, 20 and 60 sessions later, and compared it with the same number of days drawn at random from the same period, 2,000 times with a fixed seed. The index is the price index, without dividends.

S&P 500, 20 sessions after each McClellan signal, against random days

S&P 500, 20 sessions after each McClellan signal, against random days. Crosses above zero (714): After the signal +0.49%, Random days +0.70%; Crosses below zero (715): After the signal +0.34%, Random days +0.71%; Breadth thrust (-50 to +50) (210): After the signal +1.08%, Random days +0.70%; Falls below -100 (48): After the signal +1.65%, Random days +0.70%; Rises above +100 (26): After the signal +1.14%, Random days +0.71%. Our computation; the inputs and the method are in the text.
  • After the signal
  • Random days
Our computation; the inputs and the method are in the text.Average price change of the S&P 500 index from the signal's close to 20 sessions later; number of signals in brackets. Random days: the same number of days drawn from the same period, 2000 draws, average. Ratio-adjusted oscillator built on our US stocks, 1997 to 2026.

The zero line did not help. After the 714 crosses above zero, the S&P 500 rose 0.49% on average over the next 20 sessions, against 0.70% after random days. After the 715 crosses below zero, it rose 0.34%. Both did worse than random days: most crosses were noise.

Staying in the index only while the oscillator was positive cost money. Buying at the close after a positive reading and selling after a negative one kept the money invested 51.6% of the time, with about 24 round trips a year at 0.05% each. It compounded 2.2% a year after costs from May 28, 1997, against 7.8% for holding the index, and its worst drawdown, 54.9%, was almost as deep as the index's 56.8%. The days after a negative reading were in fact the better ones: 10.9% a year on average, against 7.9% after a positive reading. In the short run, weak breadth tended to be followed by a rebound, not by more selling.

In the S&P 500 only when the oscillator is positive, against holding it

In the S&P 500 only when the oscillator is positive, against holding it. A year compounded: Oscillator above zero +2.2%, S&P 500 held +7.8%; Worst drawdown: Oscillator above zero −54.9%, S&P 500 held −56.8%. Our computation; the inputs and the method are in the text.
  • Oscillator above zero
  • S&P 500 held
Our computation; the inputs and the method are in the text.Daily closes from 1997-05-28 to 2026-10-28, index price without dividends. The rule buys at the close after a positive reading and sells at the close after a negative one, 0.05% per round trip; no interest on cash.

Breadth thrusts and extremes

The signals at the extremes did better, with fewer cases. After the 210 breadth thrusts, the index rose 2.9% on average over 60 sessions, against 2.1% after random days; only 4.1% of the random draws did as well. But thrusts come in clusters: several crosses of +50 in the same rebound. Keeping only the first thrust of each episode, at least 60 sessions after the previous one, leaves 70 cases, which gained 2.1%: no better than random days.

The same signals, 60 sessions later

The same signals, 60 sessions later. Crosses above zero (712): After the signal +1.84%, Random days +2.05%; Crosses below zero (712): After the signal +1.89%, Random days +2.06%; Breadth thrust (-50 to +50) (210): After the signal +2.92%, Random days +2.05%; Falls below -100 (48): After the signal +5.68%, Random days +2.04%; Rises above +100 (26): After the signal +2.45%, Random days +2.09%. Our computation; the inputs and the method are in the text.
  • After the signal
  • Random days
Our computation; the inputs and the method are in the text.Average price change of the S&P 500 index over 60 sessions; random days as above (2000 draws).

The oversold reading held up best. The oscillator fell below −100 48 times, in 29 separate episodes. Sixty sessions later the index was up 5.7% on average, against 2.0% after random days, and 0 of the 2,000 random draws did as well. The first signal of each episode alone gained 4.4%. Large rebounds pull the average up, the largest in 2009 and 2020; without the signals of those two years the average was 4.1%. The median gain was 3.6%, against 3.1% for all days. The signal came in 20 different years, and the average 60-session result was positive in 16 of them.

The overbought reading was no warning. After the 26 rises above +100, the index gained 2.5% over 60 sessions, against 2.1% after random days: strong breadth was followed by a market that kept rising about as usual.

In short: on our data, the McClellan Oscillator did not time the S&P 500 through its zero line, and an exposure rule built on it lagged the index by a wide margin. Deep oversold readings were followed by better than average gains over the next three months, mostly through a few large rebounds. Our methodology explains how the bench tests chart patterns against random entries in the same way.

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.

Does the McClellan Oscillator work?

On a breadth count we rebuilt from our US stocks since 1997, crosses of the zero line were followed by smaller S&P 500 gains than random days. Readings below −100 were followed by an average 60-session gain of 5.7% against 2.0% on random days, mostly from a few large rebounds. Our count misses delisted stocks, so it is not the exchange's official breadth.

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