Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 51)

Open-source Pine scripts that measure how far price moves: Bollinger Bands, Keltner Channels, ATR stops and trailing lines, and squeeze indicators.

Pine scripts2,503
Code shown here1,334open licence
Updated in a year1,667
No repaint flag2,180

Volatility & bands: Indicators, Strategies and Libraries

PineForge Cascade MTF Tuple

by pineforge-4pass
1 stars

PineForge Cascade MTF Tuple is a multi-timeframe trend-following strategy designed for price charts. It uses a single security request to retrieve an Exponential Moving Average and Average True Range from a higher timeframe. The strategy plots an entry thresho

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Cascade MTF Tuple

Bollinger Blast Buy

by hasnocool
106 stars

This strategy plots an asymmetric Bollinger envelope on the price chart. The upper band is a simple moving average plus a larger standard-deviation multiple, and the lower band uses a smaller multiple. It enters long when close crosses above the upper band and

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Blast Buy

Bollinger DCA v1

by hasnocool
106 stars

This strategy calculates Bollinger Bands and RSI to trigger dollar-cost averaging buy orders. It enters long positions whenever the closing price dips below the lower Bollinger Band while the RSI is below 50. Order units are calculated dynamically based on a f

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger DCA v1
1 stars

This strategy identifies severe close-to-close volatility shocks and triggers an immediate exit from any open long position. It enters long when the rate of change of close crosses above a user-defined momentum threshold and the close sits above the trend EMA.

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Flashpoint Immediate Close

PineForge Gatekeeper Risk Cap

by pineforge-4pass
1 stars

This Pine Script v6 strategy gates long trades to a user-defined session window (default 0900-1700 Asia/Taipei) and enforces a maximum daily filled orders limit. It generates entries solely on fast EMA crossover above the slow EMA while inside the session. Pos

Strategy v6 Sessions & timeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Gatekeeper Risk Cap
2 stars

Market Manipulation Index plots a composite oscillator from 0 to 1 in a separate pane. It averages a sine-wave fit error, a two-lag linear prediction residual, and a high-versus-low frequency variance ratio, each limited by price variance. An ATR-scaled window

Indicator v5 Volatility & bands
Updated 8 months ago · None stated GitHub repository of Market Manipulation Index (MMI)

PineForge Harbor Stop Limit

by pineforge-4pass
1 stars

A long-only breakout strategy that uses a stop-limit style entry. It tracks the highest high of the previous 35 bars and the range midpoint, and arms an order when the close is above the midpoint but below an activation level set a fraction of ATR above that h

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Harbor Stop Limit
1 stars

This strategy calculates a linearly weighted moving average centerline explicitly using a while loop, accompanied by a standard deviation upper band. It enters a long position when the close crosses over the upper band. Exits occur when the price crosses back

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Heliograph While Channel

Breakout Trend Trading

by hasnocool
106 stars

This strategy trades breakouts, pullbacks, and reversals in the chosen direction on the price chart. Entries can require new long-term highs or lows and recent moving-average alignment, with optional weekly or monthly Supertrend filters. Exits can follow an op

Strategy v4 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading
106 stars

This Pine v4 strategy draws on the price chart and filters breakouts with a fixed Supertrend, ATR length, volume moving-average markup, and moving-average alignment, plus short and long high-low periods. Trade direction defaults to long and can include shorts.

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading - V1
3 stars

This strategy trades swing high breakouts on lower timeframes in alignment with higher-timeframe moving average trends. It evaluates price highs using a configurable lookback period and applies higher-timeframe moving average filters along with an optional ATR

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Qullamaggie Breakout Fixed

PineForge Loopback Method For

by pineforge-4pass
1 stars

The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Loopback Method For

BT-5M-1H

by hasnocool
106 stars

BT-5M-1H is a mean-reversion strategy designed for 5-minute charts that simulates 1-hour Bollinger Bands to identify overbought and oversold conditions. It takes positions when price crosses standard deviation multiplier levels and exits using configurable log

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BT-5M-1H

The Range Percent Breakout Strategy identifies range contraction and inside bar patterns where the current bar's range is within a specified percentage threshold of the previous bar. When this condition is met while flat, breakout levels are established above

Strategy v5 BreakoutVolatility & bands
Updated 5 months ago · None stated GitHub repository of Range Percent Breakout Strategy
2 stars

The Moving Regression Prediction Bands indicator calculates polynomial regression bands from historical price data using a moving window. It fits a polynomial curve of specified degree to generate upper and lower bands representing expected price ranges with p

Indicator v5 Moving averagesVolatility & bands
Updated 8 months ago · None stated GitHub repository of Moving Regression Prediction Bands

PineForge Plumbline PVT VWMA

by pineforge-4pass
1 stars

The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Plumbline PVT VWMA

BTC 15 min

by hasnocool
106 stars

This strategy combines percentage-based moving average channels, a linear regression curve, and an external timeframe Hull moving average variant to generate trade signals. Buy entries trigger when the linear regression crosses above the smoothed moving averag

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BTC 15 min
1 stars

This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Quarry ALMA Correlation
106 stars

This strategy constructs a synthetic Bitcoin price feed by averaging open, high, low, and close data across seven cryptocurrency exchanges. It derives a composite price value using quadratic averaging and plots a volatility envelope around its simple moving av

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Candle Correlation Strategy
99 stars

Regression Channels calculates a linear regression trend line and standard deviation channel bands over a specified lookback period. It computes standard deviations from the residuals to form symmetrical upper and lower channel bands around the central regress

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Regression Channels (REGCHANNEL)

This strategy plots a moving average with a range band on the price chart and places stop entries when the source crosses the upper or lower band. Long and short orders are cancelled if price returns through the average or reaches the stored stop price. Option

Strategy v4 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Built-in Kelly ratio for position sizing
1 stars

A long-only strategy that enters when a 19-period EMA crosses above a 58-period EMA. Half of the position is closed by a market order once price reaches an ATR multiple above the average entry. The rest is closed when the EMAs cross back down or when the close

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Tranche Partial Market Close

Bulle de bollinger

by hasnocool
106 stars

Bulle de bollinger is a price-chart strategy that plots a 20-period simple moving average and two-standard-deviation Bollinger bands, with a fill between the bands. It enters long when the prior bar's open and close are below the lower band, and short when the

Strategy v4 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bulle de bollinger

PineForge Vector Stop Breakout

by pineforge-4pass
1 stars

A long-only breakout strategy that waits for volatility contraction, defined as ATR falling below a set fraction of its own moving average. While that holds, it arms a buy stop just above the highest high of the prior 28 bars, plus a small ATR buffer, and canc

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Vector Stop Breakout

Bulle de Bollinger

by hasnocool
106 stars

The script plots the SMA middle band along with Bollinger upper and lower bands with two standard deviations, filling the area between them on the price chart. It signals long entries on a close crossing above the lower band after the previous bar was below it

Strategy v4 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bulle de Bollinger
1 stars

This strategy overlays a fast and a slow exponential moving average on the price chart and treats their crossovers as entries. It opens a long position when the fast average crosses above the slow average and, when shorts are allowed, opens a short on the oppo

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Aurora Market Bracket

Session Wicks

by g-moe
3 stars

This strategy executes long and short trades on the price chart by combining multi-timeframe smoothed Heikin-Ashi trends, higher-timeframe Hull Moving Average variations, and an ATR-based trailing stop. Users can adjust timeframes, smoothing lengths, Hull form

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Session Wicks

Pivot and Price Discovery

by regalouisei
2 stars

This indicator overlays a population-sampled linear regression channel with standard deviation bounds onto the price chart to evaluate price distribution and pivot momentum. It calculates statistical moments including mean, variance, skewness, and kurtosis to

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Pivot and Price Discovery
1 stars

This strategy calculates a fast EMA, a slow EMA, and an ATR value to implement a trend-following trading model with cash position sizing. It enters long trades when the fast EMA crosses above the slow EMA. Positions are exited when the fast EMA crosses below t

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Cashflow Cash Costs
1 stars

The PineForge Compass Partial Ladder strategy identifies trend-following opportunities using a fast and slow Exponential Moving Average (EMA) crossover. Upon entering a long position, the strategy manages risk and profit targets using Average True Range (ATR)

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Compass Partial Ladder
1 stars

PineForge — Constellation Bands is a mean-reversion strategy displayed on the price chart. It calculates standard Bollinger Bands alongside price volatility. A long entry triggers when the close price crosses back above the lower band while remaining below the

Strategy v6 Mean reversionVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Constellation Bands

Squeeze Momentum

by g-moe
3 stars

This overlay indicator combines classic Bollinger Band and Keltner Channel squeeze detection with linear regression momentum and pivot-based support and resistance levels. It plots a long-term moving average filter and tracks squeeze compression and release co

Indicator v5 Volatility & bandsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Squeeze Momentum
1 stars

This strategy models market regimes using principal variance concentration between price and volume. It builds a 2x2 correlation matrix from price and volume rate-of-change, then calculates its eigenvalues. It enters long positions when the principal eigenvalu

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Eigen Matrix Covariance

Buy The Dip

by hasnocool
106 stars

Calculates a historical dip level based on the lowest low over a specified lookback period. It enters a long strategy position when the current bar close falls below the previous dip level. Positions are managed with take profit and stop loss exits placed at f

Strategy v4 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dip
1 stars

This strategy plots adaptive upper and lower triggers on the price chart. It builds the channel from the highest high and lowest low over channelLength bars, then adjusts the width by the average logarithmic price movement captured across the lookback period u

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Forge Loop Channel
1 stars

The Pine Script strategy calculates fast and slow EMAs along with RSI and ATR on the price chart. It enters long positions when the configuration string matches trend confirmation, fast EMA crosses above slow EMA, and RSI exceeds a threshold. It exits on fast-

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Glyph String Regex

Supertrend

by g-moe
3 stars

This strategy calculates trend direction using a multi-timeframe Supertrend formula based on ATR and median price, paired with RSI and Bollinger Band indicators. It enters positions when the Supertrend flips direction, plotting uptrend and downtrend bands with

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Supertrend
2 stars

This indicator plots a histogram of historical risk values in a separate pane. It calculates risk with standard deviation, ATR, downside deviation, drawdown, entropy-based risk, or VIX. Drawdown can use the period high or a rolling high. Users set lookback, op

Indicator v5 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Risk Distribution Histogram
1 stars

This strategy plots a trend EMA and a working pullback limit on the price chart. It enters long only when flat, the EMA is rising, and close is above the EMA, placing a limit buy a set fraction of ATR below the EMA. If that trend condition fails while still fl

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Keystone Limit Pullback
1 stars

The Kiln Power Efficiency strategy computes an EMA trend line and a squared displacement efficiency metric from price moves relative to ATR. It plots both on the price chart. The strategy enters long trades on EMA crossover above the trend when efficiency exce

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Kiln Power Efficiency
1 stars

This strategy enters long when the fast EMA crosses above the slow EMA and RSI exceeds the entry threshold. It closes when the fast EMA crosses under the slow EMA, RSI falls below the exit threshold, or the open position reaches the maximum hold bars. A stop s

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Lattice Confirmed Pivot
3 stars

This overlay indicator plots ATR-based horizontal levels around the previous close of a selected higher timeframe. A trading-type input maps day, multiday, swing, position, and long-term modes to daily through yearly periods. It draws trigger bands from a perc

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of ATR Levels + CALL/PUT

PineForge — Ledger History NA

by pineforge-4pass
1 stars

This strategy plots a smoothed historical price anchor on the price chart by averaging historical closing prices. It enters a long position when price crosses under an entry threshold set below the smoothed anchor. The trade closes when price crosses back abov

Strategy v6 Mean reversionMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Ledger History NA

BuyTheDip

by hasnocool
106 stars

BuyTheDip is a strategy script that identifies upward moving average alignments across multiple timeframes using SMA, EMA, HMA, RMA, VWMA or WMA types. It plots Bollinger Bands on the price chart and enters long positions when alignment scores reach 1 and pric

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BuyTheDip

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers