OPEN-SOURCE SCRIPT
Indicators: 6 RSI variations

As we all know, as published by Wilder, RSI makes use of "CLOSE" values. You probably have experimented changing the input to hl2 [avg(high, low)] or hlc3 [avg(high, low, close)]. I have included many other RSI variations in this chart. Refer to the developers section below to learn how you can use this code in your scripts.
1) RSI with Volume
---------------------------------------------
Suggested by Morris, this idea adds volume to the RSI indicator. Because volume offers one means of determining whether money is entering or leaving a market, this would provide additional information with which to make trading decisions.
2) RSI using last Open
---------------------------------------------
This is RSI with yesterday's open, This basically compares two full days of price action and in the process produces a smoother RSI line.
RSI of today's close is used as a signal (blue line).
3) RSI using SMA
---------------------------------------------
Wilder used his own MA for calculating RSI (check my post on Wilders MA here - tradingview.com/v/Jccjg8CR/ -- This closely resembles EMA). One of Morris's suggestion is to try out SMA.
Compared to normal RSI, you will see more squiggles here.
4) RSI using EMA
---------------------------------------------
Same idea as above, but using EMA.
5) RSI with Fibs
---------------------------------------------
How much does RSI retrace? This makes it easy to determine that :)
6) RSI of MACD
---------------------------------------------
As I mentioned earlier, RSI is a pluggable formula. You can substitute "close" with any data series to derive an index out of it.
This shows RSI of MACD. Note that this is range bound.
More info on RSI variations:
drive.google.com/file/d/0Bx48Du_2aPFndy0yUHJFWHJ2aW8/edit?usp=sharing
For Pinescript developers:
---------------------------------------------
You can substitute your favorite indicator in the RSI function. I have made the RSI calculation a separate function in all the indicators above.
Following are the reusable functions (simply copy to your script and call with proper arguments):
* WiMA(src, length)
* calc_rsi(fv, length): This is equivalent to stock rsi() in TV.
* calc_rsi_volume(fv, length)
* calc_rsi_sma(fv, length)
* calc_rsi_ema(fv, length)
* calc_rsi_lastopen(fv, length)
* calc_macd(src, fast, slow)
You can also pick up fibs drawing code and put in on any indicator.
1) RSI with Volume
---------------------------------------------
Suggested by Morris, this idea adds volume to the RSI indicator. Because volume offers one means of determining whether money is entering or leaving a market, this would provide additional information with which to make trading decisions.
2) RSI using last Open
---------------------------------------------
This is RSI with yesterday's open, This basically compares two full days of price action and in the process produces a smoother RSI line.
RSI of today's close is used as a signal (blue line).
3) RSI using SMA
---------------------------------------------
Wilder used his own MA for calculating RSI (check my post on Wilders MA here - tradingview.com/v/Jccjg8CR/ -- This closely resembles EMA). One of Morris's suggestion is to try out SMA.
Compared to normal RSI, you will see more squiggles here.
4) RSI using EMA
---------------------------------------------
Same idea as above, but using EMA.
5) RSI with Fibs
---------------------------------------------
How much does RSI retrace? This makes it easy to determine that :)
6) RSI of MACD
---------------------------------------------
As I mentioned earlier, RSI is a pluggable formula. You can substitute "close" with any data series to derive an index out of it.
This shows RSI of MACD. Note that this is range bound.
More info on RSI variations:
drive.google.com/file/d/0Bx48Du_2aPFndy0yUHJFWHJ2aW8/edit?usp=sharing
For Pinescript developers:
---------------------------------------------
You can substitute your favorite indicator in the RSI function. I have made the RSI calculation a separate function in all the indicators above.
Following are the reusable functions (simply copy to your script and call with proper arguments):
* WiMA(src, length)
* calc_rsi(fv, length): This is equivalent to stock rsi() in TV.
* calc_rsi_volume(fv, length)
* calc_rsi_sma(fv, length)
* calc_rsi_ema(fv, length)
* calc_rsi_lastopen(fv, length)
* calc_macd(src, fast, slow)
You can also pick up fibs drawing code and put in on any indicator.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
List of my indicators at Appstore: blog.tradingview.com/?p=970
相關出版品
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
List of my indicators at Appstore: blog.tradingview.com/?p=970
相關出版品
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。