Pine Script (TradingView)
هذا مثال Pine Script على TradingView لهذا المؤشر. الصقه في Pine Editor داخل TradingView، اضفه الى الرسم البياني، ثم عدل الاعدادات حسب السوق والاطار الزمني.
//@version=6
indicator("Force Index", overlay=false)
shortLen = input.int(2, "Short EMA")
longLen = input.int(13, "Long EMA")
fi = (close - close[1]) * volume
fi2 = ta.ema(fi, shortLen)
fi13 = ta.ema(fi, longLen)
longSignal = ta.crossover(fi13, 0) and fi2 < 0
shortSignal = ta.crossunder(fi13, 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, "Zero", color=color.gray, linestyle=hline.style_dotted)
plot(fi2, "2-EMA Force", color=color.aqua)
plot(fi13, "13-EMA Force", color=color.orange, linewidth=2)