Support Board
Date/Time: Fri, 09 May 2025 07:44:00 +0000
[User Discussion] - RMI - Relative Momentum Index
View Count: 4940
[2013-11-14 18:42:06] |
Ronin - Posts: 35 |
Hello support, I've added the RMI study to some of my graphs but I noticed that ur calculation is different from other softwares I usually use RMI on. I made a comparison with other software (pic attached) on 15 min charts the difference can be noticed on other softwares as well and on other time frames - can u please check whether ur formula is different? thank you |
Attachment Deleted. Attachment Deleted. |
[2013-11-14 22:05:02] |
|
The formula could be different.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2013-11-14 22:05:42
|
[2013-11-15 11:21:21] |
Ronin - Posts: 35 |
Is is possible to create another version of it since the "feeling" and effectiveness of it is quite different would it be helpful if I post some codes for it? thank you for ur help |
[2013-11-15 11:28:38] |
ganz - Posts: 1048 |
Ronin post the code. i could try. /it takes time/ |
[2013-11-15 11:56:02] |
Ronin - Posts: 35 |
thank you ganz! I have several links from different softwares I thought might help explanations: http://www.tradingsolutions.com/functions/RelativeMomentumIndex.html http://www.fxtimes.com/glossary/relative-momentum-index-rmi/ codes: http://www.wisestocktrader.com/indicators/443-relative-momentum-index other: http://www.mql5.com/en/code/1786 thanks for the help Date Time Of Last Edit: 2013-11-15 18:46:32
|
[2013-11-15 15:10:05] |
U_winks - Posts: 190 |
+100 for ganz.. :)
|
[2013-11-15 15:41:53] |
ganz - Posts: 1048 |
Ronin You provide a number of sources. I'm not familiar with RMI and I prefer have no indi on my charts. So pls provide the only one source you believe in /that meet your needs/ Also did you check User Contributed Studies? thnx 40winks :) Date Time Of Last Edit: 2013-11-15 15:43:02
|
[2013-11-15 19:59:10] |
Ronin - Posts: 35 |
Hey Ganz, Yes, I've checked the user contributed studies but haven't seen any pls check this link for the AFL code http://www.wisestocktrader.com/indicators/443-relative-momentum-index http://www.niftylivecharts.com/blog/relative-momentum-index/ |
[2013-11-16 15:22:20] |
ganz - Posts: 1048 |
Hey Ronin, I've looked at the links and didn't see any code Let's look into it: /* Relative Momentum Index */ /* AFL code by Prakash Shenoi */ Length=Param("Length?",2,3,20,1);//default =14 or 20 mom=Param("Momentum?",2,3,11,1);//default = 4 or 5 xRMI = RMI(Length,mom); Plot(xRMI, " Relative Momentum Index ("+WriteVal(Length,1.0)+")", 34+4,1 + styleThick); Plot(70,"",colorDarkGrey,styleDashed|styleNoLabel);//OS Plot(30,"",colorDarkGrey,styleDashed|styleNoLabel);//OB Buy = Cross( xRMI, 30 ); Sell = Cross( 70, xRMI ); PlotShapes( shapeUpArrow * Buy + shapeDownArrow * Sell, IIf( Buy, colorGreen, colorRed ) ); GraphXSpace=5; /*Buy and Sell Conditions*/ Buy = Ref(xRMI,-1)<40 AND xRMI > Ref(xRMI,-1); Sell = Ref(xRMI,-1)>70 AND xRMI < Ref(xRMI,-1); Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy); /*End Buy and Sell Conditions*/ rmi part is: Length=Param("Length?",2,3,20,1);//default =14 or 20
mom=Param("Momentum?",2,3,11,1);//default = 4 or 5 xRMI = RMI(Length,mom); Plot(xRMI, " Relative Momentum Index ("+WriteVal(Length,1.0)+")", 34+4,1 + styleThick); Plot(70,"",colorDarkGrey,styleDashed|styleNoLabel);//OS Plot(30,"",colorDarkGrey,styleDashed|styleNoLabel);//OB rmi is Length=Param("Length?",2,3,20,1);//default =14 or 20
mom=Param("Momentum?",2,3,11,1);//default = 4 or 5 >>> xRMI = RMI(Length,mom); <<< so we have no code for RMI from amibroker - this is the "black box" but we have the full code from SC: ASC_Source/studies7.cpp/line_5035 i'll do some research about RMI to compare with the info http://www.tradingsolutions.com/functions/RelativeMomentumIndex.html in case you have this info: Altman's Relative Momentum Index (S&C Feb 1993) - pls let me know Date Time Of Last Edit: 2013-11-16 15:23:32
|
[2013-11-16 17:33:19] |
Ronin - Posts: 35 |
thank you Ganz, I've found some more useful explanations: http://www.forex-tribe.com/Learn-Technical-Indicator-relative-momentum-index.php http://help.iitech.dk/ClientStation2/simulation/Content.aspx?Lang=en&DefaultLang=en&Client_Id=1159388&Topic=2484 http://www.niftylivecharts.com/blog/relative-momentum-index/ appreciate ur effort! |
[2013-11-17 19:15:28] |
crazybears - Posts: 314 |
Hi maybe it's useful Date Time Of Last Edit: 2013-11-17 19:15:42
|
![]() |
[2013-12-11 16:54:58] |
ganz - Posts: 1048 |
Ronin this is how SC's RMI works: indi starts in ASC_Source/studies7.cpp/line_5045 >> get starting point: max of RMI Length or RMI MA Length you've chosen sc.DataStartIndex = max(RMILength.GetInt(), RMI_MALength.GetInt());
>> get values to calculate Momentum float previousValue = sc.BaseDataIn[InputData.GetInputDataIndex()][sc.Index - RMILength.GetInt()];
float currentValue = sc.BaseDataIn[InputData.GetInputDataIndex()][sc.Index]; >> build +/- Momentum Arrays if (currentValue > previousValue)
{ UpTempArray[sc.Index] = currentValue - previousValue; DownTempArray[sc.Index] = 0.0f; } else { UpTempArray[sc.Index] = 0; DownTempArray[sc.Index] = previousValue - currentValue; } >> get MA values for +/- Momentum Arrays sc.MovingAverage(UpTempArray, SmoothedUpTempArray, RMI_MAType.GetMovAvgType(), RMI_MALength.GetInt());
sc.MovingAverage(DownTempArray, SmoothedDownTempArray, RMI_MAType.GetMovAvgType(), RMI_MALength.GetInt()); >> calculate RMI as 100 * SmoothedUp / ( SmoothedUp + SmoothedDown ) if (SmoothedUpTempArray[sc.Index] + SmoothedDownTempArray[sc.Index] != 0.0f)
{ RMI[sc.Index] = 100 * SmoothedUpTempArray[sc.Index] / (SmoothedUpTempArray[sc.Index] + SmoothedDownTempArray[sc.Index]); } else { RMI[sc.Index] = RMI[sc.Index - 1]; } I'm not able to dig it down so I've no idea what's wrong w it /cause i dislike to use any MA based indi/ If you need to correct the formula pls let me know Date Time Of Last Edit: 2013-12-11 17:00:09
|
[2013-12-11 17:00:31] |
ganz - Posts: 1048 |
crazybears thnx |
[2013-12-15 16:43:07] |
Ronin - Posts: 35 |
Thank you Ganz, After comparing it again more deeply with 2 other software I realized that the difference was due to the default simple avg , while on the others it was on exp. moving average / wilders moving average thanks again for ur effort! |
[2013-12-15 17:12:37] |
ganz - Posts: 1048 |
Ronin this is not the first case for me looks like SC is too flexible :) gd lck |
To post a message in this thread, you need to log in with your Sierra Chart account: