Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 49)

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

Modern Portfolio Theory

by regalouisei
2 stars

Modern Portfolio Theory is an indicator that computes portfolio metrics across a basket of cryptocurrency assets using user specified weights. The script supports ten symbols including Bitcoin, Ethereum, Aave, Binance, Solana, XRP, Ethereum Classic, Cardano, A

Indicator v5 Volatility & bandsSupport & resistance
Updated 8 months ago · None stated GitHub repository of Modern Portfolio Theory

A breakout strategy that scores setups from 0 to 100 using a trend template of stacked moving averages, a volatility contraction check, a squeeze test with Bollinger and Keltner bands, and volume flow. A custom free energy versus fractal entropy measure acts a

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereign Thermodynamic Breakout
1 stars

This strategy calculates Keltner Channels using an Exponential Moving Average (EMA) for the midline and Average True Range (ATR) scaled by a multiplier for band width. It triggers a long entry when the close price crosses above the upper band and a short entry

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 99 - Keltner Channel Break

A volatility squeeze strategy on the price chart. It detects when Bollinger Bands contract inside Keltner Channels, then waits for the squeeze to release. A long or short entry is considered when price closes outside the band on release and a custom free energ

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of TnSovereign Thermodynamic Squeeze

This indicator runs Monte Carlo price-path simulations from recent logarithmic returns and draws the resulting forecast paths as polylines on the price chart. It samples either a normal distribution or a bootstrap of stored returns, controlled by a seed, simul

Indicator v5 Volatility & bands
Updated 8 months ago · None stated GitHub repository of Monte Carlo (Polyline Traceback) [Kioseff Trading]
106 stars

This overlay strategy plots Bollinger Bands from a simple moving average and standard deviation, plus a separate moving-average line and a background color when that average sits outside the bands. It opens a long when the source crosses above the lower band a

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced Bollinger Bands Strategy
1 stars

This overlay strategy combines confirmed pivot break-of-structure with a curved linear-regression and ATR channel. It enters long when price breaks a confirmed pivot high and closes above the slope-adjusted channel midline, and enters short on the symmetric be

Strategy v6 BreakoutSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe bos-curv-probe-integration

TnSovereignAliceV6

by raybird
1 stars

TnSovereignAliceV6 evaluates price action using a five-part methodology comprising fractal efficiency, RSI, Bollinger Bands, proxy institutional flow, and MACD histogram momentum. Entries trigger when a user-defined minimum number of consensus conditions align

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TnSovereignAliceV6

ADX + BB %B + AO + EMA

by hasnocool
106 stars

This strategy plots multiple exponential moving averages and a linear regression squeeze channel directly on the price chart. It executes 100-unit long and short trades by combining four EMA trend alignments, Bollinger Bands %B extremes, Awesome Oscillator mom

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX + BB %B + AO + EMA
1 stars

This indicator projects an ATR- and Fibonacci-spaced geometric price and time grid directly on the main chart. Operating from a 144-period macro midpoint anchor, it plots horizontal levels and partitions historical price action into discrete matrix cells. Each

Indicator v5 Support & resistanceVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Quantum Spider Web Matrix

Multiple Frequency Volatility Correlation measures the relationship between price standard deviation and volume standard deviation across window lengths ranging from 2 to 512 bars. It plots individual correlation values as colored circles in a separate indicat

Indicator v5 Volatility & bandsVolume
Updated 8 months ago · None stated GitHub repository of Multiple Frequency Volatility Correlation

This overlay strategy enters only after a buy-side or sell-side liquidity sweep confirms a displaced fair value gap. It sizes the position from a fixed fraction of equity, uses a dynamic stop based on that risk, and sets the target from a reward-to-risk multip

Strategy v6 SMC / ICT / price actionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereignIctSniperV6 [TeleNexus]
2 stars

This TradingView Pine Script indicator plots the Fractal Dimension Index (FDI) calculated from multiple length parameters for slow fast and ultra slow variants. It optionally displays RSI and BBWP indicators with customizable sources and baselines. Horizontal

Indicator v5 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Musashi Fractal Dimension v2
1 stars

This strategy draws an exponential moving average of close and an ATR envelope around it on the price chart. It enters one long contract when close crosses above the upper band and one short contract when close crosses below the lower band, reversing only from

Strategy v6 BreakoutMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kkb-probe-02-breakout-trigger

ADX | DMI Trend

by hasnocool
106 stars

This price-chart strategy treats a rising ADX above a chosen key level as a trend and uses plus and minus DI to choose direction. It enters long when plus DI leads and short when minus DI leads, if short trades are allowed. Volume and an EMA or SMA can block e

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX | DMI Trend
106 stars

This strategy captures strong bullish momentum by combining a 200-period SMA baseline, a custom Bollinger Band, the True Strength Index (TSI) smoothed with WMAs, and the ADX trend strength indicator. It initiates long positions when price is above the 200 SMA,

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX_TSI_Bol Band Trend Chaser

PF probe kkb-probe-integration

by pineforge-4pass
1 stars

This strategy combines a one-dimensional Kalman filter with an EMA midline and ATR breakout bands. It enters long when the Kalman estimate rises and close crosses above the upper band, and short when the estimate falls and close crosses below the lower band. A

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe kkb-probe-integration

This indicator draws a simulated price path as a blue polyline on the price chart. It stores recent closes, highs, and lows, then builds each point from a lookback-weighted average of older closes, an attraction toward that average, and random noise scaled by

Indicator v5 Volatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of Simulated Price Repaint (Polyline)

MTF Cipher Dots

by g-moe
3 stars

MTF Cipher Dots plots colored dots on the price chart based on WaveTrend oscillator calculations across multiple timeframes. It generates bull and bear signals by comparing WaveTrend values to thresholds, with dots appearing when conditions are met above or be

Indicator v5 Oscillators & momentumVolatility & bands
Updated 5 months ago · None stated GitHub repository of MTF Cipher Dots
1 stars

This indicator calculates dynamic symmetry lines by reflecting lagged price points across upper and lower boundary bands. Users can choose between Bollinger Bands or Donchian Channels to define the baseline boundaries. The script generates alternating BUY and

Indicator v5 Volatility & bandsSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Spiral Symmetric Signals

MA Envelope (MAE)

by mihakralj
99 stars

The MA Envelope indicator calculates upper and lower channel bands shifted by a user-defined percentage around a baseline moving average. It supports Simple Moving Average, Exponential Moving Average, and Weighted Moving Average calculation types. The script p

Indicator v6 Moving averagesSupport & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MA Envelope (MAE)

Supertrend

by alboogycOdR
6 stars

This indicator calculates and plots the standard Supertrend bands directly on the price chart to determine trend direction. It computes volatility bands using either Pine's built-in RMA-based ATR or an SMA-based true range, adjusting dynamically with close pri

Indicator v4 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Supertrend
1 stars

TnSovereignSignalForgeV20 is a price-chart strategy that combines seven directional votes from RSI, EMA, MACD, volume, VWAP, Bollinger Bands, and a volume oscillator. A long condition requires the vote total to meet a minimum agreement setting. A thermodynamic

Strategy v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of TnSovereignSignalForgeV20
99 stars

This script calculates Bill Williams' Market Facilitation Index (BW MFI) to evaluate price movement efficiency relative to trading volume. It computes the range between the high and low prices divided by volume for each bar, returning zero when volume is zero.

Indicator v6 VolumeVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Market Facilitation Index (MARKETFI)
1 stars

This strategy plots on the price chart and combines seven scored models into a weighted composite. It scores RSI extremes, volume spikes against a 20-bar average, price versus VWAP, EMA 9 and 21 alignment, MACD direction, Bollinger band location, and an estima

Strategy v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of TnSovereignSignalForgeV6

Mean %Error (MPE)

by mihakralj
99 stars

Mean %Error measures the average percentage difference between an input price series and a predicted target, set by default to its Exponential Moving Average. It calculates individual bar percentage errors and computes a sliding average over a customizable loo

Indicator v6 Moving averagesVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean %Error (MPE)
99 stars

Calculates the Mean Absolute Percentage Deviation (MAPD) between a chosen price source and its exponential moving average over a specified period. It measures relative dispersion by averaging percentage differences using an internal circular buffer algorithm.

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Absolute %Deviation (MAPD)

Probability Cones

by regalouisei
2 stars

Calculates and projects statistical probability cones forward onto the price chart based on historical sample data over a selectable lookback period. It supports standard deviation, Laplace distribution, and absolute deviation calculation methods. The cone anc

Indicator v5 Volatility & bandsSupport & resistance
Updated 8 months ago · None stated GitHub repository of Probability Cones
1 stars

The strategy calculates the point of control and value area from the volume profile using a lookback of 150 bars and 24 rows. It applies a fast EMA trend filter, a V18 coherence resonance check with minimum threshold of 1.6, and an ATR volatility filter requir

Strategy v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of TnSovereignVolumeProfileScalpV6
3 stars

My Historical Volatility plots annualized historical volatility in a separate pane. It measures the standard deviation of logarithmic close-to-close returns over a user-set length, scales that value by 100, and annualizes it with a factor that uses 365 days an

Indicator v5 Volatility & bands
Updated 5 months ago · None stated GitHub repository of My Historical Volatility
1 stars

TnSovereignVwapRegimeV6 is a mean-reversion strategy designed to trade price exhaustion away from the volume-weighted average price (VWAP). It calculates standard deviation bands around a session VWAP and tracks price deviation in normalized standard deviation

Strategy v6 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereignVwapRegimeV6

My QQE

by g-moe
3 stars

Calculates dual Quantitative Qualitative Estimation (QQE) oscillators paired with Bollinger Bands in a separate pane. It computes smoothed Relative Strength Index (RSI) values and tracks dynamic volatility bands based on Wilder-smoothed ATR of the RSI. A set o

Indicator v5 Oscillators & momentumVolatility & bands
Updated 5 months ago · None stated GitHub repository of My QQE

Mean Deviation

by mihakralj
99 stars

This indicator calculates the mean absolute deviation of a chosen source from its mean over a lookback period. A circular buffer keeps a running sum, then averages the absolute distance of each stored value from that mean. It plots the result as a line in a se

Indicator v6 Volatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Deviation
1 stars

This strategy identifies volatility compression and corridor breakouts on the price chart. It detects squeeze conditions where Bollinger Bands compress inside Keltner Channels, combined with Donchian Channel range boundaries. Long trades trigger on an upward s

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of Zzc Corridor Sovereign v6

Relative Bandwidth Filter

by regalouisei
2 stars

Calculates normalized bandwidth readings across various volatility channel types including Bollinger Bands, Keltner Channels, and Donchian Channels. It compares bandwidth values against a secondary band baseline to evaluate relative volatility expansion or con

Indicator v5 Volatility & bandsMoving averages
Updated 8 months ago · None stated GitHub repository of Relative Bandwidth Filter

ZZC Market Structure Sovereign v6 is a trend-following strategy that combines directional pivot tracking with Keltner-style volatility corridors. It calculates pivot highs and lows alongside an EMA baseline bounded by ATR corridors. A long entry is triggered w

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of ZZC Market Structure Sovereign v6

This strategy implements a custom Parabolic SAR algorithm modified with Average True Range (ATR) to measure volatility steps. It calculates the SAR line, acceleration factors, and extreme points directly on the price chart. When a trend reversal occurs and per

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Parabolic SAR Strategy [QuantNomad]
99 stars

The Mean Squared Error indicator calculates the mean of squared differences between a source series and its EMA, averaged via a rolling buffer acting as SMA. This error metric plots as a filled red area on a separate pane, while the EMA overlays as a yellow li

Indicator v6 Volatility & bandsMean reversion
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Squared Error (MSE)

ATR Stop Buy Strategy

by hasnocool
106 stars

This strategy calculates breakout thresholds around the previous bar's close using a 14-period Average True Range multiplier. It plots dynamic upper buy lines and lower stop-loss lines directly on the price chart. Long entries trigger when price breaches the u

Strategy v4 Volatility & bandsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Stop Buy Strategy
106 stars

This strategy calculates fast and slow average true range trailing stops directly on the price chart. It enters long positions when the fast trailing stop crosses above the slow trailing stop, and enters short positions when it crosses below. It paints price b

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Trailing Stop Strategy by ceyhun

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