McClellan Summation Index
Author: Sammy_G
Creation Date: 10/2/2010 10:07 PM
profile picture


Hi Eugene,

The formula for McC summation index is wrong; it should be:
Please log in to see this code.

Also, please consider adding the Ratio-adjusted calculations for both the McC Osc and SI Its more robust than the classic version, in my opinion, as it makes the calculations essentially impervious to changes in the number of issues traded over the years making long term comparisons more reliable.
profile picture


"The Summation Index is the total of all previous McClellan Oscillator values, and it is neutral at +1000 when calculated and calibrated properly." - says

What is the "should be" code above is actually doing? It's not summing up the values at all like McC summation index should, so it appears to be further from the truth than the Wiki example code.

And why is +1000 being added to the calculation, could I have a prooflink please?
profile picture


Check out these two links; they will answer all your questions:

The 1000 is basically the "neutral value" arbitrarily established by the original authors - the McClellans - and one which they, as well as the world, still use.

But the proof of the pudding is in the eating, as they say. Compare the values for Summation Index generated by your formula vs the formula given in the 2 links above (the one which I quoted) against the de facto standard - [].
profile picture


Thanks for the links.

Based on the 2nd link above and itself (the resource I previously used to verify the Community Indicators' MCO against their Excel table), my calculation was correct - but considered "old school" by today's standards.

However if we compare the formulas, they all are different.

1. Here's your formula
mcoSumIdx[bar] = 1000 + ( 19*emaLT[bar] - 9*emaST[bar] );

2. Here's the Stator-AFM formula:
mcoSumIdx_a[bar] = (19*emaLT[bar] + 9*emaST[bar]) + 1000;

3. And here's James Miekka's formula (aka new method) from the DecisionPoint link:
mcoSumIdx_d[bar] = 1000 - 19*emaLT[bar] + 9*emaST[bar];

They produce very different results. So which one is closest to the money?

Please log in to see this code.
profile picture


Eugene, all 3 formulas are the same.

Before I solve them, let me define a couple of archaic terms still used:
10% trend = short-term (19 bar) trend = what I labeled as emaST
5% trend = longer-term (39 bar) trend = what I labeled as emaLT

Symbols I used are from Fidelity: ".MB_ADV.N" for NYSE advances, ".MB_DEC.N" for NYSE declines.

The Stator-AFM formula is:
Summation Index (SI) = McClellan Oscillator - ((10*10% trend) + 20*5% trend)) + 1000

This appears to be a typo; should really be:
Summation Index (SI) = McClellan Oscillator - ((10*10% trend) - 20*5% trend)) + 1000
since we are logically supposed to subtract the 5% trend from the 10% trend [the 10*10% trend and 20*5% trend if not subtracted would lead to approx 200% (10*10% + 20*5%) trend].

This solves to:
SI = (emaST[bar] - emaLT[bar]) - (10*emaST[bar] - 20*emaLT[bar]) + 1000
= emaST[] - emaLT[] - 10emaST[] + 20emaLT[] + 1000
= - 9emaST[] + 19emaLT[] + 1000
= 1000 + 19emaLT[] - 9emaST[]

James Miekka's formula from DecisionPoint is:
Summation Index (SI) = 1000 - (9 * 10% Index) + (19 * 5% Index)

This solves to:
SI = 1000 - 9*emaST[] + 19*emaLT[]
= 1000 + 19emaLT[] - 9emaST[]
(you mixed up the + and - signs in the latter)

As you can see, they are really the same. And as I had written previously, just compare the values obtained to what is published daily on; you can d/l their Daily Oscillator Data xls file to compare values going further back in time.
profile picture


After fixing a typo in the stator-afm's formula (that's why it always makes sense to double check the free web-based sources of information) and correcting my error in Miekka's formula, they all return the same value as you say, which is (almost) in line with's Excel sheet (because I'm not using the Fidelity data but rather the numbers coming from our Market Sentiment static data provider that reports more accurate median values based on several data sources).

Thank you. Wiki example edited.
profile picture


using the above code and wiki code for mcClellan Summation Index i get invalid symbol NYSE_advn
profile picture


As both the above code...
Please log in to see this code.

...AND the Wiki code...
This example illustrates how to plot McClellan Oscillator using Market Sentiment provider's symbology, as well as construct McClellan Summation Index

repeatedly suggest,

"NYSE_advn" is created by the Market Sentiment data provider. More information is available in provider's online guide in the Wiki.

In general, don't hesitate to be curious about an error you're getting. Here's some simple steps you can take before asking on the forum. Notice the line, find the method which triggered it, highlight it and hit F1 to open the QuickRef tool with more details about possible errors. In addition, try to read // comments in the code you're executing: they're there for a purpose.
profile picture


I can't get the data set that is in instructions. this is all I get
profile picture


The Market Sentiment data provider is an extension. Since you don't have it installed, there is no choice in the New DataSet Wizard. Solution: install the extension and restart WLP.

Before you're able to install, please create a support ticket to verify your WLP entitlement.