Market Meanness Index [CC]

The Market Meanness Index was created by Johann Christian Lotter and I added some smoothing of my own, so feel free to try it without any smoothing to see the differences. This indicator relies on the mean reversion theory that all prices will eventually revert to the mean over a long period of time. Obviously there is more to the theory but the basic idea is if you plot a sma or other typical moving average, you will see the price moving up or below the long term moving average such as a 200 day sma but usually heads back to the average in the short term. This is a good statistical analysis used for volatility which is where this indicator comes in. Simply put, we calculate volatility based on how often a price is both above the median and above the previous price or vice versa.

A rising Market Meanness Index means that the market is becoming more volatile and that there is a high likelihood of a change in the underlying trend. A falling Market Meanness Index means that the current trend is dying and there is a high likelihood of a trend reversal. Typically I put general buy and sell signals in red or green but in this particular case, this indicator works best as a overall trend filter and you would want to place a trade when this indicator has a peak or valley. Let me know if you find a good overall buy and sell signal system of course.

I know I keep saying that I will get active again and post more indicators but life is very hectic for me. For those who have been following my updates, my twins were finally born a little over a month ago and as you can imagine, they keep me up at all hours of the day so it is hard to create new indicator scripts when I'm getting no sleep lol. I will do my best to start publishing the giant backlog of scripts I have created but in the meantime, please be patient with me. This indicator was a special request so let me know if you have any special requests of your own!

I created the largest stock indicator library:

Custom Indicator Requests:

Tips are appreciated:
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?