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 strategy, select all of the template text and paste. Press Save and give it a name.
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
Bollinger Squeeze STEPFUN waits for a confirmed breakout in either direction when bands expand, using optional volume confirmation. Long and short signals trigger on breakout after squeeze. Position sizing uses equity percentage. Exits include take profit/stop loss, trailing stop, or fixed RSI mode. Settings control band length, standard deviation, confirmation bars, volume multiplier, trade direction, and exit rules. The strategy draws signals directly on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
BB Length
int
20
bb_length
BB Std Dev
float
2.0
bb_std
Squeeze Threshold
float
0.05
squeeze_threshold
Breakout Confirmation Bars
int
1
breakout_confirmation
Volume Confirmation
bool
true
use_volume_confirm
Volume Multiplier
float
1.5
volume_multiplier
Trade Direction
string
Both
trade_direction
Exit Mode
string
TP/SL
exit_mode
Take Profit %
float
3.0
tp_percent
Stop Loss %
float
1.5
sl_percent
Trailing Offset %
float
1.0
trail_offset_pct
Position Size %
float
100.0
position_size_pct
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.
BB Squeeze Breakout is a volatility breakout strategy that identifies consolidation squeezes using Bollinger Band width percentile ranking. When the band width drops below its 25th percentile and price crosses above or below the bands with optional volume conf
NR7 Range Breakout identifies narrowest range bars over a specified lookback period and trades breakouts beyond their high or low price boundaries. It plots an exponential moving average trend filter alongside visual highlights for range compression and breako
This strategy draws on the price chart and filters directional signals with four optional checks. It compares a fast exponential moving average with a slower one, requires volume above its average when the volume audit is on, and aligns close with a higher-tim
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
This price-chart strategy plots a simple moving average and upper and lower bands built from the standard deviation of close, scaled by separate offset inputs. It enters a fixed quantity long when close crosses above the upper band and a fixed quantity short w
This strategy runs on the price chart and enters long when a fast simple moving average crosses above a slow one, and short on the opposite cross, while closing the other side. Entries also need ATR above a filter, a pullback check, a minimum candle-body chang