HPotter

Money Flow Indicator (Chaikin Oscillator)

Indicator plots Money Flow Indicator (Chaikin). This indicator looks
to improve on Larry William's Accumulation Distribution formula that
compared the closing price with the opening price. In the early 1970's,
opening prices for stocks stopped being transmitted by the exchanges.
This made it difficult to calculate Williams' formula. The Chaikin
Oscillator uses the average price of the bar calculated as follows
(High + Low) /2 instead of the Open.
The indicator subtracts a 10 period exponential moving average of the
AccumDist function from a 3 period exponential moving average of the
AccumDist function.

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 12/05/2014
//    Indicator plots Money Flow Indicator (Chaikin). This indicator looks 
//    to improve on Larry William's Accumulation Distribution formula that 
//    compared the closing price with the opening price. In the early 1970's, 
//    opening prices for stocks stopped being transmitted by the exchanges. 
//    This made it difficult to calculate Williams' formula. The Chaikin 
//    Oscillator uses the average price of the bar calculated as follows 
//    (High + Low) /2 instead of the Open.
//    The indicator subtracts a 10 period exponential moving average of the 
//    AccumDist function from a 3 period exponential moving average of the 
//    AccumDist function.    
////////////////////////////////////////////////////////////

study(title="Money Flow Indicator (Chaikin Oscillator)", shorttitle="MFI")
Fast = input(3, minval=1)
Slow = input(10, minval=1)
hline(0, color=gray, linestyle=dashed)
lenMax = max(Fast, Slow)
lenMin = min(Fast, Slow)
xDiv = (high - low) * volume
SumMax = sum(iff(xDiv > 0, (close - open) / (high - low) * volume , 0) , lenMax)
SumMin = sum(iff(xDiv > 0, (close - open) / (high - low) * volume , 0) , lenMin)
emaMax = ema(SumMax, lenMax)
emaMin = ema(SumMin, lenMin)
nRes = emaMax - emaMin
plot(nRes, color=blue, title="RMI")