An indicator that detects a volatility squeeze when ATR falls to a low percentile of its recent range, tracks the high and low of the squeeze, and signals a long or short when price closes beyond that range as the squeeze ends.
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
V19 Volatility Squeeze Breakout plots EMA lines with a ribbon, VWAP with bands, and the squeeze range. ATR sets stops, with staged targets, an early stop move and a trail. It signals only on charts from fifteen minutes to one hour.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Enable Long Entries
bool
true
enable_longs
Enable Short Entries
bool
true
enable_shorts
ATR Percentile Lookback (bars)
int
102
lookback
Squeeze Percentile Threshold
int
35
squeeze_pctile
ATR Multiplier — Long (1R / Trail)
float
5.0
atr_mult_long
ATR Multiplier — Short (1R / Trail)
float
5.0
atr_mult_short
ATR Period
int
14
atr_period
Enable Early Stop Move
bool
true
use_early_be
Trigger (fraction of 1R)
float
0.75
early_be_trig
Stop destination (R units)
float
-0.5
early_be_dest
Show EMA Lines
bool
true
show_emas
EMA Source
source
close
ema_src
Show all 39 settings
Setting
Type
Default
Variable
Fast EMA Length
int
21
ema_fast_len
Mid EMA Length
int
50
ema_mid_len
Slow EMA Length
int
200
ema_slow_len
Show EMA Ribbon Fill
bool
true
show_ema_ribbon
Show EMA Cross Labels
bool
true
show_ema_crosses
Show VWAP
bool
true
show_vwap
Show VWAP ± 1σ / 2σ
bool
true
show_vwap_bands
Show Squeeze Range
bool
true
show_squeeze
Show Trailing Stop Line
bool
true
show_trail_stop
Show Trade Plan Labels
bool
true
show_trade_labels
Show Exit Labels
bool
true
show_exit_labels
Show Squeeze Duration Label
bool
true
show_sq_duration
Show Entry Arrows
bool
true
show_entry_arrows
Show Exit Markers
bool
true
show_exit_markers
Show Blocked Entry Dots
bool
true
show_blocked_dots
Alert: Squeeze Start / End
bool
false
alert_squeeze_events
Alert: Blocked Entries
bool
false
alert_blocked
Enable Regime Filter
bool
true
use_regime_filter
Allow: Uptrend + High Vol
bool
true
allow_uptrend_high
Allow: Uptrend + Normal Vol
bool
true
allow_uptrend_normal
Allow: Uptrend + Low Vol
bool
false
allow_uptrend_low
Allow: Downtrend + High Vol
bool
true
allow_downtrend_high
Allow: Downtrend + Normal Vol
bool
true
allow_downtrend_normal
Allow: Downtrend + Low Vol
bool
false
allow_downtrend_low
Allow: Ranging + High Vol
bool
true
allow_ranging_high
Allow: Ranging + Normal Vol
bool
true
allow_ranging_normal
Allow: Ranging + Low Vol
bool
false
allow_ranging_low
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 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
Acceleration Bands is an overlay indicator that plots a volatility envelope around a central simple moving average. It calculates upper and lower boundary bands scaled by the high-to-low bar range relative to the midpoint price, smoothed by an SMA over a user-
This indicator calculates and plots Donchian Channels directly on the price chart. It determines the highest high and lowest low over a user-selected lookback period using an optimized monotonic deque algorithm, as well as a middle basis line computed as their
The Donchian Channels indicator plots the middle basis line as the average of the high and low over the user-defined period. It also draws the upper band as the highest high and the lower band as the lowest low across the same period on the price chart. The ma
This indicator plots Donchian channel bands and a midline on the price chart. It finds the highest and lowest values over a user-set length, then draws the upper band, lower band, and their average as the basis. The source setting chooses high and low, or the
This indicator plots a Donchian channel on the price chart. It calculates the highest high and the lowest low over a user-set lookback, then draws those values as upper and lower bands with a midline equal to their average. The area between the bands is filled