OPEN-SOURCE SCRIPT

Sideways Market Trading Strategy - BB Setup 9. 1 Larry Williams

717
What the indicator does:
Plots two BBs simultaneously on the same chart
BB1 (2 standard deviations) — inner bands, with a more visible blue fill
BB2 (3 standard deviations) — outer bands, with a more transparent blue fill
The base (20-period EMA) is visually shared since the parameters are the same

The indicator uses two overlapping Bollinger Bands to identify buy and sell zones in sideways markets (markets without a clear trend). The logic is simple: when the price touches or breaks through the outer bands (3 standard deviations), there is a higher probability of a reversal back toward the center. The inner bands (2 standard deviations) serve as exit targets.

How to use the indicator:
Sell (Short): When the price touches or closes above the upper band of Deviation 3, the market is considered overbought. The exit target is the upper band of Deviation 2 or the 20-period EMA.
Buy (Long): When the price touches or closes below the lower band of Deviation 3, the market is considered oversold. The exit target is the lower band of Deviation 2 or the 20-period EMA.
Sideways market confirmation: the indicator works best when the bands are parallel and moving horizontally—a sign that there is no strong trend. In strong trends, the price may “traverse” the bands without reversing, so use it with a trend filter such as ADX or EMA slope if desired.
Suggested stop: above/below the high/low of the entry candle, outside the Deviation 3 band.

It is best to use it in combination with oscillators

RSI
MACD
Slow Stochastic
ADX

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.