Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 24)

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

Supertrend

by mydcc
1 stars

Supertrend is a trend-following overlay indicator that computes dynamic trailing bands based on the Average True Range and price action. It calculates the standard Supertrend line using customizable ATR length and factor multiplier inputs. Green lines plot bel

Indicator v6 TrendVolatility & bands
Updated 2 days ago · Custom licence GitHub repository of Supertrend

Structure & Flow

by majixai
1 stars

A smart money style indicator that detects swing structure and breaks of structure with an ATR buffer, then marks order blocks found within a lookback, extends them forward and hides or removes them when mitigated by a wick or a close. Signals are graded in ti

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of Structure & Flow

I_vol

by GammaExpansion
1 stars

Plots a wide array of built-in Pine Script volatility calculations in a separate pane. It outputs true range variations, average true range across multiple periods, standard deviation, variance, mean absolute deviation, Bollinger Bands and Bollinger Bands Widt

Indicator v6 Volatility & bands
Updated 7 days ago · MIT GitHub repository of I_vol

DEPV2 A8 · Onay Makinesi

by YuceSezar89
1 stars

This indicator implements a multi-metric confirmation engine that validates trading signals across four core dimensions: trend level scores based on an HLC3 SMA, momentum z-scores derived from rate of change, volatility expansion ratios comparing fast and slow

Indicator v6 TrendOscillators & momentum
Updated 13 days ago · None stated GitHub repository of DEPV2 A8 · Onay Makinesi
1 stars

The XAUUSD Scalping Confluence Engine is a separate-pane indicator that calculates a composite trading score based on multiple technical factors. It evaluates a four-period exponential moving average stack, SuperTrend trend direction, Relative Strength Index,

Indicator v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of XAUUSD Scalping Confluence Engine
1 stars

An indicator in a separate pane that measures the shape of recent log returns over a rolling window using skewness and excess kurtosis. It converts them into a Cornish-Fisher value-at-risk estimate compared with the Gaussian version, a comparison of left and r

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of STRO v2 Skew/Tail Risk & CF-VaR

Smooth Trend Radar

by raybird
1 stars

A trend strategy on the price chart built on a double-smoothed Supertrend using WMA and EMA smoothing, with pivot rejection entries when price touches the baseline. Settings scale automatically by timeframe. Stop loss can use the flip candle, baseline or swing

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Smooth Trend Radar
1 stars

This strategy generates buy and sell signals on the SP500 4H chart using EMA crossovers confirmed by MACD, filtered by ADX trend strength, RSI levels, and active London or New York sessions. It plots EMA 9, EMA 21, and EMA 200 on the price chart. Buy signals e

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Señales EMA + MACD v4b [SP500 4H]
1 stars

Computes a z-score of price against a selectable moving average (SMA, EMA, WMA or VWMA) and compares it with thresholds that can adapt to the volatility regime. Inputs set the lookback, volatility lookback, base, minimum and maximum thresholds, and a signal mo

Indicator v5 Mean reversionVolatility & bands
Updated 6 months ago · None stated GitHub repository of Z-Score Dynamic Bands

Supertrend Strategy

by Studentcodee
1 stars

A Pine v6 strategy that follows the built-in Supertrend indicator on the price chart. The ATR length and the multiplier factor are inputs. When the Supertrend direction flips to bullish the strategy enters long, and when it flips to bearish it enters short, so

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Supertrend Strategy

RSI with Boll

by zhuzp98
1 stars

An indicator that plots a centred RSI, shifted so that the midline is zero, in a separate pane with reference lines at plus and minus twenty. It adds a moving average of the RSI and Bollinger-style bands around it, using an adjustable standard deviation multip

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of RSI with Boll

Squeeze Panel

by amico1234
1 stars

Squeeze Panel plots a volatility squeeze in a separate pane. It marks a squeeze when Bollinger Bands sit inside a Keltner Channel and marks when the bands expand outside it. The user chooses Money Flow Index or linear regression to color likely breakout direct

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Squeeze Panel
1 stars

The Detrending Net Distance Ratio indicator computes the difference between current close and close prices at ten different lookback periods ranging from seven to three hundred sixty bars. It sums the positive differences to create a net value and sums their a

Indicator v5 DivergenceMean reversion
Updated 3 years ago · None stated GitHub repository of Detrending Net Distance Ratio

VIX Term Structure

by namuan
318 stars

This indicator plots the implied volatility term structure for US equities in a separate pane. It requests close data for four Cboe volatility indexes: VIX9D (9-day), VIX (30-day), VIX3M (3-month), and VIX6M (6-month) on the current timeframe. For each index,

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of VIX Term Structure
106 stars

A multi-timeframe Dollar Cost Averaging (DCA) trading strategy that combines signals from three RSI indicators, three CCI indicators, and Bollinger Bands. It places up to five weighted scale-in safety orders to lower the average entry price. The script offers

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of 3RSI 3CCI BB 5orders DCA Strategy+
57 stars

This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure MACD 4H + Trailing

Bollinger %B

by mihakralj
47 stars

This indicator calculates Bollinger %B in a separate pane. It tracks a simple moving average and population-style variance of the selected source with a circular buffer and running sums, then places the source between the lower and upper bands scaled by the st

Indicator v6 Volatility & bandsOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Bollinger %B
29 stars

This indicator detects price swing legs using a threshold-reversal algorithm scaled to a multiple of the prior day's average daily range (ADR). When a leg completes, it plots up to six customizable pullback percentage levels directly on the price chart. Users

Indicator v6 Support & resistanceVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen Leg Pullback Levels
20 stars

This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multiple Moving Average Envelope

RSI/BB 1minute Study

by SammyEnigma
18 stars

This strategy combines the Relative Strength Index with Bollinger Bands to generate mean-reversion entries. It plots the RSI oscillator and threshold lines in a separate pane, while calculating hidden Bollinger Bands and band width. Long entries trigger when R

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of RSI/BB 1minute Study
16 stars

This price-chart strategy trades Donchian channel breakouts in the style of a Seykota trend system. It enters long or short when price touches the entry channel, using the bar high or low when intrabar mode is on, and can add units after further moves of a set

Strategy v6 TrendBreakout Repaints
Updated 12 months ago · None stated GitHub repository of Seykota Alt 19: Intrabar Execution

Candle Pressure & Response (JMA) evaluates price action dynamics by calculating bidirectional candle pressure, upper and lower wick rejection fractions, body efficiency, and range expansion metrics relative to ATR. Each output series is smoothed using a Jurik

Indicator v6 Candlestick patternsVolatility & bands
Updated 3 days ago · MIT GitHub repository of Candle Pressure & Response (JMA)

QPulse

by JasonTeixeira
9 stars

QPulse is a multi-factor indicator that draws in a separate pane to evaluate market momentum, volume flow, and volatility dynamics. It calculates volume delta, a cumulative delta proxy, advanced adaptive ATR, and a hybrid volume-weighted RSI with overbought an

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 weeks ago · Custom licence GitHub repository of QPulse

Variance Ratio Test

by Anderson-ALGO
9 stars

This indicator calculates the Variance Ratio Test statistic to evaluate random walk behavior across multiple sampling periods. It computes log returns, base period variance over a specified lookback window, and scaled multi-period variances to determine test Z

Indicator v4 Volatility & bandsMean reversion
Updated 5 years ago · None stated GitHub repository of Variance Ratio Test
8 stars

ATX-Long-Term Strategy is an overlay strategy built around a selectable moving average, ATR, and ADX. Settings offer eight average types, including Tilson T3, an optional second average, Heikin-Ashi prices, and a custom timeframe. Separate ATR multipliers appl

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of ATX-Long-Term Strategy

Supertrend + ADX

by muammeryldrm42
7 stars

This strategy combines Supertrend direction with an ADX strength filter. It enters long when Supertrend flips to an uptrend and ADX is above the threshold, and enters short on a downtrend flip under the same filter, only while the position is flat. The Supertr

Strategy v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Supertrend + ADX

SuperTrend

by trsdn
6 stars

This indicator plots the classic SuperTrend line on the price chart. It builds upper and lower bands from an ATR of the chosen source, then trails the band that stays active for the current direction. Direction turns up when price closes above the lower band a

Indicator v5 TrendVolatility & bands
Updated 7 days ago · MIT GitHub repository of SuperTrend
6 stars

Capital41 Fusion Oscillator v3 measures multi-condition market confluence in a separate pane with a smoothed composite score ranging from 0 to 100. It evaluates four criteria: EMA trend direction, RSI oversold or overbought turns, Williams %R thresholds, and A

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · MIT GitHub repository of Capital41 Fusion Oscillator v3
5 stars

The Quick Scan for Signal indicator calculates a custom market efficiency ratio by comparing net price displacement against total price movement over a specified lookback period or cumulatively from the chart start. It calculates statistical boundaries based o

Indicator v6 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Quick Scan for Signal

This short-only trading strategy combines a 200-period Exponential Moving Average, a Stochastic RSI oscillator, and three distinct Supertrend indicators on the price chart. It evaluates price trend relative to the 200 EMA alongside Stochastic RSI crossunder co

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Stochastic + Triple Supertrend Short Strategy

AG TrendPullback Short

by eltonaguiar
4 stars

The AG TrendPullback Short strategy identifies short pullback opportunities in downtrending markets. It calculates EMA50 and EMA200 crossovers, RSI2 overbought signals above 90, and ADX trend strength above 20. When these align, it enters a short position size

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of AG TrendPullback Short
4 stars

This strategy trades crude oil futures only during the New York session from 09:00 to 14:30. It enters long when a fast EMA crosses above a slow EMA and short on the opposite cross, and only while that session is open. Each entry sets an ATR-based stop loss an

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Crude Oil CL Strategy [trugurpala]

This indicator plots an average daily range from hourly high-low ranges stored for each hour across a selectable number of days. It highlights time sessions on the price chart and can show a timeline and the current range box. Optional filters use a volatility

Indicator v5 Volatility & bandsSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Average Daily Range with Time Session Highlighter
2 stars

This trend-following strategy plots on the price chart and identifies continuation trades during established trends. It calculates dual exponential moving averages alongside an average directional index filter. Entries trigger when price pulls back into the mo

Strategy v6 TrendMoving averages
Updated 4 weeks ago · Custom licence GitHub repository of MP EMA 9/21 Pullback Continuation
2 stars

Squeeze Momentum Pro plots a TTM-style volatility squeeze in a separate pane. It compares Bollinger Bands with three Keltner Channel widths to mark wide, normal, and tight compression, and it flags the bar when a normal squeeze releases. A linear-regression mo

Indicator v6 Volatility & bandsOscillators & momentum
Updated 2 months ago · Custom licence GitHub repository of Squeeze Momentum Pro [Vantrade]

The Market Tail Risk Detector evaluates market fragility and compression to identify environments preceding volatile price moves. It calculates a composite tail risk score ranging from 0 to 100 based on realized volatility percentiles, volatility of volatility

Indicator v6 Volatility & bandsBreakout Repaints
Updated 3 months ago · Apache-2.0 GitHub repository of Market Tail Risk Detector (Quiet → Explosive)
2 stars

This Pine Script indicator calculates Z-Score based bands for grid trading using a user-selectable moving average. It computes the MA from chosen type, length and source then derives upper and lower bands offset by stddevs. Grid ranges are set by min and max w

Indicator v6 Support & resistanceMean reversion Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Z-Score [psyll]

Average True Range (ATR)

by mushroom-men-Trading
2 stars

The Average True Range indicator calculates volatility by averaging the true range over a user-defined length. It plots the ATR value as a line in a separate pane below the price chart. The length input sets the period for the calculation, defaulting to 14 bar

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

Modified Momentum QQE-ZigZag

by wynnforthework
2 stars

This indicator blends a modified multi-timeframe RSI and Quantitative Qualitative Estimation (QQE) logic with an ATR-based Supertrend overlay on the price chart. Users can select between Wilders and Cutlers RSI calculations, adjust the multi-timeframe length m

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Modified Momentum QQE-ZigZag
1 stars

An indicator that detects cup and handle patterns from pivots, with inputs for rim similarity, handle retracement range, an invalidation retrace level and a target set as a multiple of cup depth. A Bayesian probability update using a Bollinger squeeze as evide

Indicator v6 Support & resistanceBreakout
Updated 2 days ago · None stated GitHub repository of XRP Breakout Matrix Bayesian GC

Courier UDT Return Method

by pineforge-4pass
1 stars

A long-only strategy that builds a volatility envelope from an EMA centre and an ATR width using a custom type and a method. It enters long when the close crosses above the centre plus a multiple of the width. It exits when the close falls below the centre, or

Strategy v6 Volatility & bandsBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of Courier UDT Return Method

This indicator scans and ranks a custom watchlist of up to nine symbols alongside a benchmark reference symbol by daily ATR percentage. It computes the Average True Range as a percentage of the close using daily timeframe security calls without lookahead bias.

Indicator v6 Screeners & dashboardsVolatility & bands
Updated 2 weeks ago · MPL-2.0 GitHub repository of Taught to Trade — Volatility Scanner (ATR%)

TQE Trade Quality Engine

by AssetWhisper
1 stars

An overlay indicator that combines several statistical modules into a single trade planning panel. For a long or short direction, chosen automatically or manually, it proposes an ATR-based stop widened for tail risk, a target R multiple optimised for expectanc

Indicator v5 Volatility & bandsSupport & resistance
Updated 7 weeks ago · MPL-2.0 GitHub repository of TQE Trade Quality Engine

VWAP Volatility Bands

by Focal-QuantAI
1 stars

An indicator on the price chart that smooths a VWAP with a T3 moving average cascade and surrounds it with ATR-scaled volatility bands. The VWAP can reset each session, week or month. Optional bounce signals mark reactions from the outer bands in the direction

Indicator v6 Volatility & bandsVolume
Updated 6 months ago · None stated GitHub repository of VWAP Volatility Bands

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