Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 38)

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

This strategy plots volume-weighted moving average volatility bands and standard deviation levels calculated from multi-timeframe price data directly on the price chart. It defines percentage-based stop-loss and take-profit exit targets for both long and short

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of V1.4 ESU2023 - Futures 1M No Repaint

Raschke Patterns

by TradersPost
228 stars

This overlay indicator marks Linda Raschke short-term bar setups on the price chart. It flags Turtle Soup and Turtle Soup plus one false breakouts of a prior extreme, 80-20 bars, inside bars, failed inside-bar breakouts, outside up and down bars, NR4 and NR7 c

Indicator v6 Candlestick patternsBreakout Repaints
Updated 3 months ago · None stated GitHub repository of Raschke Patterns

Donchian Channels

by TWODS-CAPITAL
37 stars

This indicator plots a Donchian channel on the price chart. It calculates the highest high and the lowest low over a user-set lookback, then draws those values as upper and lower bands with a midline equal to their average. The area between the bands is filled

Indicator v5 Volatility & bandsBreakout
Updated 3 years ago · MIT GitHub repository of Donchian Channels
16 stars

Seykota Alt 44: ADX Pyramid is a trend-following strategy that plots on the price chart. It enters positions on Donchian Channel breakouts when the Average Directional Index (ADX) confirms a strong trend. Position sizing uses Average True Range (ATR) risk, wit

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 44: ADX Pyramid

Datsana V.1

by g-moe
3 stars

This indicator plots RSI divergence lines at resistance and support levels based on 14-period RSI crossing above 70 or below 30 within a search window of 141 bars. It displays dual EMA trend fill between periods 199 and 299, VWAP filter, TKPS tick pattern diam

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Datsana V.1

NY

by wynnforthework
2 stars

This strategy combines a fast Hull Moving Average with Bollinger Bands to generate mean-reversion signals. It opens a long position when the calculated Hull Moving Average crosses above the lower Bollinger Band, and opens a short position when it crosses below

Strategy v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of NY

DEPV2 DEBUG S24

by YuceSezar89
1 stars

This indicator draws in a separate pane and requests data for up to twenty user-chosen symbols, defaulting to Binance crypto perpetual contracts. It combines four signal classes: trend, momentum, volatility, and volume. Signal mode can use one class, require a

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S24

Displacement 4x

by nishpa800
1 stars

Overlay indicator running four independent displacement engines on the price chart. Each engine measures candle range as open to close or high to low, compares it with a standard deviation multiple, and marks the candle when a fair value gap confirms on the ne

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Displacement 4x

SCDTM - Unemployment Edition

by GreyssonEnterprises
1 stars

This overlay indicator tracks a multi-checkpoint setup built from trending exponential moving averages, Bollinger Band percent B, and a stochastic RSI crossover. A three- or five-bar fractal marks an unconfirmed signal, then the script stores breakout prices,

Indicator v4 Oscillators & momentumVolatility & bands Repaints
Updated 3 months ago · MIT GitHub repository of SCDTM - Unemployment Edition

Risk Manager Template

by TradersPost
228 stars

This overlay indicator estimates position size from account equity, a per-trade risk percentage, and a chosen stop distance. Stops can use ATR, a percent of price, fixed points, or a swing high or low. It derives stop and optional take-profit prices from a ris

Indicator v6 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Risk Manager Template
16 stars

This strategy enters long or short when price breaks a Donchian channel and RSI confirms the same direction. It sizes each unit from a risk percent of equity and can add units after a set ATR advance, up to a unit limit. An initial ATR stop and a trailing stop

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 45: Dual Momentum

The Market Tradability Engine calculates multi-factor tradability, balance, compression, and direction scores to evaluate market regime quality. It classifies market conditions into eight distinct states, including Balance, Compression, Ready, Breakout, Trend,

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Market Tradability Engine [WavesUnchained]
4 stars

This indicator computes a momentum value via linear regression on the difference between close price and a mid-value average that blends highest-lowest range and high-close average over the Keltner Channel length. It overlays Bollinger Bands and Keltner Channe

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · MIT GitHub repository of Squeeze Momentum [trugurpala]
1 stars

An overlay indicator that classifies the market into regimes such as trend, chop and squeeze using ADX, range efficiency, relative volume, ATR expansion and VWAP slope. It also measures how far price is from VWAP and an EMA to flag rich, cheap or extreme readi

Indicator v6 Volatility & bandsMean reversion
Updated 8 days ago · GPL-3.0 GitHub repository of Regime Engine + TCO Gatekeeper

DEPV2 DEBUG S25

by YuceSezar89
1 stars

The script is a multi-symbol crypto indicator that computes trading signals across twenty major pairs including BTCUSDT, ETHUSDT and others. It evaluates four core methods for signals: trend based on price levels, momentum using rate of change, volatility via

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S25

Apex Nexus Flip Engine v9

by vedkanani123
1 stars

An overlay indicator that builds a zero-lag trailing line from an ATR multiple and flips between buy and sell labels when price breaks it for a set number of closes. Gates for choppiness, baseline slope, volatility expansion, efficiency and ADX can block weak

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Apex Nexus Flip Engine v9
1 stars

An indicator component that calculates 20-period Bollinger Bands with a 2.0 deviation multiplier and plots the basis, upper and lower bands with a shaded fill. It also converts band contact into a weighted score: a score when the close is below the lower band

Indicator v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 31 Bollinger
947 stars

Mean Absolute Deviation Bands is a volatility indicator that plots bands around a moving average basis line calculated from a user-selected source. It draws upper and lower bands using a multiplier on the mean absolute deviation, with the background between th

Indicator v4 Volatility & bandsMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Mean Absolute Deviation Bands

Flawless Victory Strategy is a mean-reversion overlay that combines Bollinger Bands, RSI, and Money Flow Index (MFI) to identify trade entries and exits. The script provides three preset configuration modes: Version 1 executes signals without target exits, whi

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Flawless Victory Strategy [Alorse]
106 stars

Calculates a momentum squeeze using Bollinger Bands and Keltner Channels alongside a trend-filtering moving average. It generates long and short entries based on squeeze momentum bar conditions and an optional pre-squeeze dot count filter. Exits can trigger on

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Athena Momentum Squeeze - Autoview
16 stars

This strategy implements a Donchian breakout trend-following system with sector-adaptive profit targets and ATR-based volatility sizing. It enters positions on Donchian channel breakouts, pyramiding additional units at ATR increments up to a configurable maxim

Strategy v6 BreakoutTrend
Updated 12 months ago · None stated GitHub repository of Seykota Alt 46: Sector Adaptive

Knn Filter A007

by ruckard
13 stars

Knn Filter A007 is a strategy that applies a K-Nearest Neighbors classification algorithm to evaluate historical feature performance and filter out low-probability trade setups. It executes long and short entries based on learned historical patterns. Risk mana

Strategy v5 AI / machine learningVolatility & bands
Updated 1 year ago · None stated GitHub repository of Knn Filter A007
3 stars

DEBUG Lower TF Supertrend calculates a modified trailing Supertrend line and trend direction based on average true range bands applied around the bar mid-price. The custom function supports multiple moving average types, such as HMA, EMA, SMA, WMA, and VWMA, t

Indicator v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of DEBUG Lower TF Supertrend

Q-Trend Strategy

by wynnforthework
2 stars

Q-Trend Strategy builds a midpoint from the highest and lowest source values over a trend period and shifts it by an ATR band. It enters long when the source crosses or remains above the upper band and short when it crosses or remains below the lower band. Typ

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Q-Trend Strategy

FTB Strategy

by Web3Degenerate
2 stars

The FTB Strategy is a short-only overlay strategy targeting EURUSD during the European session from 0200-0700. It enters short positions when filters confirm RSI overbought, a bullish prior bar close, or a high price level within lookback bars, combined with a

Strategy v5 Mean reversionSessions & time
Updated 2 years ago · None stated GitHub repository of FTB Strategy

DEPV2 DEBUG S26

by YuceSezar89
1 stars

This indicator generates trading signals for multiple cryptocurrency symbols using four methods: trend, momentum, volatility, and volume. It supports three signal modes - single method, simultaneous confirmation requiring a minimum number of agreeing methods,

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S26

Squeeze Trailer

by GreyssonEnterprises
1 stars

A Pine v4 indicator built around a TTM-style squeeze, comparing Bollinger Bands with Keltner Channels to flag low-volatility compression and the breakout that follows. It then derives entry, stop and target levels from an entry source, a stop source with a per

Indicator v4 Volatility & bandsBreakout
Updated 3 months ago · MIT GitHub repository of Squeeze Trailer
106 stars

Calculates up to four customizable Supertrend indicators using Average True Range (ATR) and user-selected price sources. It generates long and short trade signals when designated Supertrend instances switch direction, provided other configured Supertrend trend

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR GOD Strategy by TradeSmart
16 stars

This strategy implements a trend-following Donchian channel breakout system with momentum-based position sizing. It enters an initial scaled position on a channel breakout to minimize false breakout risk, then adds to the position if RSI confirms directional s

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 47: Momentum Sized

Strategy Long Template

by krosenfeld7
5 stars

This long-only strategy template provides boilerplate logic for building custom Pine Script trading systems on the price chart. It features built-in risk management that calculates target exits and stop-loss levels using either percentage-based distances or Av

Strategy v4 Volatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Strategy Long Template

Super Algo Setup [Aura]

by IAMATOMIC001
3 stars

This overlay indicator combines SuperTrend, RSI, MACD, and an EMA to mark labeled tops and bottoms on the price chart. Optional filters hide repeating signals and keep only relevant exits, and a Krypton fear-and-greed filter can limit bottoms and tops to overs

Indicator v5 Oscillators & momentumMoving averages
Updated 12 months ago · None stated GitHub repository of Super Algo Setup [Aura]

VWMA_WF_cross

by avatar-lavventura
2 stars

Calculates a 24-period Volume-Weighted Moving Average (VWMA) and RSI divergence using 60-minute timeframe data, accompanied by percentage-based envelope bands and Williams Fractal logic. The indicator plots the VWMA line alongside customizable upper and lower

Indicator v4 Moving averagesVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of VWMA_WF_cross

Mass Index (MASSI)

by mushroom-men-Trading
2 stars

The Mass Index indicator measures volatility and potential trend reversals by examining the range between high and low prices. It calculates a single exponential moving average (EMA) and a double EMA of the high-low difference, computes their ratio, and sums t

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Mass Index (MASSI)

Q-Trend Strategy

by wynnforthework
2 stars

The Q-Trend Strategy is a trend-following overlay strategy that identifies directional bias using dynamic price channels combined with an ATR volatility buffer. It calculates highest highs and lowest lows over a chosen trend period to establish a baseline midp

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Q-Trend Strategy

DEPV2 DEBUG S27

by YuceSezar89
1 stars

DEPV2 DEBUG S27 is a multi-asset signal evaluation indicator designed to monitor up to twenty cryptocurrency pairs simultaneously. It classifies market behavior into four analytical dimensions: trend, momentum, volatility, and volume. The script supports multi

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S27

ATSYS Keep It Simple

by vedkanani123
1 stars

A price-chart indicator with Portuguese labels that combines Bollinger Bands, a fast 13 and slow 34 exponential average, and coloured clouds. Bands default to an exponential basis and can use simple, smoothed or weighted types. The average cloud changes colour

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of ATSYS Keep It Simple

Squeeze2backtester

by GreyssonEnterprises
1 stars

Squeeze2backtester is an indicator-based backtester that identifies volatility squeezes by comparing Bollinger Bands with Keltner Channels. It simulates trade executions directly on the price chart, tracking entry prices, stop-loss thresholds, breakeven levels

Indicator v4 Volatility & bandsBreakout Repaints
Updated 3 months ago · MIT GitHub repository of Squeeze2backtester
1 stars

An indicator in a separate pane that shows how far each bar's high, low, close and optionally open, size or high-low combinations moved from the previous bar, as columns. Percentile levels over a chosen number of bars mark unusually large moves, and a cumulati

Indicator v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Price Impulse Detector

ATR Mean Reversion

by hasnocool
106 stars

This strategy identifies mean reversion opportunities using ATR bands on the price chart. It enters long positions when price touches the lower band (open minus ATR) with no open position and within the set time filter. Positions exit on the upper band breach,

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Mean Reversion

ATR

by be-thomas
65 stars

This script calculates a 14-period Average True Range (ATR) indicator and displays its current value inside a single-cell table positioned at the top right of the price chart. To ensure accurate historical calculation while optimizing table performance, the AT

Indicator v4 Volatility & bandsScreeners & dashboards
Updated 6 days ago · GPL-3.0 GitHub repository of ATR
16 stars

This strategy trades an asymmetric long and short trend system on the price chart. Longs use shorter Donchian entry and exit lengths, tighter ATR stops, more pyramid units, and a higher risk percent per unit than shorts. Each unit is sized from equity and stop

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 4: Asymmetric L/S

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