Strategy · Pine Script v5 · On the chart

Momentum Breakout

by knectardev

This strategy enters long when the close is above the upper Bollinger Band and volume exceeds a moving average multiplied by a threshold, and enters short when the close is below the lower band with the same volume condition.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code68
Settings4inputs
LicenceNone stated
Last update9 months ago14 Jan 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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

New entries occur only while the position is flat. Exits set a limit and a stop a fixed percentage from the current close, and those prices are recalculated each bar. Users can change band length, standard deviation, volume average length, and the volume multiplier. The three bands plot on the price chart, and a background tint marks high-volume bars.

Details

Published by

knectardev on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Volatility & bands, Volume, Breakout

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
BB LengthintDEFAULT_BB_LENGTHbbLengthInput
BB StdDevfloatDEFAULT_BB_MULTbbMultInput
Volume MAintDEFAULT_VOLUME_MAvolumeMaInput
Volume MultiplierfloatDEFAULT_VOLUME_MULTvolumeMultInput
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.

Similar Pine Scripts

BB and KC Strategy

by hasnocool
106 stars

This strategy identifies breakout momentum by combining Bollinger Bands and Keltner Channels with volume confirmation. It opens long positions when the upper Keltner Channel crosses above the upper Bollinger Band and volume exceeds its moving average. Converse

Strategy v5 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BB and KC Strategy

VOL/BBW/RSI/15 Strategy

by SammyEnigma
18 stars

This strategy overlays Bollinger Bands on the price chart and trades a long squeeze setup. It enters long when band width is below 0.022 and volume is at least the seven-bar average, using a stop order at the lower band. It places a short order when close cros

Strategy v4 Volatility & bandsVolume
Updated 6 years ago · None stated GitHub repository of VOL/BBW/RSI/15 Strategy

BB Squeeze Breakout

by muammeryldrm42
7 stars

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

Strategy v5 Volatility & bandsBreakout
Updated 3 months ago · MIT GitHub repository of BB Squeeze Breakout

Bollinger Squeeze STEPFUN

by eltonaguiar
4 stars

This strategy detects Bollinger Band squeezes by measuring band width against a threshold. It waits for a confirmed breakout in either direction when bands expand, using optional volume confirmation. Long and short signals trigger on breakout after squeeze. Po

Strategy v5 Volatility & bandsBreakout
Updated today · None stated GitHub repository of Bollinger Squeeze STEPFUN

This strategy enters long when the close breaks above the prior lookback high and volume exceeds its simple moving average, but only if a VIX regime score is at least three. The score counts whether the VIX to three-month VIX ratio and the VIX level sit below

Strategy v5 BreakoutVolatility & bands Repaints
Updated 10 months ago · MIT GitHub repository of Auto Breakout Strategy mit VIX Heatmap Gate

Momentum Breakout Strategy

by adminalphabots
2 stars

This strategy plots on the price chart and enters when price closes beyond the prior lookback high or low and also beyond a shorter confirmation range. Long, short, or both directions can be enabled. Optional filters require volume above a volume average or a

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · MIT GitHub repository of Momentum Breakout Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers