Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 16)

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

DEPV2 A2 TREND

by YuceSezar89
1 stars

The indicator computes the normalized deviation of close price from HLC3 SMA using ATR for trend measurement. It plots deviation Z-score, trend state (1 bullish, -1 bearish, 0 neutral via state machine), and strength level (0-2) in a separate pane. Settings ad

Indicator v6 TrendMoving averages
Updated 13 days ago · None stated GitHub repository of DEPV2 A2 TREND
1 stars

This indicator calculates the total transaction cost hurdle comprising commission, slippage, and spread as a percentage, price value, and fraction of ATR. It samples historical price moves across four user-defined holding periods over a configurable lookback w

Indicator v6 Screeners & dashboardsVolatility & bands
Updated 2 weeks ago · MPL-2.0 GitHub repository of Taught to Trade - Cost Hurdle
1 stars

Plots long and short signals on the price chart from a smoothed Hull moving average of price change, firing when momentum crosses its value two bars earlier. Each signal projects five target levels spaced by an average candle range, and a simulated position us

Indicator v6 Oscillators & momentumTrend Repaints
Updated 2 weeks ago · None stated GitHub repository of Momentum Shift Positions

A multi-asset strategy that scores market sentiment from money flow, stochastic RSI and the price position within a lookback, then compares the score with long and short thresholds that can adapt to volatility. Optional filters add confirmation from three high

Strategy v5 Oscillators & momentumVolatility & bands
Updated 5 weeks ago · None stated GitHub repository of Universal Futures Strategy - Multi-Asset Optimized

Kernal Cipher 3

by kdricha0602
1 stars

Kernal Cipher 3 is a momentum trading strategy that plots signal diamonds on the price chart for breakout, reversal and continuation setups. It calculates EMAs of varying lengths to detect trend regime and slope, ADX for strength confirmation, WaveTrend oscill

Strategy v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Kernal Cipher 3

MTF Confluence Engine

by mrme000m
1 stars

MTF Confluence Engine is a separate-pane indicator that evaluates trend, momentum, and volatility metrics across the current chart timeframe and two configurable higher timeframes. It combines EMA alignment, SuperTrend direction, RSI values, Bollinger and Kelt

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

An overlay that signals long and short setups when a Money Flow Index crosses adaptive levels found by k-means clustering and an Andean oscillator crosses its smoothed signal within a short confirmation window. A 200-period EMA trend filter and an ATR percenta

Indicator v5 Oscillators & momentumAI / machine learning
Updated 7 weeks ago · None stated GitHub repository of AI MFI + Andean Floating
1 stars

An indicator in a separate pane that scores market compression from 0 to 100 by combining percentile ranks of ATR, Bollinger Band width and Donchian width with narrow-range bar patterns and quiet volume, each with an adjustable weight. It then checks whether a

Indicator v5 Volatility & bandsBreakout
Updated 7 weeks ago · MPL-2.0 GitHub repository of CEP v2 Compression/Expansion Score

Stock Stats

by peterdmv
1 stars

Stock Stats displays a customizable single-row chip dashboard directly on the price chart. It presents key fundamental and technical metrics including market capitalization with size categorization, shares float, ADR%, ATR, low-of-day distance, 52-week high, V

Indicator v6 Screeners & dashboardsVolatility & bands
Updated 2 months ago · MPL-2.0 GitHub repository of Stock Stats
1 stars

A price-chart trend indicator that works like a SuperTrend whose band distance adjusts itself. It measures how far past pullbacks have gone against recent trends, remembers a window of readings separately for up and down trends, and sets the band room from a c

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Self-Adaptive Trend Signals

GEKO Scalp

by grzegorzkowalskigk-jpg
1 stars

This indicator is a mean-reversion scalper for index futures on one to five minute charts. It plots session VWAP with one and two standard deviation bands and previous day high and low, and arms setups only when an Efficiency Ratio shows choppy rather than tre

Indicator v6 Mean reversionScalping
Updated 3 months ago · Custom licence GitHub repository of GEKO Scalp
1 stars

The Gamma Exposure Levels indicator plots horizontal levels on the price chart based on user-pasted GEX data. It displays All-Expiry HVL, Call Resistance, Put Support, 0DTE HVL, Call, Put, Zero Gamma, Max Pain, Expected Move, and Flip Zones. Users can enable o

Indicator v6 Support & resistanceVolatility & bands
Updated 4 months ago · None stated GitHub repository of Gamma Exposure Levels [BackQuant]
1 stars

This strategy identifies Volatility Contraction Patterns in US stocks using breakout confirmation with volume surge filters. It enters on pattern completion when required conditions such as full TPR or VCP squeeze are met and exits via partial profit targets a

Strategy v6 Volatility & bandsVolume
Updated 4 months ago · None stated GitHub repository of Minervini VCP + SmartMCDX US
1 stars

Session Range vs ATR Filter compares developing intraday price ranges against the daily Average True Range (ATR) during US regular trading hours. It evaluates session range expansion at fixed time checkpoints (10:00 AM, 12:00 PM, and 2:00 PM ET) against percen

Indicator v5 Sessions & timeVolatility & bands Repaints
Updated 5 months ago · None stated GitHub repository of Session Range vs ATR Filter

Bollinger Band Squeeze Detector

by shubhamtaywade82
1 stars

Detects a volatility squeeze when the Bollinger Bands sit inside the Keltner Channel, and shows it in a separate pane as a column state. A momentum histogram measures close against the Donchian midline, optionally normalised by ATR and clamped. A small table r

Indicator v6 Volatility & bandsOscillators & momentum Archived
Updated 5 months ago · None stated GitHub repository of Bollinger Band Squeeze Detector

Crypto AMT Toolkit v2

by latifangren
1 stars

This indicator provides a comprehensive crypto trading toolkit on TradingView. It plots Volume Profile boxes using customizable lookback bars, row count, and value area percentage. VWAP lines with standard deviation bands are drawn alongside optional bands. Or

Indicator v6 VolumeVolatility & bands
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v2

BVortex Strategy v1

by Alberto082544
1 stars

BVortex Strategy v1 calculates a scaled Vortex Indicator difference to detect overbought and oversold conditions relative to predefined upper and lower thresholds. It filters entries using market trend direction established by confirmed swing pivot highs and l

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of BVortex Strategy v1

EQH / EQL Detector

by cavaldos
1 stars

Detects equal highs and equal lows on the price chart, a common liquidity concept in smart money analysis. Pivots are confirmed over a set number of bars, and a threshold scaled by a 200-bar ATR decides how close two levels must be. Historical mode keeps every

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of EQH / EQL Detector

ATR Trend

by dtheran1
1 stars

Draws an ATR-based trend line on the price chart, inspired by Supertrend. The distance from the source, which can use highest high and lowest low, is set by a time period and an ATR weight. Ten smoothing types are available for the ATR. Options add a fast tren

Indicator v6 TrendVolatility & bands
Updated 6 months ago · None stated GitHub repository of ATR Trend

Computes historical volatility from log returns and shows either its percentile or its rank over a long window, selected by a mode input. Separate lookbacks control the volatility calculation, the percentile or rank window and a smoothing average. Colours chan

Indicator v5 Volatility & bands
Updated 6 months ago · None stated GitHub repository of Historical Volatility Percentile and Rank
1 stars

An indicator that detects a volatility squeeze when ATR falls to a low percentile of its recent range, tracks the high and low of the squeeze, and signals a long or short when price closes beyond that range as the squeeze ends. It plots EMA lines with a ribbon

Indicator v6 BreakoutVolatility & bands
Updated 7 months ago · None stated GitHub repository of V19 Volatility Squeeze Breakout

This strategy calculates intraday volatility mean reversion using session VWAP standard deviation bands, RSI overbought and oversold levels, and candle wick exhaustion ratios. It enters trades when price reaches statistical extremes filtered by RSI and wick co

Strategy v6 Mean reversionVolatility & bands
Updated 7 months ago · MIT GitHub repository of Intraday Volatility Reversion Z-Score

A long and short strategy built on a custom momentum index that combines price velocity, log volume and a standardised Bollinger Band width. A trade needs a recent squeeze in band width, the index breaking beyond its own two-deviation band, and price on the co

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · MIT GitHub repository of Thermodynamic Volume-Price Resonance (TVPR)

ARC TrendStepper

by Tradehook-org
1 stars

ARC TrendStepper calculates and plots a stepped trend line directly on the price chart to filter out minor market noise. It updates the stepped value only when price changes exceed a configurable threshold calculated via Ticks, ATR, or percentage move. The ind

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of ARC TrendStepper

Supertrend 17/3.2

by trustdan
1 stars

A long-only strategy generated from the TrendLab research project, drawn on the price chart. It uses the built-in Supertrend with an ATR period of 17 and a multiplier of 3.2. It buys when the Supertrend turns to an uptrend and closes the position when it turns

Strategy v6 TrendVolatility & bands
Updated 9 months ago · MIT GitHub repository of Supertrend 17/3.2
1 stars

The Squeeze Momentum BB Enhanced indicator computes a momentum oscillator from close prices using linear regression or SMA. It identifies squeezes between Bollinger Bands and Keltner Channels to flag potential breakouts. Plots include colored momentum lines, f

Indicator v5 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of Squeeze Momentum BB Enhanced
1 stars

Ranges with Targets is an indicator that draws horizontal support and resistance lines on the price chart using ATR-based calculations. It detects buy and sell signals from crossovers of close price with the upper and lower range levels. A target multiplier se

Indicator v5 TrendSupport & resistance
Updated 9 months ago · None stated GitHub repository of Ranges with Targets [ChartPrime]

A chart-overlay SuperTrend variant whose ATR multiplier shrinks for a limited number of bars after a divergence is found. Divergences are detected with pivots between price and a hidden oscillator, and shown as small markers. If a divergence in the trend direc

Indicator v6 TrendDivergence
Updated 9 months ago · None stated GitHub repository of SuperTrend Weighted by Divergence

Ogi's Levels

by ognenmitev
1 stars

A multi-part overlay that draws support and resistance boxes from pivot highs and lows, sized as a multiple of ATR, with stop loss and two take profit lines based on an ATR stop distance and risk-to-reward ratios. It adds a trend label from a 50 and 200 bar si

Indicator v6 Support & resistanceTrend
Updated 11 months ago · Custom licence GitHub repository of Ogi's Levels

Keltner Channel

by Studentcodee
1 stars

The Keltner Channel strategy plots upper and lower bands on the price chart overlay using an exponential moving average or simple moving average combined with ATR or range calculations. The source crosses the bands to generate signals. It enters long positions

Strategy v6 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Keltner Channel

SOLBTC MTPI

by Mikelkulla
1 stars

SOLBTC MTPI is a Pine Script strategy designed to gauge whether Solana is outperforming Bitcoin to determine market allocation. It calculates a composite trend signal using liquidity-weighted moving averages with Supertrend logic, DEMA filters, and normalized

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of SOLBTC MTPI
1 stars

A long and short strategy using a long simple moving average with bands set a chosen number of standard deviations above and below it, 350 bars by default. It goes long when price closes above the upper band and exits when price falls back under the average; i

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · None stated GitHub repository of Bollinger Breakout Strategy
1 stars

This long-only strategy plots Bollinger Bands, 20 bars and 2.5 deviations by default, along with a 10 and a 50 period EMA and a background that shades the EMA trend. When flat, it buys after the close crosses back above the lower band, and it closes the positi

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Bolinger Bands Strategy

QS Vix

by nvFede
1 stars

A Pine v4 indicator in a separate pane that builds a volatility gauge from the S&P 500 index. It measures the distance of the current low from the highest high over a short window and a window ten times longer, as percentages, adds them and smooths the sum wit

Indicator v4 Volatility & bands
Updated 3 years ago · None stated GitHub repository of QS Vix

Asymmetric Band

by JohnsonHsiao
1 stars

This indicator calculates volatility-based envelopes directly on the price chart. It plots a central exponential moving average of closing prices alongside asymmetric outer bands. The upper band is derived from an EMA of price highs plus a standard deviation o

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Asymmetric Band

Monitor Armónico

by micayael
1 stars

A separate-pane indicator that combines a squeeze momentum histogram with an ADX-style line. The histogram is a linear regression of price against a channel midline and is coloured by direction and strength, while cross markers on the zero line show whether Bo

Indicator v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Monitor Armónico

This indicator ranks the current Bollinger Band width against its own recent history to give a percentile from zero to one hundred, drawn in a separate pane with a moving average of that value and extreme high and low levels at 98 and 2 by default. It also cal

Indicator v5 Volatility & bandsBreakout
Updated 4 years ago · None stated GitHub repository of Bollinger Band Width Percentile and BB Breakout
318 stars

This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos

Indicator v5 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Trailing Stoploss

Candlestick Patterns

by harryguiacorn
220 stars

This indicator plots optional candlestick pattern signals on the price chart. It detects engulfing bars, inside bars, HOLP and LOHP, kicker patterns, body-mass extremes, higher highs and lower lows, ATR warnings, and four-bar fractals. Optional pivot marks use

Indicator v5 Candlestick patternsVolatility & bands
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns
147 stars

This indicator generates trade entry signals and target levels optimized for 1-hour timeframes, designed for external signal extraction. It calculates 7-period and 16-period EMAs alongside 10-period RSI and ATR filters. Long signals occur when the fast EMA cro

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Signal Strategy 100 Candles of 1H Timeframe

Moon Dev Lunar Sniper

by moondevonyt
92 stars

Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Lunar Sniper

Force Bar

by milocaetano
48 stars

Force Bar highlights candlesticks directly on the price chart using three distinct body and range criteria: widest range (Biggest), extreme body relative to historical average (Exhaustion), and moderate body relative to historical average (Force). Colors apply

Indicator v5 Candlestick patternsVolatility & bands
Updated 3 days ago · MIT GitHub repository of Force Bar

This strategy overlays the price chart to execute long and short trades on BTCUSDT. It requests multi-timeframe data across daily, 3-minute, 5-minute, 8-minute, and 10-minute periods to generate signals alongside VWMA volatility bands and smoothed moving avera

Strategy v5 Volatility & bandsMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of BTCUSDT 10M - No Repaint v1.1 2023
29 stars

Zen Bar Range Projections draws two independent higher-timeframe projections on the price chart. For each enabled timeframe it measures the average bar range over a chosen lookback, then places horizontal lines at 0.5, 1 and 2 times that range above and below

Indicator v6 Support & resistanceVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen Bar Range Projections

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