Indicator · Pine Script v5 · Own pane

Laguerre RSI

by theonetrade· code credited to KivancOzbilgic

This indicator calculates John Ehlers' Laguerre RSI oscillator to smooth price data and reduce lag.

View on GitHub

GitHub stars34on the repository
Pine versionv5runs as is
Lines of code34
Settings3inputs
LicenceMIT
Last update2 weeks ago8 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

34 lines of Pine Script v5 from assets/indicator/bit-exact/laguerre_rsi_B094baNp.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

laguerre_rsi_B094baNp.pine
//@version=5
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// Developer: John EHLERS
// © KivancOzbilgic
// Author:Kıvanç Özbilgiç
indicator('Laguerre RSI', shorttitle='LaRSI', overlay=false, timeframe = "")
src = input(title='Source', defval=close)
alpha = input.float(title='Alpha', minval=0, maxval=1, step=0.1, defval=0.2)
colorchange = input(title='Change Color ?', defval=false)
gamma = 1 - alpha
L0 = 0.0
L0 := (1 - gamma) * src + gamma * nz(L0[1])
L1 = 0.0
L1 := -gamma * L0 + nz(L0[1]) + gamma * nz(L1[1])

L2 = 0.0
L2 := -gamma * L1 + nz(L1[1]) + gamma * nz(L2[1])

L3 = 0.0
L3 := -gamma * L2 + nz(L2[1]) + gamma * nz(L3[1])

cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)

cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)

temp = cu + cd == 0 ? -1 : cu + cd
LaRSI = temp == -1 ? 0 : cu / temp

Color = colorchange ? LaRSI > LaRSI[1] ? color.green : color.red : color.blue
plot(100 * LaRSI, title='LaRSI', linewidth=2, color=Color, transp=0)
plot(20, linewidth=1, color=color.new(color.maroon, 0))
plot(80, linewidth=1, color=color.new(color.maroon, 0))
alertcondition(ta.crossover(100 * LaRSI, 20), title='LaRSI Crossover Alarm', message='Laguerre RSI crosses OVER 20 - BUY SIGNAL!')
alertcondition(ta.crossunder(100 * LaRSI, 80), title='Price Crossunder Alarm', message='Laguerre RSI crosses UNDER 80 - SELL SIGNAL!')

Overview

Laguerre RSI computes a four-stage Laguerre filter from the selected price source and derives directional price differences to form an oscillator bounded between 0 and 100. The indicator plots the oscillator alongside static threshold levels at 20 and 80 in a separate pane. Users can adjust the alpha damping factor and toggle slope-based color changes. It also includes alerts for crosses above 20 and below 80.

Details

Published by

theonetrade on GitHub

Code credit

KivancOzbilgic, as written in the script's header

Draws

Separate pane below the chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingbacktestingbitcoinccxtcrypto-tradingllm-agentoffline-backtestingopen-source-tradingpine-scriptpine-to-pythonpinescriptpynecorepythonquantquantitative-financestrategy-backtestingtechnical-analysistrading-indicatorstrading-strategiestradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Sourcesourceclosesrc
Alphafloat0.2alpha
Change Color ?boolfalsecolorchange
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

261 stars

This indicator calculates standardized z-scores of price data across four different lookback periods (6, 14, 26, and 100). Standardizing data subtracts the moving average from the price and divides by the standard deviation. It applies a Double Exponential Mov

Indicator v5 Mean reversionVolatility & bands
114 stars

This indicator calculates normalized percentage bounds around price highs and lows to anticipate local trend reversals. It oscillates within a fixed -1 to 1 channel and plots two boundary tracking curves alongside a background Karobein oscillator histogram for

Indicator v4 Mean reversionOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of Mean Reversion Indicator
99 stars

This indicator calculates the statistical autocorrelation coefficient of an input series over a user-defined lookback window at a specified lag. It tracks values using an internal circular buffer, computes sample mean, variance, and autocovariance, and normali

Indicator v6 TrendMean reversion
Updated 8 weeks ago · Apache-2.0 GitHub repository of Autocorrelation Function (ACF)

Pretty Good Oscillator

by mihakralj
47 stars

The Pretty Good Oscillator calculates the distance between the selected price source and its simple moving average, normalized by the Average True Range over a specified period. It renders as an oscillator line in a separate pane alongside a zero line and thre

Indicator v6 Oscillators & momentumMean reversion
Updated 8 months ago · MIT GitHub repository of Pretty Good Oscillator

Calculates a composite carry and decay oscillator fusing impulse-autocorrelation half-life, a Hurst exponent approximation, path efficiency, and range expansion ratios. It evaluates whether an impulse is likely to persist or mean-revert, plotting the oscillato

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · MIT GitHub repository of Market Memory & Decay Oscillator [WavesUnchained]

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers