Pine Script (TradingView)
Ceci est un exemple Pine Script TradingView pour cet indicateur. Collez-le dans l'editeur Pine TradingView, ajoutez-le au graphique, puis ajustez les parametres selon votre marche et votre unite de temps.
//@version=6
indicator("Chaikin Money Flow (CMF)", overlay=false)
length = input.int(20, "CMF Length")
ad = ta.accdist
cmf = math.sum(ad - ad[length], length) / math.sum(volume, length)
longSignal = ta.crossover(cmf, 0)
shortSignal = ta.crossunder(cmf, 0)
plotshape(longSignal, style=shape.triangleup, location=location.bottom, color=color.green, size=size.small)
plotshape(shortSignal, style=shape.triangledown, location=location.top, color=color.red, size=size.small)
hline(0.25, "+0.25", color=color.green, linestyle=hline.style_dashed)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dotted)
hline(-0.25, "-0.25", color=color.red, linestyle=hline.style_dashed)
plot(cmf, "CMF", color=cmf >= 0 ? color.green : color.red)