Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 43)

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

65 stars

This indicator walks a lookback loop and compares the current true range with each earlier true range. It adds the sign of each difference into a running balance and plots that balance in a separate pane with a zero line. On every bar it also builds a left-ali

Indicator v4 Volatility & bands
Updated 6 days ago · GPL-3.0 GitHub repository of Debugging from inside for loops

Keltner Channels Strategy

by TWODS-CAPITAL
37 stars

This strategy builds Keltner-style bands around an exponential or simple moving average of the chosen source. Band width uses average true range, raw true range, or a smoothed high-low range, scaled by a multiplier. When the source crosses above the upper band

Strategy v5 Volatility & bandsBreakout
Updated 3 years ago · MIT GitHub repository of Keltner Channels Strategy

Rogers-Satchell Volatility (RSV)

by mushroom-men-Trading
2 stars

The Rogers-Satchell Volatility (RSV) indicator measures historical market volatility using open, high, low, and close price values, allowing accurate estimates even in the presence of price drift. It computes the Rogers-Satchell variance per bar, smooths it us

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Rogers-Satchell Volatility (RSV)

PF IES Probe 09 - Integration

by pineforge-4pass
1 stars

PF IES Probe 09 - Integration is a multi-layered quantitative strategy designed to test interaction among market regime, trend bias, momentum, and price pressure. It computes an ADX and ATR volatility regime, a multi-EMA trend bias score, an RSI and MACD momen

Strategy v6 TrendOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES Probe 09 - Integration

DEPV2 Debug SIGD

by YuceSezar89
1 stars

DEPV2 Debug SIGD evaluates multi-symbol and multi-method signal confluence across up to twenty cryptocurrency symbols. It processes four distinct market dimensions—trend, momentum, volatility, and volume—to derive confirmation signals under simultaneous or seq

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug SIGD
65 stars

This indicator walks a user-set lookback and compares the current true range with each earlier true range. It adds the sign of each difference into a running balance, plots that balance in a separate pane, and draws a zero line. For every step it also draws a

Indicator v4 Volatility & bandsSupport & resistance
Updated 6 days ago · GPL-3.0 GitHub repository of Debugging from inside for loops
46 stars

This indicator summarizes higher-timeframe candle range statistics by time of day and shows them in a table in a separate pane. It groups candles into slots for 5-minute, 15-minute, 1-hour, 4-hour, 8-hour, or 12-hour periods over a chosen lookback in days, and

Indicator v5 Screeners & dashboardsSessions & time Repaints
Updated 8 weeks ago · None stated GitHub repository of HTF Candle Stats by Time of Day

This indicator scores each pivot-to-pivot price leg from 0 to 100 and draws the result on the price chart. It combines path efficiency, time efficiency, and counter-pressure, then colors completed leg lines and optional labels. A live score updates on the unfi

Indicator v6 Support & resistanceTrend
Updated 3 days ago · MIT GitHub repository of Relative Leg Efficiency [WavesUnchained]

DEPV2 Debug Sigt

by YuceSezar89
1 stars

This indicator evaluates trading signals across up to twenty cryptocurrency pairs using four core analytical dimensions: trend, momentum, volatility, and volume. It generates signals based on configurable confluence modes, including single-category triggers, s

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug Sigt
330 stars

This strategy implements a trend-following execution model based on the classic Supertrend indicator. When the ATR-derived Supertrend flips to a bullish state, the strategy opens a long position. The initial stop loss is determined by the lowest price over a u

Strategy v4 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend [Alorse]
106 stars

This overlay strategy plots a short Bollinger Band and enters long when the close crosses above the lower band while a 14-period SMA is above a 42-period SMA. It enters short when the close crosses below that lower band while the faster SMA is below the slower

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Best TradingView Strategy

NIG Probability Table

by regalouisei
2 stars

This indicator estimates a normal-inverse Gaussian distribution from recent log returns and approximates the probability of price falling in each return bin. It measures mean, standard deviation, skewness, and kurtosis over a rolling window, then sets the bin

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of NIG Probability Table

[RS]Signal to Noise Bands

by ricardosantos79
261 stars

This overlay indicator plots a simple moving average of close as a center line and two pairs of bands around it. Width equals the standard deviation of close times the base-ten log of the ratio of the powered signal to the powered deviation. A second pair keep

Indicator v5 Volatility & bandsMoving averages
Updated 4 years ago · None stated GitHub repository of [RS]Signal to Noise Bands

This strategy builds upon the Big Snapper system by combining trend-following moving averages, Chaikin Volatility, and volume filtering to generate trade signals directly on the main chart. Long and short entries trigger when Snapper signals align with medium

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Big Snapper Chaiking Volatility + TP RSI
7 stars

Range Oscillator (Zeiierman) plots a range-based oscillator in a separate pane. It qualifies a range box from a minimum number of bars and sizes that box vertically with an ATR width multiplier. A heatmap splits the recent high-low span into horizontal levels

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 months ago · None stated GitHub repository of Range Oscillator (Zeiierman)
2 stars

The Probability Grid indicator calculates statistical probability distribution levels derived from historical pivot high and low points. It analyzes price movements over a configured swing length and maximum reversal count to project probability zones directly

Indicator v6 Support & resistanceVolatility & bands
Updated 8 months ago · None stated GitHub repository of Probability Grid [LuxAlgo]

This strategy combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Williams Vix Fix Strategy [Alorse]
106 stars

This script tracks daily on-chain whale holdings across various cryptocurrencies using IntoTheBlock metric feeds. It applies Bollinger Bands to day-to-day asset changes to identify statistically significant outlier movements based on a user-selected standard d

Strategy v5 VolumeVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Big Whale Purchases and Sales

This overlay indicator scores liquidity-sweep reversals on the price chart. It looks for a swing high or low violation followed by a recovery close, then grades optional conditions such as RSI and structure into a 0–2 quality score with separate long and short

Indicator v6 SMC / ICT / price actionOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Reversal Engine Score v1 [WavesUnchained]

This indicator plots buy and sell labels on the price chart. A buy appears when a short stochastic crosses up from below 20 while a slow MACD histogram is positive and a faster MACD histogram is negative. A sell uses the opposite stochastic and MACD alignment.

Indicator v5 Oscillators & momentumCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with MACD Signals

SuperTrend Toolkit

by mushroom-men-Trading
2 stars

SuperTrend Toolkit plots ATR-based SuperTrend bands and direction on the price chart. It calculates upper and lower bands using a configurable source, length, and factor multiplier. Contrarian signals generate buy and sell labels with alerts when the trend rev

Indicator v6 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of SuperTrend Toolkit

This ex-post diagnostic indicator identifies confirmed pivot highs and lows, classifying subsequent price action into four outcome types: Snapback, Grind, Fake/Pullback, or Chop. It evaluates forward performance across an ATR-based risk window, factoring in Wa

Indicator v6 Support & resistanceOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Reversal Type Classifier [WavesUnchained]

AutoView Trailing Stop

by Web3Degenerate
2 stars

This indicator calculates an Average True Range (ATR) trailing stop level based on market structure swing points and outputs dynamic alert syntax formatted for the AutoView trading automation extension. Users select long or short direction, lookback length, an

Indicator v4 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of AutoView Trailing Stop
1 stars

A strategy that changes its entry type with volatility and uses a 200 EMA as a direction gate, long above and short below. When ATR is below its average it fades moves beyond the prior range. When ATR is expanding it takes range breakouts that close with a str

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Adaptive Regime
47 stars

The Price Channel indicator calculates and plots the dynamic highest high and lowest low over a user-defined lookback period, alongside a central midpoint line. Built using monotonic deques for optimized streaming runtime efficiency, it plots an upper channel

Indicator v6 Support & resistanceVolatility & bands
Updated 8 months ago · MIT GitHub repository of Price Channel (PCHANNEL)

This strategy calculates double-smoothed Heikin Ashi candles and plots them directly on the price chart alongside a smoothed Relative Strength Index. It evaluates market conditions against external volatility data from an inverse symbol, generating long and sh

Strategy v5 Candlestick patternsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
2 stars

Risk-Adjusted Momentum Oscillator plots a normalized momentum oscillator in a separate pane, dynamically scaling momentum by ongoing drawdown risk. It calculates momentum via Rate of Change, Price Momentum, or Log Returns, applying Z-score normalization and ad

Indicator v6 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Risk-Adjusted Momentum Oscillator

Liquidity Trail Matrix

by vedkanani123
1 stars

A trend indicator on the price chart built from several ATR trail bands whose width follows presets for scalping, balanced or deep trend use. The chosen flip band decides the trend, and retest signals are scored with a minimum score, retest window and cooldown

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Liquidity Trail Matrix
261 stars

This indicator calculates standardized z-scores of price data across four different lookback periods (6, 14, 26, and 100). Standardizing data subtracts the moving average from the price and divides by the standard deviation. It applies a Double Exponential Mov

Indicator v5 Mean reversionVolatility & bands

Boilerplate

by hasnocool
106 stars

Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Boilerplate
1 stars

This strategy calculates fast and slow exponential moving averages alongside the Average Directional Index. It plots both moving averages on the price chart and displays an on-screen table tracking trend strength, directional bias, and volatility. A long posit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign ADX Trend

JMA-HMA-based Scalper

by capissimo
114 stars

This price-chart indicator builds a fast-minus-slow Jurik moving average of the selected price and wraps that series in upper and lower bands set by a standard-deviation multiplier and the fast lookback. It reads band direction, whether both bands rise or fall

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of JMA-HMA-based Scalper

A strategy based on Bollinger Bands that enters long positions when price crosses above the lower band and short positions when price crosses below the upper band. Take-profit, stop-loss, and scale-in price levels are dynamically calculated from the position a

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band Strategy with Split, Limit, Stop

Mass Index

by TWODS-CAPITAL
37 stars

The Mass Index is a volatility indicator that measures price range fluctuations. It calculates the ratio of the 9-period exponential moving average of the high-low span to the 9-period exponential moving average of that span, then sums the result over the inpu

Indicator v5 Volatility & bands
Updated 3 years ago · MIT GitHub repository of Mass Index

Signal Quality Engine [WavesUnchained] is a range-fade indicator that identifies exhaustion at range extremes and signals potential reversals. It applies an ADX and EMA slope regime gate to stand down during strong trends. Using distance, structure, and moment

Indicator v6 Mean reversionSupport & resistance
Updated 3 days ago · MIT GitHub repository of Signal Quality Engine [WavesUnchained]

True Range

by mushroom-men-Trading
2 stars

This indicator calculates and plots the standard True Range metric for each bar in a separate chart pane. The True Range measures market volatility by taking the maximum value among three price differences: current high minus current low, absolute difference b

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of True Range

Equity Curve (SuperTrend)

by YuceSezar89
1 stars

This indicator uses the SuperTrend to generate direction changes that calculate segment returns and update a cumulative equity curve. It starts with a balance of 100 and compounds returns for each signal segment until the next direction change, then plots the

Indicator v5 TrendVolatility & bands
Updated 13 days ago · None stated GitHub repository of Equity Curve (SuperTrend)

MTF Trend Signals

by vedkanani123
1 stars

A separate-pane indicator adapted from the AK MACD Bollinger Bands idea. It draws MACD-based Bollinger bands whose fill colour follows RSI against its moving average and the 55 and 45 levels. Buy and sell markers come from multi-timeframe alignment, using an a

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of MTF Trend Signals

This strategy combines Bollinger %B settings with belthold and inner-candle color toggles and sizes orders as a percentage of equity. The user sets band length, source, and deviation, plus buy, sell, overbought, and oversold levels. Exits use either a modified

Strategy v5 Volatility & bandsCandlestick patterns
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands %B - Belthold & Inner Candles

Ulcer Index (UI)

by mushroom-men-Trading
2 stars

This indicator calculates the Ulcer Index as a measure of downside volatility. It tracks the highest source value over the chosen lookback, converts the percentage drawdown from that high into a squared average, and takes the square root. The value plots as a

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Ulcer Index (UI)
1 stars

This indicator splits price into SuperTrend segments and accumulates the percentage of up and down closes inside the active segment. It compares the live net move with the mean and standard deviation of earlier closed segments in the same direction, then plots

Indicator v5 TrendVolatility & bands
Updated 13 days ago · None stated GitHub repository of Segment TotalAmount Z (SuperTrend)
1 stars

The Tn Sovereign BB Breakout v6 strategy identifies volatility squeezes on the price chart by checking when Bollinger Bands lie inside Keltner Channels. It enters long positions on crossover above the upper BB band when a volume audit passes, and shorts on cro

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of Tn Sovereign BB Breakout v6
106 stars

This strategy plots a 20-period Bollinger Band and a 9-period EMA on the price chart. It opens a long when the prior close is below the lower band and the current candle is bullish, and a short when the prior close is above the upper band and the current candl

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands + EMA 9

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