Elixium

Relative Momentum Index Elixium

Just a mod to change the precision to zero (remove the useless digits e.g. indicator value 80.000000)
Also it appears that this indicator hasn't been published on the library yet.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
study(title = "Relative Momentum Index Elixium", shorttitle= "RMI Elixium", precision=0)
// Relative Momentum Index
//  
// Roger Altman, February 1993, "Technical Analysis of Stocks & Commodities"
//
// Rewrite for Tradingview "Pine Script" by Kocurekc, April 2014
// https://getsatisfaction.com/tradingview/
// https://www.tradingview.com/u/kocurekc/
// Code is provided as public domain, no warranty


//******************************Using***************************
//Inputs - EMA averaging length
//Inputs - Momentum, lookback period for increase or decrease
//Option - Upper Bound Line, which sets the upper fill level
//Option - Lower Bound Line, which sets the lower fill level
//******************************END*****************************

Len = input(title="EMA Averaging Length", type=integer, defval=20, minval=1)
Mom = input(title="Lookback for Momentum", type=integer, defval=5, minval=1)
OVB = input(title="Top Boundary", type=integer, defval=80, minval=51, maxval=100)
OVS = input(title="Bottom Boundary", type=integer, defval=20, minval=0, maxval=49)
InA = input(title="SMA Trendline", type=bool, defval=false)
smaLen = input(title="SMA Period", type=integer, defval=10, minval=1)

emaInc = ema(max(close - close[Mom], 0), Len)
emaDec = ema(max(close[Mom] - close, 0), Len)
RMI = emaDec == 0 ? 0 : 100 - 100 / (1 + emaInc / emaDec)

p1 = plot(RMI >= OVB ? RMI : OVB, color=green)
p2 = plot(OVB, title='OverB', color=green)
p3 = plot(OVS, title='OverS', color=red)
p4 = plot(RMI <= OVS ? RMI : OVS, color=red)
hline(50, linestyle=dashed)

plot(RMI, color=black)
plot(InA?sma(RMI,smaLen):na)

fill(p1, p2, color=green, transp=50)
fill(p3, p4, color=red, transp=50)