Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 12)

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

Tripple Supertrend Strategy

by danielhyuncoder
1 stars

The Tripple Supertrend Strategy calculates three separate Supertrend indicators using different length and multiplier parameters to gauge trend concurrence. It enters a long position when all three Supertrend instances align in a bullish direction. The strateg

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Tripple Supertrend Strategy
1 stars

Calculates standard Bollinger Bands alongside the Relative Strength Index (RSI) directly on the main price chart. It plots the upper band, lower band, and simple moving average midline. An upward green arrow signals potential long setups when price crosses bac

Indicator v5 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Bollinger Bands & RSI with Arrow

Ari zScore

by alessioricco
1 stars

Ari zScore calculates a z-score as the difference between a fast and a slow simple moving average of close, divided by the standard deviation of close. It plots numbered triangles above and below price bars when that value enters fixed magnitude bands, optiona

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of Ari zScore

This long-only strategy builds an AlphaTrend line from ATR bands that switches behaviour on MFI, or RSI when volume data is missing. A buy signal appears when the line crosses above its two-bar-delayed copy, and a sell signal on the opposite cross. It enters l

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Alpha Trend Strategy on TradingBoat

KC Integration

by Sikako
1 stars

KC Integration is a trading strategy that calculates multiple sets of Keltner Channels tailored for both trend-following and counter-trend conditions. It plots upper, middle, and lower channel bands directly on the main price chart to identify potential breako

Strategy v5 Volatility & bandsBreakout
Updated 3 years ago · None stated GitHub repository of KC Integration

Volatility Oscillator

by jubayernil
1 stars

This indicator measures intrabar volatility by plotting price spikes (close minus open) alongside standard deviation upper and lower bands in a separate pane. It identifies regular and hidden bullish or bearish divergences by comparing pivot points of the osci

Indicator v4 Volatility & bandsOscillators & momentum Repaints
Updated 3 years ago · None stated GitHub repository of Volatility Oscillator

Tobacco

by 0xfffangel
1 stars

An overlay that builds a Kaufman adaptive moving average of price as a center line and surrounds it with three bands above and below, scaled from an adaptive average of true range. The band length and the three deviation multipliers are adjustable, and the zon

Indicator v5 Volatility & bandsMean reversion
Updated 4 years ago · None stated GitHub repository of Tobacco

Barbwire v2.0.0

by itmakesyousick
1 stars

Finds barbwire zones, runs of bars with small bodies or ranges, and draws boxes around them on the price chart. The bar size source can be Heikin-Ashi open to close, high to low, a hybrid or open to close. Detection can use rank, stochastic or rate of change m

Indicator v5 Candlestick patternsVolatility & bands
Updated 4 years ago · None stated GitHub repository of Barbwire v2.0.0

Alt Coin BB SMA Strategy

by samliu0206
1 stars

Alt Coin BB SMA Strategy calculates custom MACD delta histogram values, Bollinger Bands, and middle band slopes to generate trading signals in a separate pane. It triggers long entry orders when the price crosses above the Bollinger middle band, provided the M

Strategy v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Alt Coin BB SMA Strategy

1DTE

by tyler314
1 stars

1DTE is an overlay indicator designed for 1-day-to-expiration option trading analysis. It evaluates market conditions using Average True Range (ATR), consecutive green or red daily streaks, and CBOE Volatility Index (VIX) levels. Users can filter evaluation wi

Indicator v5 Volatility & bandsSessions & time
Updated 4 years ago · None stated GitHub repository of 1DTE

ATR Volatility Power

by hayashi19
1 stars

This indicator shows how far the 14-period ATR sits above its lowest value over the last 200 bars, smoothed with a 9-period average. It draws this value as columns in a separate pane, coloured lime when it rises and red when it falls. A second series, the lowe

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of ATR Volatility Power
318 stars

This indicator plots fast and slow moving averages using either EMA or SMA directly on the main chart to identify trend direction and crossovers. It calculates an ATR-based trailing stop line derived from the highest high minus a multiplied ATR value over a co

Indicator v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TVT MA Crossover with Stop Loss
257 stars

This overlay strategy targets one-minute ES futures and plots volume-weighted moving-average bands from the open, scaled by a standard-deviation multiple, plus a slower band from ten-minute opens. A higher-timeframe exponential moving average can filter trades

Strategy v6 Moving averagesVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of ES - Futures 1M No Repaint

Daily Bias + FVG Strategy

by TradersPost
228 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy

This tutorial strategy demonstrates lower-timeframe multi-timeframe functionality in Pine Script using request.security_lower_tf. It evaluates synthetic lower-timeframe 1-minute close prices within each chart bar to calculate the intra-bar price range percenta

Strategy v6 Volatility & bands
Updated 2 days ago · Apache-2.0 GitHub repository of PineForge MTF tutorial — lower-TF intra-bar range

2xTP, SL to Entry

by hasnocool
106 stars

This strategy executes mean-reversion trades based on Bollinger Bands and the Stochastic Oscillator. Long orders trigger when price dips below the lower band alongside a bullish Stochastic crossover, with an optional oversold threshold. Short orders execute on

Strategy v5 Mean reversionOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 2xTP, SL to Entry
105 stars

This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
99 stars

This indicator plots Price Headley's Acceleration Bands on the price chart. It builds a middle line as a simple moving average of close, plus upper and lower bands from simple moving averages of highs and lows widened by a factor times the bar's high-low range

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Acceleration Bands (ACCBANDS)

Higher TF BBands

by PythonForForex
64 stars

This indicator calculates Bollinger Bands from the close, using a chosen length and standard-deviation multiplier, then reads the middle, upper, and lower values from a user-selected timeframe. It plots those three bands on the price chart. The timeframe input

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Higher TF BBands
47 stars

This indicator calculates and plots Acceleration Bands directly on the main price chart. It computes simple moving averages of high, low, and close prices using circular buffers. The middle line displays the close moving average, while upper and lower envelope

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Acceleration Bands (ACCBANDS)
43 stars

This indicator measures how extreme current Average True Range is versus recent history. It calculates ATR, converts it to a percentile rank over a lookback window, and smooths that rank with an EMA. Both series plot in a separate pane, with a color gradient f

Indicator v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of ATR Percentile Rank

NostalgiaForInfinityV2

by viktors1982
36 stars

NostalgiaForInfinityV2 is a multi-timeframe mean-reversion strategy derived from the popular Freqtrade algorithmic trading framework. It evaluates price behavior using dual Bollinger Bands, RSI, exponential moving averages, and ATR volatility metrics sampled a

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of NostalgiaForInfinityV2

BB + MA + RSI

by thanhnguyennguyen
33 stars

This overlay indicator plots Bollinger Bands around a simple moving average, three exponential moving averages, and RSI-based markers on the price chart. Triangles mark RSI below the oversold level or above the overbought level, and arrows mark RSI crossing th

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of BB + MA + RSI

Bollinger Bands

by modster
32 stars

This indicator plots a Bollinger-style envelope on the price chart. It calculates a simple moving average of the selected source and a standard-deviation band width set by the multiplier. It draws the basis, two lines offset by a small fraction of the basis as

Indicator v4 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bollinger Bands

Zen ABR Range Bands

by Zen-Tim
29 stars

The Zen ABR Range Bands indicator calculates an 8-bar average range from high-low differences and an exponential moving average of close prices. It plots the EMA on the price chart along with optional bands at multiples of the ABR (1x, 2x, 3x, 4x) centered on

Indicator v6 Moving averagesVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands
25 stars

This Pine Script strategy calculates Bayesian probabilities of price breaking up or down relative to Bollinger Bands and a Simple Moving Average. It plots these breakout and breakdown probability lines as oscillators in a separate pane. Long entries trigger wh

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of Bayesian BBSMA Oscillator Strategy

ADX/DMI Strategy

by benso87
24 stars

This strategy calculates ADX and plus and minus directional movement and adds a Bollinger Band Width Percentile filter. It tracks positive or negative DMI, rising or falling ADX, and an optional recent DMI flip within a set lookback. Settings change ADX length

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of ADX/DMI Strategy

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy combines Bollinger Bands, Bollinger Band Width, and the Relative Strength Index (RSI) for mean-reversion trades. It enters long when price crosses below the lower band with oversold RSI, or when band width contracts under low volatility. Short en

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

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

Index Intraday Analyst

by chris-c-thomas
14 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst

Scalping Level PRO

by stupenkov
14 stars

Scalping Level PRO identifies key local and global horizontal support and resistance levels across cryptocurrency price charts. It draws level lines based on customizable time periods, calculates Normalized Average True Range (NATR) for volatility assessment,

Indicator v5 Support & resistanceVolatility & bands
Updated 3 years ago · None stated GitHub repository of Scalping Level PRO

NFI v6

by koradiyakaushal
12 stars

This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · MIT GitHub repository of NFI v6

Adaptive Fair Value Cloud calculates a volatility-adaptive fair value channel around a selectable centerline, such as KAMA, EMA, linear regression, or VWMA. It blends ATR and mean deviation with volatility percentiles and trend sensors, including ADX, Efficien

Indicator v6 Volatility & bandsTrend
Updated 3 days ago · MIT GitHub repository of Adaptive Fair Value Cloud [WavesUnchained]
9 stars

Volume SuperTrend AI (Expo) combines SuperTrend trend filtering with a k-nearest neighbors machine learning classification algorithm. It computes a SuperTrend using customizable moving average types, including simple, exponential, weighted, smoothed, or volume

Indicator v5 TrendAI / machine learning
Updated 3 years ago · None stated GitHub repository of Volume SuperTrend AI (Expo)
9 stars

Calculates a SuperTrend trailing stop and reversal line based on Average True Range volatility. It overlays on the price chart to display volatility-based trailing stop levels and trend direction for long or short position scenarios. Users can adjust parameter

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

This indicator detects contrarian inflection points and potential market reversals by combining sentiment, volume, and price action metrics directly on the price chart. It evaluates overbought and oversold conditions with the RSI and Stochastic oscillators, hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of GCR Inflection Point Scanner

TR Basis Monitor

by Enesp4rl4k
7 stars

This indicator calculates the cost-of-carry fair value between futures and spot prices, measuring the basis and fair value deviation in basis points. Operating in a separate pane, it computes a rolling Z-score of deviation using moving averages and standard de

Indicator v6 Mean reversionVolatility & bands
Updated 7 days ago · MIT GitHub repository of TR Basis Monitor

Engulfing Off BB

by lunarticktrading
7 stars

This indicator plots Bollinger Bands on the price chart and highlights engulfing candles that touch a band. A bullish engulfing bar that reaches the lower band is colored with the bullish color, and a bearish engulfing bar that reaches the upper band is colore

Indicator v6 Volatility & bandsCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Engulfing Off BB

Chandelier Exit

by muammeryldrm42
7 stars

This strategy implements trend-following breakout entries based on the Chandelier Exit calculation filtered by an exponential moving average. It calculates trailing stop bands using the highest high or lowest low over a lookback period adjusted by an Average T

Strategy v5 TrendVolatility & bands
Updated 3 months ago · MIT GitHub repository of Chandelier Exit

This indicator measures the distribution of bar-to-bar close returns over a rolling window and presents the results in a table on the price chart. It calculates annualized mean return and volatility, a simple Sharpe ratio, a 95 percent value-at-risk percentile

Indicator v5 Volatility & bandsScreeners & dashboards

This indicator calculates daily 90-period Bollinger Bands and plots them directly on a lower timeframe chart, such as M15. It queries higher-timeframe daily data using request.security and updates the upper, middle, and lower band values at the start of each n

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of D1 Bollinger Bands (Period 90) on M15 (Forward Shifted)

MultiVolatility

by wanjo-tech
6 stars

MultiVolatility calculates and compares multiple annualized volatility metrics within a separate pane. It computes a traditional 20-day historical volatility using log returns on daily data scaled by 252 days, which displays on daily charts. Additionally, it i

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of MultiVolatility

ATR Based Stoploss

by rubystar0512
5 stars

ATR Based Stoploss is an overlay indicator that calculates dynamic stop loss and take profit bands around a central simple moving average. It uses standard Average True Range or an ATR Surge Average derived from volatility spikes to offset profit and loss boun

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

[CP]Pivot Boss Floor Pivots

by pranjalchaubey
5 stars

This indicator draws floor pivots and the central pivot range on the price chart. A timeframe input sets the pivot period from one hour through twelve months, and toggles control labels and next-period levels. When dynamic levels are on, an ATR threshold decid

Indicator v4 Support & resistanceMoving averages
Updated 3 years ago · None stated GitHub repository of [CP]Pivot Boss Floor Pivots

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