ClassicScott

+ True RSI

ClassicScott Updated   
This is a better, cleaner version (in my opinion) of an part of an indicator I was using that was coded up by cI8DH. I reached out to him about cleaning up the code (things weren't working) for Pinescript v4, but he no longer seems to be active, so I thought I might take it upon myself to at least work out this portion of the indicator.

Much credit goes to him. Below is the indicator that he coded, of which only one part have I made additions to.


So, he calls this the True RSI. I was using it as part of the USI, which I posted above (it's the MA Percent indicator type). To my eyes it's not far different from the standard RSI, so I probably could have just made a version of that, but I like this one, and I was excited to add a few things (like candle coloring, which no longer works with his version!).

So, what's different?
I added two different background fills.
I made the lines types for the extremities and midline more appropriate for the indicator.
I added bullish, bearish, overbought, and oversold candle coloring.
I added a multitude of moving averages as well.

If this looks like my '+ %B' indicator, that is because I basically just moved the MA's and candle coloring code over. One could probably do this with many different indicators.

In the future I will probably add alerts, and maybe MA cross candles as well. Or not. Well, almost certainly alerts. Please enjoy!
Release Notes:
Hello. It's me, Scott, with an update to this.
Additions simply include:
1) two more levels--median high and median low-- between overbought/oversold levels and the median level, if you find that useful.
2) alerts for overbought and oversold conditions, median crosses, and MA crosses.
3) multi-timeframe because why not.

Also, please note that I have an identical indicator called +TRSI (updating that next, because I may as well) that I really do mean is identical. Tradingview confuses me. I thought that for some reason my script wasn't accepted because it didn't past muster or something, but in reality a weird thing happens where if you favorite the script you are working on, then publish it, the script you saved IS NOT the published one, and you actually have to search for it. So I was like, "oh, they didn't accept it for some reason?" because it wasn't showing my name (therefore not able to be found by anyone) in my favorites section. So, before bothering to search (because why would I think that!?) I made another one and published that. So now there are two of the same indicator under slightly different names. And that's my story. It's stupid, but what can ya do? I also can't delete it, and they probably won't, because they say that goes against there policy, so I probably will have two of the same indicator up here for all eternity. :)
Release Notes:
In this updated version I've cleaned up the candle coloring code, as well as made some changes to the default colors. I've also made the MA color changing based on its bull/bear bias, and I've done this with the RSI too.
Also, a minor update to the candles: I added a "neutral" color to them based on the RSI's relation to the median and the moving average. Basically if the RSI is below the moving average but above the median line, or above the moving average and below the median line, it is considered neutral. I like it as a way of highlighting indecision, consolidation, or potential reversal points.
Oh, and lastly, you can turn off candle coloring on the inputs screen, so you don't have to individually unclick each box under "style."

Hope you like these updates.
Release Notes:
added a second RSI plot. It's experimental I suppose. Thought it might be useful to plot two of different lengths, different sources. Play around with it and see what you find. By default it is off.
added ALMA to the moving averages list.
changed the overbought and oversold alerts to any rsi cross, instead of a specific crossing up or down.
Release Notes:
forgot to change the alerts messages in previous update two minutes ago.
Release Notes:
just decided to add rsi/moving average plot shapes, same as my accumulation/distribution indicator
Release Notes:
some very important updates here!

This is mainly as a result of a question I received from a user about the use of the secondary DPO in my + DPO indicator (check it out, btw, it's a highly underrated oscillator, imo). And, while understanding the use myself, I realized that my implementation of DPO+DPO crosses was WRONG for the intended use of the second DPO. This realization has carried over into this script (and my Accumulation/Distribution Percentage script, and my implementation of indications around how the second RSI should be used in conjunction with the first, and with all other parts of the indicator. If you want to read why I changed what I did I would suggest checking the update on my +DPO indicator because I don't feel like typing it out again; the reasoning is the same.

With the change in how I've approached the momentum issue between the two different RSI's and the median, I've actually changed certain default settings of this indicator, while also adding background coloring as an indication for what I would call momentum shifts (or possible momentum shifts). The secondary RSI is on by default and set to a length of 55. You can use this as a filter if you like, in the same way one might use a baseline moving average on a price chart for taking directional trades (that being trading with the dominant momentum).

Added bollinger bands, because I utilize it in most of my other indicators, so why not? If you don't want it just turn it off. :)

Eliminated the background shading.

Cleaned up a bunch of the code. Made the inputs side of things prettier.

That's all! Thanks! And happy trading!
Release Notes:
updated moving average color -- minor change
Release Notes:
wow, did not realize I had changed the candle color to reflect differently than the RSI plot. Apologies. Obviously was toying with some different coding ideas and forgot that I had changed that?
Release Notes:
Updated a bunch of indicators recently.
Here, I've updated the color scheme to match most of what I'm doing at the moment, utilizing color.from_gradient in pinescript to create color themes in a gradation, as well as my typical multi-color stuff. These color schemes are reflected in the candles with barcolor, in addition to the indicator itself. And that's mostly it. It's time consuming making these changes, but I feel it's worth it, and I have a tendency to like things to mesh aesthetically.

Added Donchian Channel Bands with adjustable band thickness.

Added FRAMA as a moving average. That's about it.
Release Notes:
I just changed 'power' to a float from an integer so that you can fine tune the moving average more. It was something that someone pointed out to me in a comment of another indicator I released.
Release Notes:
add auto-plotting divergences

Release Notes:
added alerts for divergences, removed bull/bear moving average crosses keeping instead just the all-purpose moving average cross
Release Notes:
- updated to pinescript version 5
- added a couple more moving averages
- changed some wording
- added color inputs for background colors and moving average crosses
Release Notes:
I'm publishing updates to all of my indicators, so I'm just going to comment on everything here since most of the updates are common across most of my indicators.

User Non-Visible Updates (basically backend stuff that makes:
- changes in code legibility and consistency across all indicators (basically standardizing the coding across as many indicators as possible)
- implementation of libraries into my indicators; which helps significantly in doing what I typed above; which in turn will make creating any new indicators, if they are of the type to use these libraries, much simpler
- updated descriptions for all indicators, which should (it's possible I've forgotten things) reflect changes I've made recently and any I may have made in the past after first publication (this is very minor, but as I was changing so much I thought I may as well--I don't intend to update these much, if at all, in the future)

User Visible Updates:
- as I mentioned everything now uses my moving averages library and volatility bands library--this cuts down the total amount of code significantly, and has made it easier for me to add moving averages, or volatility bands to these indicators because I only had to/have to add it one time (to the library) rather than multiple times across all indicators*
- since creating these libraries I've added several new moving averages (Kaufman Adaptive, Laguerre Filter, McGinley Dynamic (doesn't work for all), and Zero-lag) to them while retaining all the previous with the exception of the UMA, which wasn't implemented consistently across all indicators anyway
- eliminated having two Bollinger Bands with different standard deviations and a fill between them in exchange for one with the band fill implementation that I use on my Donchian Channels Bands
- part of my code consistency across all indicators resulted in a much needed organization of the 'style' tab

*(affects all but the Wavetrend Oscillator, Wavetrend Oscillator Overlay, Jurik KDJ, Average Candle Bodies Range, Bollinger Bands Width, ALMA Trend Detector, Ultimate Moving Average, Donchian Channels, and Dynamic Donchian Channels)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?