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
On a fifteen-minute chart it runs a volatility squeeze breakout using an ATR percentile and a regime filter. On a four-hour chart it runs a VWAP mean reversion with standard deviation bands. Each part has its own settings for stops, early stop moves, trailing and filters, and a label shows which system is active, or warns when the chart timeframe is unsupported.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
V19 Squeeze Lookback (bars)
int
102
v19_lookback
V19 Squeeze Percentile
int
35
v19_sq_pctile
V19 ATR Mult (1R)
float
5.0
v19_atr_mult
V19 Early Stop Move
bool
true
v19_early_be
V19 BE Trigger (fraction of 1R)
float
0.75
v19_be_trig
V19 BE Destination (R units)
float
-0.5
v19_be_dest
Enable Regime Filter
bool
true
v19_use_regime
Allow: Uptrend + High Vol
bool
true
v19_allow_ut_high
Allow: Uptrend + Normal Vol
bool
true
v19_allow_ut_norm
Allow: Uptrend + Low Vol
bool
false
v19_allow_ut_low
Allow: Downtrend + High Vol
bool
true
v19_allow_dt_high
Allow: Downtrend + Normal Vol
bool
true
v19_allow_dt_norm
Show all 38 settings
Setting
Type
Default
Variable
Allow: Downtrend + Low Vol
bool
false
v19_allow_dt_low
Allow: Ranging + High Vol
bool
true
v19_allow_rg_high
Allow: Ranging + Normal Vol
bool
true
v19_allow_rg_norm
Allow: Ranging + Low Vol
bool
false
v19_allow_rg_low
V21 VWAP Period (0=auto)
int
0
v21_vwap_inp
V21 SD Entry (0=auto)
float
0.0
v21_sd_inp
V21 ATR Stop Mult (0=auto)
float
0.0
v21_atr_inp
V21 ATR Vol Max % (0=auto)
float
0.0
v21_vol_max_inp
V21 Min VWAP Dist (0=auto)
float
0.0
v21_min_vwap_inp
V21 ATR Vol Min %
float
0.5
v21_vol_min
V21 Enable Regime Filter
bool
true
v21_use_regime
V21 Allow Longs in Downtrend
bool
false
v21_allow_lt_long
V21 Allow Shorts in Uptrend
bool
false
v21_allow_ut_short
V21 Early BE Trigger (R frac)
float
0.75
v21_early_be_trig
V21 Early BE Dest (R frac back)
float
0.5
v21_early_be_dest
ATR Period
int
14
atr_period
V19 ATR Trail Mult (runner)
float
5.0
atr_trail_mult
V21 ATR Trail Mult (runner)
float
5.0
v21_trail_mult
Enable Longs
bool
true
enable_longs
Enable Shorts
bool
true
enable_shorts
Account Equity ($)
float
10000.0
account_equity
Risk % per trade
float
3.0
risk_pct
Show Entry/Exit Labels
bool
true
show_labels
Show V21 VWAP Bands
bool
true
show_bands
Show V19 Squeeze Range
bool
true
show_squeeze
Show R-Level Lines
bool
true
show_targets
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.
Mirrors the signal and filter logic of a separate Python trading engine for visual research on the price chart. A selector chooses ATR breakout, moving average crossover, RSI mean reversion or no trade. Filters include confidence thresholds, a minimum reward-t
This indicator calculates custom Bollinger Bands using one of four selectable moving averages, defaulting to VIDYA. It plots the upper band, lower band, and basis line directly on the price chart, with a filled background between the outer bands. Buy and sell
An indicator that classifies the market as trending, ranging or breakout using ADX and ATR ratios, then blends three signal families into one confidence score from 0 to 100. The families are EMA trend following, Bollinger and RSI mean reversion, and Donchian w
This indicator plots the Relative Strength Index (RSI) and its Bollinger Band percentage bandwidth (%B) deviation directly on the price chart. It calculates RSI from a user-defined source and length, applies an EMA, and derives the %B deviation using a configu
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 overlay indicator marks Linda Raschke short-term bar setups on the price chart. It flags Turtle Soup and Turtle Soup plus one false breakouts of a prior extreme, 80-20 bars, inside bars, failed inside-bar breakouts, outside up and down bars, NR4 and NR7 c