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.

On this page
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

- 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
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)

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

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

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

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

- After the signal
- Random days
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

- Oscillator above zero
- S&P 500 held
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

- After the signal
- Random days
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.
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.
