indicator · own pane · open source

Mass Index

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Mass Index sums the ratio of the smoothed range to its double-smoothing over a 25-bar window — designed to spot trend reversals via a range bulge.

  • A bulge above 27.0 warns that the range is expanding fast; look for a reversal candle.
  • Falling back below 26.5 after a bulge often marks the actual turn.

Source code

//@version=5
indicator("Mass Index", overlay=false)
len = input.int(25, "Sum length", minval=2, maxval=100)
eLen = input.int(9, "EMA length", minval=2, maxval=50)
e1 = ta.rma(high - low, eLen)
e2 = ta.rma(e1, eLen)
miX = e1 / e2
miSum = ta.cum(miX) - ta.cum(miX)[len]
mi = miSum
hline(27, "Bulge", color=color.red)
hline(26.5, "Reset", color=color.green)
p_MI = plot(mi, "MI", color=color.purple, linewidth=2)
alertcondition(ta.crossover(mi, 27), "Bulge", "Mass Index bulged above 27")
alertcondition(ta.crossunder(mi, 26.5), "Reset", "Mass Index reset below 26.5 — reversal candidate")

Comments

No comments yet.

Sign in to comment.