indicator · own pane · open source
Market Meanness Index indicator
Market Meanness Index is a free open-source indicator. Market Meanness Index (MMI) — ratio of the standard deviation of the price-vs-SMA distance… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Market Meanness Index does
Market Meanness Index (MMI) — ratio of the standard deviation of the price-vs-SMA distance to its mean absolute deviation. High MMI = trending (heavy tails), low MMI = mean-reverting (Gaussian).
- Use with a regime filter to switch between trend-following and mean-reversion strategies.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Market Meanness Index", overlay=false)
len = input.int(14, "Length", minval=5, maxval=100)
colorBg = input.color("color.purple", "Color Bg")
colorNeutral = input.color("color.gray", "Color Neutral")
dist = close - ta.sma(close, len)
mmi = ta.stdev(dist, len) / math.max(ta.sma(math.abs(dist), len), 0.0001)
hline(1, "Gaussian", color=colorNeutral)
p_MMI = plot(mmi, "MMI", color=colorBg, linewidth=2)
alertcondition(mmi > 1.4, "Heavy tails", "MMI above 1.4 — heavy-tail / fat tails price")
alertcondition(mmi < 0.8, "Mean reverting", "MMI below 0.8 — mean-reverting regime")
No comments yet.
Sign in to comment.