Mass Index
Dorsey published the Mass Index in Stocks & Commodities magazine (1992) around a deliberately direction-blind idea: trend reversals are often preceded by a widening of the daily trading range, regardless of which way price is about to turn. Rather than measure price change, Mass Index measures range EXPANSION. Each bar's high-low range is smoothed with a 9-bar EMA, that EMA is smoothed again with a second 9-bar EMA, and the ratio of the single- smoothed EMA to the double-smoothed EMA is summed over a trailing 25-bar window. A widening range pushes the ratio above 1, and the 25-bar sum climbs; Dorsey's published trigger is a "reversal bulge" - the sum reaching 27.0 and then dropping back below 26.5 - which historically preceded a trend change often enough to be worth watching, though Dorsey himself paired it with a separate trend filter to decide direction, since the Mass Index says nothing about which way the reversal will go. This submission plots the Mass Index line with both trigger levels drawn for reference, and additionally tracks the bulge-then-drop SEQUENCE across recent bars, showing it as a chart comment - a plotted level alone does not tell you whether the sequence has actually completed, only that price crossed a number at some point. Notes and limitations - Needs roughly 2 * InpEmaPeriod + InpSumPeriod bars of history before it produces a value. - The bulge/reversal comment scans only the most recent 50 bars for the 27.0-then-26.5 sequence; a bulge further back than that is not reported. - Mass Index does not indicate trend direction - only the likelihood of a reversal. It is not a standalone trade signal and generates no buy/sell alerts. - The chart comment is cleared in OnDeinit so it does not persist after the indicator is removed.
Indicator · MT5 · v1.0 · Free
About Mass Index
Mass Index is an indicator for MetaTrader 5. It has 3 settings, such as Ema period, Sum period and Show bulge text. MQL source code included.
Files in the download: MassIndex.ex5, MassIndex.mq5, MassIndex.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Ema period | 9 | EMA period applied twice to the high-low range |
| Sum period | 25 | Number of bars the EMA ratio is summed over |
| Show bulge text | true | Draw a chart comment when a 27.0 bulge has occurred and MI has since dropped below 26.5 |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Moving Average · Trend · MT5 Indicator · MQL5 Source Code