|
|
Questions and Answers
Started by anatolik at 01-04-2007 1:31 PM. Topic has 6 replies.
 
 
|
|
Sort Posts:
|
|
|
|
01-04-2007, 1:31 PM
|
anatolik
Joined on 12-15-2006
Posts 1
|
iRSI implementation issue
|
|
|
|
|
Hi,
It looks like there is a bug in iRSI class Relative Strength Index (RSI) calculation. In the source code I see the following expression for smoothed RS calculation:
RS = (((prevGain*(Periods-1))+AvgGain)/Periods) / ((((prevLoss*(Periods-1))+AvgLoss)/Periods));
Usually smoothed RS is calculated using the following formula:
Smoothed RS = ((previousAvgGain*(Periods-1)+CurrentGain)/Periods) / ((previousAvgLoss*(Periods-1)+CurrentLoss)/Periods)
So there must be Current Gain/Loss instead of AvgGain/AvgLoss in the source code (Indicators.cs, line 830).
Regards,
Anatoli
|
|
|
|
|
Report
|
|
|
|
01-14-2007, 9:12 PM
|
asimon
Joined on 03-07-2006
Posts 140
|
Re: iRSI implementation issue
|
|
|
|
|
|
Yes, I see the discrepancy in the formula in Indicators.cs, line 830 and the formula at http://stockcharts.com/education/IndicatorAnalysis/indic_RSI.html
To fix this error, the class will have to be reworked with the circular queue class instead of a simple array to keep the current gain synchronized with the previous average gain value.
Thanks for bringing this issue to light.
|
|
|
|
|
Report
|
|
|
|
06-20-2007, 2:33 PM
|
JoeMama
Joined on 06-07-2007
Posts 5
|
Re: iRSI implementation issue
|
|
|
|
|
Any Luck on Updating this Issue. I would like to use this indicator, but I have no idea how to fix this problem.
|
|
|
|
|
Report
|
|
|
|
07-07-2007, 9:21 AM
|
asimon
Joined on 03-07-2006
Posts 140
|
Re: iRSI implementation issue
|
|
|
|
|
I expect the solution to this problem to be submitted by a forum user. The user who submits such a contribution gets access to the source code forum.
|
|
|
|
|
Report
|
|
|
|
03-09-2009, 11:45 AM
|
bennean
Joined on 10-08-2008
Posts 2
|
Re: iRSI implementation issue
|
|
|
|
|
Is this source code still being maintained? It's now March 2009 and the RSI bug is still there, and I'm surprised it hasn't been fixed by now. I guess I'll have a look at it myself...
|
|
|
|
|
Report
|
|
|
|
03-09-2009, 4:28 PM
|
davidjjon
Joined on 03-10-2009
Posts 1
|
Re: iRSI implementation issue
|
|
|
|
|
Hi bennean,
It does not look like this code is being maintained; however, I am working with source.
I am interested in what development you are doing JK @ SoftwareByDavid.com
David Roh
|
|
|
|
|
Report
|
|
|
|
03-10-2009, 3:08 AM
|
bennean
Joined on 10-08-2008
Posts 2
|
Re: iRSI implementation issue
|
|
|
|
|
I'm looking at Technical Analysis in the context of betting exchanges. 4XLab seemed to offer a whole bunch of indicators, but I've found a bug in EMA and now RSI. Like they say, there's no such thing as a free lunch!
|
|
|
|
|
Report
|
|
|
|
|
4XLab.NET : For... » 4XLab.NET » Questions and A... » Re: iRSI implementation issue
|
|
|
|