HPotter

MASS Index

The Mass Index was designed to identify trend reversals by measuring
the narrowing and widening of the range between the high and low prices.
As this range widens, the Mass Index increases; as the range narrows
the Mass Index decreases.
The Mass Index was developed by Donald Dorsey.

Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 13/05/2014
// The Mass Index was designed to identify trend reversals by measuring 
// the narrowing and widening of the range between the high and low prices. 
// As this range widens, the Mass Index increases; as the range narrows 
// the Mass Index decreases.
// The Mass Index was developed by Donald Dorsey. 
////////////////////////////////////////////////////////////
study(title="MASS Index", shorttitle="MASS Index")
Length1 = input(9, minval=1)
Length2 = input(25, minval=1)
hline(27, color=blue, linestyle=line, title = "Setup")
hline(26.5, color=red, linestyle=line, title = "Trigger")
xPrice = high - low
xEMA = ema(xPrice, Length1)
xSmoothXAvg = ema(xEMA, Length1)
nRes = sum(iff(xSmoothXAvg != 0, xEMA / xSmoothXAvg, 0), Length2)
plot(nRes, color=red, title="MASS Index")