OPEN-SOURCE SCRIPT
Updated MMI Signal

Trend trading strategies filtered by the Market Meanness Index.
This is a port of the experiment described at
financial-hacker.com/boosting-systems-by-trade-filtering/
financial-hacker.com/trend-delusion-or-reality/
financial-hacker.com/trend-and-exploiting-it/
financial-hacker.com/whites-reality-check/
The Market Meanness Index tells whether the market is currently moving in or out of a "trending" regime. It can this way prevent losses by false signals of trend indicators. It is a purely statistical algorithm and not based on volatility, trends, or cycles of the price curve.
The indicator measures the meanness of the market - its tendency to revert to the mean after pretending to start a trend. If that happens too often, all trend following systems will bite the dust.
Inputs
This is a port of the experiment described at
financial-hacker.com/boosting-systems-by-trade-filtering/
financial-hacker.com/trend-delusion-or-reality/
financial-hacker.com/trend-and-exploiting-it/
financial-hacker.com/whites-reality-check/
The Market Meanness Index tells whether the market is currently moving in or out of a "trending" regime. It can this way prevent losses by false signals of trend indicators. It is a purely statistical algorithm and not based on volatility, trends, or cycles of the price curve.
The indicator measures the meanness of the market - its tendency to revert to the mean after pretending to start a trend. If that happens too often, all trend following systems will bite the dust.
Inputs
- Price Source: Either open, high, low, close, hl2, hlc3, or ohlc4. The default value is hlc3.
- Trend MA Type: Either SMA, EMA, LowPass, Hull MA, Zero-Lag MA, ALMA, Laguerre, Smooth, Decycle. The default value is LowPass.
- Trend MA Period: Sets the lookback period of trend MA. The default value is 200.
- MMI Period: Sets the lookback period of the Market Meanness Index. The default value is 300.
Release Notes
Fixed compilation error with recent pinescript versionOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
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.