Indicators/probuilder · probacktest · proorder · proscreener

MassIndex

MassIndex in ProBuilder sums smoothed high-low range ratios over N bars to flag volatility bulges that often precede trend reversals. Syntax and examples.

Syntax

probuilder
MassIndex[N]

Parameters

NameTypeDefaultDescription
NintegernoneNumber of bars used for both the exponential smoothing and the final summation. The textbook setting is 25.

Formula

code
MassIndex = Summation[N](ExponentialAverage[N](high - low) / ExponentialAverage[N](ExponentialAverage[N](high - low)))

Each bar contributes the ratio between a single-smoothed and a double-smoothed high-low range. When the range widens, the single-smoothed average reacts faster than the double-smoothed one, the ratio moves above 1, and the running sum expands.

How it works

The Mass Index, introduced by Donald Dorsey, ignores price direction entirely. It looks only at the distance between each bar's high and low. When that distance expands faster than its own smoothed baseline, the per-bar ratio rises above 1 and the N bar sum climbs. When ranges contract, the sum falls back.

Because each per-bar ratio hovers around 1, the indicator oscillates around the value of N itself. MassIndex[25] fluctuates around 25, which is why the classic thresholds of 27 and 26.5 apply to the 25-bar version. A "reversal bulge" occurs when the sum rises above 27 and then falls back under 26.5, signalling that a volatility expansion has peaked and a trend change may follow.

The indicator says nothing about which direction the reversal will take. A separate trend reference, commonly a 9-period exponential average of price, is needed to decide whether the setup argues for a move up or down.

Examples

Example 1, Mass Index with a long-run baseline (Indicator)

probuilder
// 10-bar Mass Index compared with its very long average
i1 = MassIndex[10]
i2 = average[1000](i1)
RETURN i1, i2 AS "potential end of MassIndex cycle indicator"

Plots a 10-bar Mass Index against a 1000-bar average of itself. Crossings back below the baseline mark points where a volatility expansion has run out, a generalised version of the reversal bulge.

Example 2, Reversal bulge screener (ProScreener)

probuilder
mi = MassIndex[25]
// Bulge: the index exceeded 27 recently and has now dropped under 26.5
bulge = highest[10](mi) > 27 AND mi < 26.5
SCREENER[bulge](mi AS "Mass Index")

Returns instruments that printed the classic reversal bulge within the last 10 bars, using the standard 25-bar setting where the 27 and 26.5 thresholds apply.

Example 3, Volatility filter for a crossover system (ProOrder)

probuilder
// Block new entries while a volatility bulge is in progress
mi = MassIndex[25]
calm = mi < 26.5
fast = Average[20](close)
slow = Average[50](close)

IF calm AND fast CROSSES OVER slow THEN
  BUY 1 CONTRACT AT MARKET
ENDIF
IF fast CROSSES UNDER slow THEN
  SELL AT MARKET
ENDIF

Uses the Mass Index as a regime filter rather than a signal. Long entries are only taken while range expansion stays below the bulge zone, since bulges often precede trend breaks.

Interpretation

ReadingMeaning
Sum near NRanges are stable relative to their own baseline.
Rising toward 27 (25-bar setting)High-low ranges are expanding, volatility building.
Drop from above 27 to below 26.5Classic reversal bulge, the expansion has peaked and a trend change becomes more likely.

The Mass Index is direction-neutral. Combine it with a trend measure such as a short exponential average of price to determine the likely direction of any reversal.

Common errors and gotchas

  • Thresholds depend on N. The 27 and 26.5 levels only make sense for the 25-bar version, because the sum oscillates around N. MassIndex[10] fluctuates around 10 and will never reach 27.
  • Single parameter drives everything. In ProBuilder one N controls both the exponential smoothing and the summation window. The textbook definition uses a 9-period EMA inside a 25-bar sum, so results differ slightly from other platforms.
  • No direction information. A bulge flags a probable trend change, not its direction. Trading the signal without a trend reference produces coin-flip entries.
  • Warm-up distortion. The double exponential average needs a meaningful history before it stabilises. Values on the first bars of a chart, or in backtests with few preloaded bars, are unreliable.