Skip to content

Whether the bars are getting wider, summed over a window.

The ratio of an EMA of bar ranges to an EMA of that EMA, added up over summationPeriods bars. It rises when ranges widen faster than their average.

The classic reading is a “reversal bulge”: the index rising above 27 and then falling back below 26.5 suggests the trend may turn. It does not say in which direction, so traders pair it with a trend indicator.

range = high − low
single = EMA(range, emaPeriods)
double = EMA(single, emaPeriods)
Mass Index = Σ (single / double), over the last summationPeriods bars

Call: massIndex(emaPeriods, summationPeriods)

Setting Chart default
emaPeriods: EMA Periods 9
summationPeriods: Summation Periods 25

What you get: a number.

Warm-up: with massIndex(9, 25), it asks for 0 bars of history and a run-up of 43, and its first value came on bar 41 of the example data.

Mass Index drawn by its own code on example prices

The prices are made up, hourly, and the same on every page, so the chart shows how the indicator behaves, not how a market behaved.

let wasAbove27 = false;
function onIntervalClose() {
const mass = massIndex(9, 25);
if (mass > 27) {
wasAbove27 = true;
} else if (wasAbove27 && mass < 26.5) {
log("Reversal bulge completed");
wasAbove27 = false;
}
}