Laguerre RSI - non repainting

It seems that the traditional Laguerre* functions repaint due to the gamma parameter.
That goes even for the editorial pick here.
But one could use calculation period instead of "gamma" parameter. This gives us a non-repainting Laguerre RSI fit for scalping trends.
At first glance, I haven't seen anyone do this with a pine script, but I could be wrong because it's not a big deal.
So here is a variation of Laguerre RSI, without repainting. It's a little bit more insensitive, but this is not of great importance, since only the extreme values are used for confirmation.
( * Laguerre RSI is based on John EHLERS' Laguerre Filter to avoid the noise of RSI.)

And if you implement this indicator into a strategy (like I do) I can give you a trick.

Traditionaly the condition is at follows:

LaRSI = cd == 0 ? 100 : cu / (cu + cd)
(this is the final part of the indicator before the plotting)

LongLaguerre= LaRSI<dnb
ShortLaguerre= LaRSI>upb

It's fine for the short (ot exit long), but for the long is better to make a swich between the CD and CU parameters, as follows:

LaRSI1 = cd == 0 ? 100 : cu / (cu + cd)
LaRSI2 = cu == 0 ? 100 : cu / (cu + cd)

LongLaguerre= LaRSI2<dnb
ShortLaguerre= LaRSI1>upb
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.


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?