Pine Script (TradingView)
هذا مثال Pine Script على TradingView لهذا المؤشر. الصقه في Pine Editor داخل TradingView، اضفه الى الرسم البياني، ثم عدل الاعدادات حسب السوق والاطار الزمني.
//@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)