1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
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
For each timeframe it can show the basis line and bands at one, two and three standard deviations, with its own period, offset and colours. The average type can be SMA, EMA, WMA or VWMA. A setting waits for the higher-timeframe candle to close; turning it off allows values that change while the candle is open. Labels mark each timeframe.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Price Source
source
close
src
Moving Average Type
string
SMA
maType
Wait for higher-TF close?
bool
true
waitClose
Label Text Size
string
tiny
textSize
Enable
bool
true
en1
Timeframe
timeframe
60
tf1
Period
int
20
per1
Offset
int
0
off1
Basis Color
color
color.blue
cB1
+/-1σ Color
color
color.new(color.blue, 0)
c11
+/-2σ Color
color
color.new(color.blue, 20)
c21
+/-3σ Color
color
color.new(color.blue, 40)
c31
Show all 40 settings
Setting
Type
Default
Variable
Show Basis
bool
false
sB1
Show ±1σ
bool
false
s11
Show ±2σ
bool
true
s21
Show ±3σ
bool
false
s31
Enable
bool
true
en2
Timeframe
timeframe
240
tf2
Period
int
20
per2
Offset
int
0
off2
Basis Color
color
color.orange
cB2
+/-1σ Color
color
color.new(color.orange, 0)
c12
+/-2σ Color
color
color.new(color.orange, 20)
c22
+/-3σ Color
color
color.new(color.orange, 40)
c32
Show Basis
bool
false
sB2
Show ±1σ
bool
false
s12
Show ±2σ
bool
true
s22
Show ±3σ
bool
false
s32
Enable
bool
true
en3
Timeframe
timeframe
D
tf3
Period
int
20
per3
Offset
int
0
off3
Basis Color
color
color.purple
cB3
+/-1σ Color
color
color.new(color.purple, 0)
c13
+/-2σ Color
color
color.new(color.purple, 20)
c23
+/-3σ Color
color
color.new(color.purple, 40)
c33
Show Basis
bool
false
sB3
Show ±1σ
bool
false
s13
Show ±2σ
bool
true
s23
Show ±3σ
bool
false
s33
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.
This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre
This indicator identifies mean-reversion setups by combining Bollinger Bands with Fair Value Gaps (FVGs). It tracks FVGs that print outside the upper or lower Bollinger Bands and counts them toward an alert threshold. Signals trigger upon gap mitigation (by to
This indicator combines Bollinger Bands, RSI, Stochastic RSI, and volume spike detection to identify mean-reversion conditions during range-bound market regimes. It calculates Bollinger Band width to identify low-volatility states and triggers buy or sell sign
This indicator plots standard Bollinger Bands directly on the price chart using hardcoded settings of a 5-period length and a 4 standard deviation multiplier. It displays the middle basis line in blue, the upper and lower outer bands in green, and fills the ch
This Pine Script indicator overlays institutional liquidity levels on the price chart. It identifies order block levels using pivot highs and lows, then draws mean reversion lines from the 20 and 50 period simple moving averages, a volatility range midpoint pr
Calculates mean reversion signals using statistical deviation metrics such as MAD, Standard Deviation, ATR, Z-Score, IQR, or Mean AD relative to customizable moving averages. It applies optional volume spike thresholds and trend filters to generate bullish and