+ True RSI

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!
版本注释: 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. :)
版本注释: 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.
版本注释: 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.
版本注释: forgot to change the alerts messages in previous update two minutes ago.
版本注释: just decided to add rsi/moving average plot shapes, same as my accumulation/distribution indicator
版本注释: 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!
版本注释: updated moving average color -- minor change

本着真正的TradingView精神,该脚本的作者将其开源发布,因此交易者可以理解和验证它。为作者加油! 您可以免费使用它,但是在发布中重复使用此代码受网站规则的约束。您可以收藏它以在图表上使用。



@ClassicScott :
Thanks for the update.
We chatted in end of june. I have been using it since then. I have modified the coding for changing the color. I used to check if yours if have made any update or not. You did.
Just wanted to understand what you have done new. You have added secondary RSI, May i know what is the purpose of it ? that too its closing is 55 ? May i know the reason for 55?
I've verified with the older version and compared both the version, in the newer version, it is avoiding the false crossing, which i find great in order to avoid false signals.
One request : Is it possible to add ADX in this ?
@BOURSE40, ADX would make it super cluttered I think, and it's not something I use in my trading. I might take a look at adding it. Was thinking on a couple of updates, as I currently have three more indicators in the works, that, once I have sufficient time, I should be able to release as they are nearly complete.

The longer RSI is like a longer moving average on a price chart. The idea is that you use it like a baseline for your bias, whether the market is more likely bullish or bearish, then you can use the shorter length RSI to take trades off of (buying dips, selling rallies, etc.). I think 55 is a good lookback period, and it's a number in the fibonacci sequence. That's all. Set it to 50 if you want. Or 25. Whatever works for your purposes.
Appreciate the updates. Use it all the time! Saves me from checking and having multiple indicators cluttering my screens.
ClassicScott Phatinfantry
@Phatinfantry, Sweet man. I'm so glad you like it. I actually just updated it further. Some very nice improvements imo.
Wow wow wow, excellent, very clean indicator.
ClassicScott bulentiris
@bulentiris, Hey, thanks a lot! I actually just added some updates earlier today. Haven't officially updated it through Tradingview yet, but I like the makeover.
I have not tested this on real time trading but i have back tested, it looks awesome.
Thank you very much for keeping it open so that others can add more values if required.
@BOURSE40, I hope that it serves you well. I'll be releasing an updated version in the next couple of days. Cleaned the code up a bit more, plus added a few more things.
BOURSE40 ClassicScott
First of all, thanks for your efforts, it is highly appreciated.
No doubt, i'm using it. It helps me.
One issue what i'm facing it is, In the real time trading, Soon after the blue candle, there is an another violet candle, I had to cut short my position, then it reverses.
@BOURSE40, sometimes, or a lot of the time, this can happen. You can't trade every single cross. Probably should find an indicator to filter false signals, don't trade against the prevailing momentum (if price is going up don't take shorts just because the RSI crossed down), try using different MAs and different lengths (obviously longer lengths are going to give fewer false signals), or understand price action better.