This is an implementation of John Ehlers’ Smoothed RSI, as described in RSI Smoothing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
// Smoothed Relative Strength Index (SRSI) // RSI Smoothing // John F. Ehlers // http://www.stockspotter.com/Files/rsismoothing.pdf // Parameter Len = 14 Smooth23 = (Close + 2*Close[1] + 2*Close[2] + Close[3])/6 CU23 = 0 CD23 = 0 For count = 0 to Len - 1 do If Smooth23[count] > Smooth23[count + 1] then CU23 = CU23 + Smooth23[count] - Smooth23[count + 1] Endif If Smooth23[count] < Smooth23[count + 1] then CD23 = CD23 + Smooth23[count + 1] - Smooth23[count] Endif Next If CU23 + CD23 <> 0 then SRSI = CU23/(CU23 + CD23) Endif return SRSI*100 as "SRSI" |
The attached screenshot shows J. Welles Wilder’s RSI (black) and John Ehlers’ Smoothed RSI (red) with a period of 14.
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials