Strategy · Pine Script v5 · On the chart

BB + LaRSI Strategy

by g-moe· code credited to goodgains

This strategy combines two sets of Bollinger Bands with a Laguerre RSI oscillator plotted on the price chart.

View on GitHub

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code162
Settings20inputs
LicenceNone stated
Last update5 months ago27 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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 strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

BB + LaRSI Strategy generates buy and sell signals when price touches the upper or lower bands or zones. The strategy allows enabling or disabling entries and includes trailing stop loss and take profit options. Parameters control Bollinger Band lengths, standard deviations, Laguerre RSI alpha, and trailing percentages. The main settings adjust band widths and signal thresholds. It draws fills and lines on the chart with mean-reversion signals.

Details

Published by

g-moe on GitHub

Code credit

goodgains, as written in the script's header

Draws

On the price 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.

Settings

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

SettingTypeDefaultVariable
lengthint200length
Sourcesourceclosesrc
StdDevfloat2.0mult
length_2int200length_2
Sourcesourceclosesrc_2
StdDevfloat3.0mult_2
Sourcesourceclosesrc_3
Alphafloat0.2alpha
Enable BuybooltrueenableBuy
Enable SellbooltrueenableSell
Enable Last Line TouchbooltrueenableLastLineTouch
Enable Last Zone TouchbooltrueenableLastZoneTouch
Show all 20 settings
SettingTypeDefaultVariable
Enable Stop Loss TrailingbooltruestopLossTrailingEnabled
Trailing Stop Loss (%)float1slTrailPerc
Enable Take Profit TrailingboolfalsetakeProfitTrailingEnabled
Take Profit Multiplierfloat1.0tpMult
Trailing Take Profit (%)float0.5tpTrailPerc
Take Profit %float2.0tpVal
Stop Loss %float2.0slVal
Bot IDstringbotIDbotID
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

Bollinger Bands

by Studentcodee
1 stars

This strategy plots Bollinger Bands directly on the price chart. It computes the middle band as the simple moving average of the close price over the input length and the upper and lower bands by multiplying the standard deviation by the multiplier and adding

Strategy v6 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands
257 stars

This overlay strategy is built for ES futures on the one-minute chart. It plots a volume-weighted moving average of price opens and standard-deviation bands at Fibonacci ratios, plus a second longer volume-weighted average from a higher-timeframe open. Call an

Strategy v5 Volatility & bandsMoving averages
Updated 7 weeks ago · None stated GitHub repository of ES Futures 1M No Repaint
228 stars

The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or

Strategy v6 Mean reversionMoving averages
Updated 3 months ago · None stated GitHub repository of Mean Reversion Strategy Template
106 stars

This strategy backtests a long Bollinger Band deal on the price chart for 3Commas-style bots. It plots short and long simple moving averages, offset bands, and the average entry price of the open deal. A long starts when price crosses the lower band inside a c

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Bollinger Strategy

Bollinger Bands Strategy

by cklose2000
105 stars

This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy

More Mean reversion 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