I am having trouble getting a smoothed RSI. The below picture is from freestockcharts.com. The calculation uses this code. http://stackoverflow.com/questions/...th-index-using-some-programming-language-js-c This seems to be the pure RSI with no smoothing. How does a smoothed RSI get calculated? I have tried changing it to fit the definitions of the these two sites however the output was not correct. http://www.tc2000.com/tc2000help/Content/Indicators/RSI_and_Wilder_s_RSI.htm http://www.priceactionlab.com/Blog/2014/12/wilders-cutlers-and-harris-relative-strength-index/ Can someone actually do the calculation with some sample data?
RSI value depends on starting point and if you do not have enough data the calculations will not match.
I don't think your calculation of RSI is correct. For one thing, it basically uses a variable-period (up to the total # of data points) MA, while RSI is supposed to use a fixed-period MA. Also, your calculation is equivalent to using an SMA, while the classic RSI uses EMA (and Wilder's RSI uses Wilder's EMA). Here are Medved Trader's RSI and Wilder's RSI (the bottom one uses Wilder's EMA) for the same period of the same stock as your chart: Mike Medved http://www.medvedtrader.com
YOu want to cacilate smoothed RSI, Just apply MA to RSI. RSI= 100-100/(1+sumGain/sumLoss); RSIma(i) = RSIma(i-1) + 2/(n+1)(RSI- RSIma(i-1)) //n is smoothing bar period if you want to use Wilders smoothing (Wilders RSI) them EMA folrmula will be slightly different: RSIma(i) = RSIma(i-1) + 1/n * (RSI- RSIma(i-1)) //n is smoothing bar period Smoothed RSI is less choppy and provudes better result wen compared to raditional RSI: http://www.marketvolume.com/stockstradingsystems/?d=55&aid=Smoothed-RSI-Simple-Trading-System
The Harris RSI is also interesting. Has anyone looked into that? This guy knows his stuff. His Price Action Lab software is considered an edge by pros in MultiCharts forum.
Thanks for pointing the Cutlers and Harris variations for RSI. I added them to Medved Trader. Will be out in next beta. Mike Medved www.medvedtrader.com
That pretty much sums up the answer. Wilder used his own version of a moving average calculation that is slower than both SMA and EMA, which might have been okay for slower moving markets at the time he published the RSI in 1978. But Wilder's original smoothing method has too much lag for today's faster markets, so current implementations of the RSI often use a standard EMA. Don't get hung up on the way a smoothed RSI was originally published. It was a different time with different markets. Just apply your moving average of choice to the RSI based on your modelling and testing. I think you'll find an EMA works best, but that judgement is ultimately yours to make.
Looking forward to making some comparisons between standard, Cutlers and Harris variations of RSI. About the Price Action Lab software I know a hedge fund that runs about a dozen computer with it every day. The are pretty secretive about it but i figured out they are looking for micro patterns in many time frames. Then they use a neural network to select the best. Quite advance operation they have.
It might be of interest to know that Wilder's RSI when analyzed statistically over decades and dozens of markets has been shown to have close to zero capacity to predict future market behaviour. However the RIS does generate some really cute wavy lines on the computer screen. On the other hand Wavelets generate equally cute lines and do have predictive capacity....go figure. http://vlab.ee.nus.edu.sg/~bmchen/papers/PhysicaA2015.pdf