Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 15)

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

Zen ABR Range Bands

by Zen-Tim
29 stars

Calculates an Exponential Moving Average baseline surrounded by Average Bar Range bands based on an 8-period bar range calculation. Plots upper and lower channels at 1x, 2x, 3x, and 4x ABR multiples directly on the main price chart. Includes configurable bar h

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands

This overlay indicator estimates price with a Nadaraya-Watson rational quadratic kernel and draws an envelope around that estimate. It regresses close, high, and low, then builds a kernel ATR from those estimates. Near and far upper and lower bounds, plus thei

Indicator v5 Volatility & bands
Updated 11 months ago · Custom licence GitHub repository of Nadaraya-Watson: Envelope (Non-Repainting)

BB Swing

by benso87
24 stars

This strategy calculates Bollinger Bands, a configurable moving average slope, Stochastic RSI, ATR, and ADX directly on the price chart. It evaluates trend bias and momentum conditions to generate long and short swing entries using percent-of-equity sizing. Th

Strategy v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BB Swing

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy fades Bollinger Band extremes on the close. It opens a short when price crosses above the upper band and the 14-period RSI is above 75, and a long when price crosses below the lower band and RSI is above 25. Shorts close when RSI falls below 30 a

Strategy v4 Volatility & bandsOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy
16 stars

This strategy trades Donchian breakouts on the price chart. It enters long or short on a longer channel break and can add further units as price advances by a fraction of ATR, up to a set maximum. Later units risk a smaller share of equity than the first. It e

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 11: Tapered Pyramid
16 stars

2XTMA Centered Bands Indicator plots two centered triangular moving averages with ATR-scaled upper and lower bands on the price chart. It colors each average bull or bear and can show an angle caution label. Optional alerts fire on band crosses, a return towar

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of 2XTMA Centered Bands Indicator
14 stars

This overlay indicator builds a money-management table on the price chart. It takes a deposit, a maximum risk percentage per trade, and a commission percentage, then sizes risk against up to ten user-defined stop-loss percentages and an optional ATR stop. The

Indicator v5 ScalpingVolatility & bands
Updated 3 years ago · None stated GitHub repository of Scalping money management
10 stars

My Macro Cycle Indicator plots daily and weekly simple and exponential moving averages on the price chart, plus Pi Cycle and Mayer Multiple levels derived from the 200-day average. Optional toggles add support-band fills, a Keltner channel, CME futures gaps, a

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · None stated GitHub repository of My Macro Cycle Indicator

This indicator projects daily Average True Range (ATR) support and resistance levels onto the main price chart based on the daily open price. It calculates upper and lower ATR levels along with outer ATR band lines using a configurable multiplier. Dynamic hori

Indicator v4 Volatility & bandsSupport & resistance Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of Chad's Average True Range ATR (@tradeprophet)
9 stars

Adaptive Supertrend is an overlay indicator that dynamically adjusts its Supertrend band width using a composite conviction score. Conviction is derived from ATR percentile ranking, trend force from EMA distance, and chop detection, narrowing the bands during

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Adaptive Supertrend

ACE Squeeze

by JasonTeixeira
9 stars

ACE Squeeze plots a cycle-based squeeze oscillator in a separate pane. It builds a histogram and an optional cycle phase line from a base cycle length, sensitivity, and price source, then can adjust the reading with volatility, volume delta, relative range exp

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

This indicator plots a SuperTrend line on the price chart from average true range volatility and a trailing stop. The user selects a long or short trade type, an initial stop-loss percent, and a trailing percent that lifts the stop as price moves. It also uses

Indicator v4 TrendVolatility & bands
Updated 7 years ago · MIT GitHub repository of SuperTrend ATR with Trailing Stop Loss
8 stars

This strategy calculates dual Average True Range (ATR) trailing stops using two distinct multiplier levels alongside an optional Hull Moving Average (HMA) channel. It identifies market structure shifts and triggers positions when price crosses the primary ATR

Strategy v5 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of ATR 2STP Strategy
7 stars

This indicator overlays Bollinger Bands on the price chart and fills the area between upper and lower bands using a color based on Cumulative Volume Delta trend. It plots an EMA 9 line and fills between the EMA 9 and Bollinger basis in green or red depending o

Indicator v6 Volatility & bandsVolume
Updated 5 months ago · None stated GitHub repository of Deep Chart + BB (CVD Internal)

This indicator calculates 1-hour Bollinger Bands and overlays them directly on lower timeframe price charts, such as M15. It fetches hourly middle, upper, and lower band values and locks them until the next hourly bar opens to provide higher-timeframe volatili

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 1 year ago · MIT GitHub repository of H1 Bollinger Bands on M15 (Forward Shifted)
6 stars

This strategy identifies high-volatility expansion bars by comparing the high-low range to a moving average plus standard deviation threshold. When range expansion occurs, it checks momentum over a specified lookback period. It opens a long position if the cur

Strategy v5 Volatility & bandsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TradersPost High-Low Range Strategy

Public

by wanjo-tech
6 stars

This Pine Script v5 library walks historical price, volume, time and amount series until a requested number of hours is covered, stopping at 4999 bars. TimeAligned returns the bar count, net and absolute price changes, net and absolute log-price changes, volum

Library v5 Volatility & bandsVolume
Updated 2 years ago · None stated GitHub repository of Public
5 stars

This indicator plots a moving average and ATR-based stop loss and take profit levels on the price chart. It calculates ATR, NATR, and surge detection using lookback periods and crossover logic. Settings control ATR lookback, length, profit and loss multipliers

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of ATR Based Stoploss TakeProfit
5 stars

This strategy calculates three Supertrend directions from short, medium, and long ATR periods and multipliers on a chosen source. It enters long when all three trends are bullish and the position is flat, and enters short when none is bullish and the position

Strategy v4 TrendVolatility & bands
Updated 5 years ago · MIT GitHub repository of Triple Supertrend Strategy
4 stars

This indicator plots directional trade signals, ATR-based target and stop-loss boxes, and SuperSmoother reversal bands directly on the price chart. It evaluates market conditions across selectable technical strategies, displaying confidence scores alongside an

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 2 days ago · None stated GitHub repository of Elton's Predictions Decision Engine

BB Breakout [trugurpala]

by trugurpala
4 stars

This strategy executes trades based on Bollinger Band breakouts and ATR-based dynamic risk management. It opens a long position when price crosses above the upper Bollinger Band and a short position when price crosses below the lower band, provided no position

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · MIT GitHub repository of BB Breakout [trugurpala]

Dereköy-Darvas

by Kalumur
4 stars

The Dereköy-Darvas indicator combines Darvas Box boundary levels with dual Bollinger Bands plotted directly on the main price chart. It calculates top and bottom box lines based on recent high and low extremes to outline price consolidation zones. Simultaneous

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Dereköy-Darvas

BOLL-20-50 TARAMA

by gocaman
3 stars

Calculates 50-period and 200-period Exponential Moving Averages alongside standard and wide Bollinger Bands. It generates buy and sell signal labels on the chart when the Bollinger Band basis crosses above or below the 50 EMA. The script also includes volume-w

Indicator v5 Moving averagesVolatility & bands
Updated 2 days ago · None stated GitHub repository of BOLL-20-50 TARAMA

Supertrend

by AkashSasikumar47
3 stars

This script plots up to three ATR-based Supertrend lines directly on the price chart. Each line uses customizable ATR periods and multipliers to establish trailing support or resistance levels based on median price calculations. Green lines below price indicat

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Supertrend
3 stars

This indicator plots a stop-loss price on the main chart as green crosses. It compares the previous bar's high-low range with a 13-period ATR and offsets the current open by one, two, or three ATR multiples, or by the previous low plus ATR. Length variables na

Indicator v5 Volatility & bands Repaints
Updated 4 weeks ago · None stated GitHub repository of Complex ATR Stop Loss Strategy
3 stars

This indicator computes Root Mean Square Error (RMSE) relative to benchmark moving averages such as EMA or ALMA and applies Bollinger Band envelopes or iterative loop thresholds. It plots the RMSE metric and threshold bands in a separate pane to signal trend c

Indicator v6 Volatility & bandsMoving averages
Updated 12 months ago · None stated GitHub repository of RMSE Bollinger Bands + Loop | Lyro RS

MOTO ka AnjalikaAstra

by HelloMoto069
3 stars

MOTO ka AnjalikaAstra is an overlay indicator that combines Ichimoku Cloud concepts with Average True Range volatility filters. It calculates custom Tenkan-Sen, Kijun-Sen, and Senkou Span components using ATR bands rather than standard high and low price chann

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of MOTO ka AnjalikaAstra

Combined Liquidity, Channels, RSI, and VWAP is an overlay indicator that plots multiple technical analysis metrics directly on the price chart. It calculates Keltner and Donchian Channels, volume-based metrics like cumulative volume delta (CVD), VWAP with stan

Indicator v5 Volatility & bandsOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Combined Liquidity, Channels, RSI, and VWAP

MA & DMI

by maxits
3 stars

MA & DMI is a strategy that combines moving average crossovers with Directional Movement Index filters to identify trade setups. It calculates a slow SMA, a medium EMA, and a fast EMA alongside ADX and DI values. Trade risk management uses an ATR-based multipl

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA & DMI
3 stars

Plots Donchian Channels and identifies trading setups based on price testing the channel extremes during high volume spikes. In long mode, it places limit buy orders when the low touches the lower Donchian band with volume exceeding a volume moving average mul

Strategy v4 Mean reversionVolatility & bands
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Long Strategy

Alpy Vix

by avatar-lavventura
2 stars

This strategy plots a Williams Vix Fix, a WaveTrend oscillator, and a short rolling volume-weighted price filter in a separate pane. It measures how far the low sits below the highest close, then draws a moving average, standard-deviation bands, and a percenti

Strategy v5 Oscillators & momentumVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

Momentum Breakout Strategy

by adminalphabots
2 stars

This strategy plots on the price chart and enters when price closes beyond the prior lookback high or low and also beyond a shorter confirmation range. Long, short, or both directions can be enabled. Optional filters require volume above a volume average or a

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · MIT GitHub repository of Momentum Breakout Strategy

This indicator calculates dynamic grid trading boundaries derived from Bollinger Bands to define upper, lower, and middle range levels. It computes moving average basis lines and standard deviation bands, applying user-defined offsets, smoothing, and minimum o

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Bollinger Bands [psyll]

ORB Hunter

by nxtaiapp
2 stars

ORB Hunter is an Opening Range Breakout strategy that identifies price breakouts beyond a defined opening session window (such as 09:30 to 09:45 EST). It places long or short trades when price crosses the opening range bounds with buffer, confirmed by optional

Strategy v5 BreakoutSessions & time
Updated 11 months ago · MIT GitHub repository of ORB Hunter

BBW

by wynnforthework
2 stars

This strategy combines Bollinger Band Width volatility ratio calculations with a Coppock Curve momentum indicator. It calculates the ratio of standard deviation to EMA over a user-defined length, along with an EMA of that ratio. Long positions are entered when

Strategy v5 Volatility & bandsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of BBW

Bollinger Bands

by Web3Degenerate
2 stars

This Pine Script converts a Bollinger Band Breakout indicator into a strategy. It plots Bollinger Bands on the price chart using a 100-period SMA as the middle band with upper deviation of 3 and lower deviation of 1. Signals trigger on price crossing the bands

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of Bollinger Bands
2 stars

Calculates custom exponential moving averages and standard deviation envelopes based on price offsets and lookback windows. It plots dynamic channel bands, mean reversion zones, and squeeze indicators in a separate pane. Users can adjust the moving average len

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of [CBB] Rising Falling Color Band

Supertrend

by ctkqiang
2 stars

This script calculates a custom Supertrend line on the price chart to identify trend direction and dynamic support or resistance levels. It computes upper and lower trailing bands using the Average True Range (ATR) based on a configurable multiplier and period

Indicator v4 TrendVolatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Supertrend
1 stars

A test indicator on the price chart that combines optional entry filters with adaptive exit sizing. Filters include a moving average, a confirmation moving average, a higher-high higher-low market structure check using pivots and a MACD direction check. Take p

Indicator v6 Volatility & bandsMoving averages
Updated 2 days ago · None stated GitHub repository of USE Adaptive Kelly Test
1 stars

Market Lab is a static market workbench for inspecting OHLCV paths, cost anchors, volatility bands, formula research outputs, and candidate order plans in one compact interface. It features three-panel layout with instrument navigation, main chart, and facts a

Indicator v6 Support & resistanceVolatility & bands
Updated 2 days ago · AGPL-3.0 GitHub repository of DEPRECATED - use canonical Market Lab
1 stars

A separate-pane indicator that measures how far price sits from a weekly midline (average of a weekly EMA and SMA), scales the gap by daily and weekly ATR ratios, and converts it into a heat value from 0 to 100. Columns are coloured by heat level and faded whe

Indicator v6 Volatility & bandsSupport & resistance
Updated 3 days ago · None stated GitHub repository of Structural Heat Map (V3)

Ghost Alpha

by mphinance
1 stars

A price-chart overlay that blends a Hull moving average band, an optional higher timeframe Hull, a TRAMA line, Keltner bands, 50 and 200 SMAs and an intraday VWAP. It also covers swing structure detection with levels and supply and demand zones, a two-line Wil

Indicator v6 TrendMoving averages
Updated 3 days ago · Custom licence GitHub repository of Ghost Alpha
1 stars

This indicator plots fast and slow EMAs on the price chart with a fill between them to show trend direction. It ranks ATR volatility over the past 200 bars to define three regimes: quiet (trade only), wild (high volatility), and neutral. The background shades

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Complete System: Regime + Edge + Risk

ATR Trailing Stop

by pineforge-4pass
1 stars

This Pine Script strategy generates entry signals from an EMA of length 20 crossed by close price. Long crossover enters long position and sets initial trailing stop below close using ATR multiplied by 2.0. Short crossover enters short and sets trailing stop a

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of ATR Trailing Stop
1 stars

A strategy for one-minute charts that trades a breakout of a short opening probe at the cash open in a chosen time zone. It limits entries to the first breakout of the day within a time window and offers fixed risk-multiple, ATR bracket, time-based or session-

Strategy v6 Sessions & timeBreakout
Updated 8 days ago · GPL-3.0 GitHub repository of Academia TORB v1.5 Volatility-Regime ORB

A Pine v6 strategy for crypto charts that evaluates RSI, a trend moving average with higher timeframe filter, Fibonacci Bollinger Bands and Ichimoku in a fixed order. Each indicator can be switched on for visuals, for backtesting or both, and entry and exit si

Strategy v6 Oscillators & momentumTrend
Updated 12 days ago · MIT GitHub repository of Crypto TA Pro Phase 1 Weighted Indicators

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