Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 22)

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

Impulse Trend Arrows

by MeridianAlgo
9 stars

Calculates an adaptive baseline using an EMA and constructs an ATR channel smoothed over a user-defined length. It combines channel breakout conditions with RSI and MACD momentum agreement to generate buy and sell signals. Signals are displayed on the main pri

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Impulse Trend Arrows

This indicator overlays Bollinger Bands with two exponential moving averages directly on the price chart. It calculates standard Bollinger Bands using a selectable basis moving average type, length, and standard deviation multiplier. Alongside the bands, it co

Indicator v6 Moving averagesVolatility & bands
Updated 5 months ago · None stated GitHub repository of EMA 9, EMA 21 & Bollinger Bands

Linear Regression Channel

by jerryinyang
5 stars

The Linear Regression Channel indicator calculates the middle line via linear regression on a user-selected source over a configurable length. It plots upper and lower channel bands using a deviation multiplier and draws these lines directly on the price chart

Indicator v4 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of Linear Regression Channel
4 stars

This indicator plots a Chandelier Exit trailing stop on the price chart. It sets a long stop from the highest high over the ATR length minus an ATR multiple, and a short stop from the lowest low plus that multiple. Each stop only moves in the favorable directi

Indicator v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Chandelier Exit [trugurpala]

UT Bot Alerts

by ShabbirHasan1
4 stars

UT Bot Alerts combines an ATR-based trailing stop mechanism with selectable channel bands, including Bollinger Bands, Keltner Channels, and standard or pivot-based Donchian Channels. Signals are driven by crossovers between price and the adaptive ATR trailing

Strategy v4 TrendVolatility & bands
Updated 1 year ago · Custom licence GitHub repository of UT Bot Alerts
4 stars

This indicator calculates rolling quartiles and interquartile ranges (IQR) across a customizable lookback window, plotting a statistical box plot offset to the right of the chart. It identifies the 25th, 50th (median), and 75th percentiles along with standard

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 years ago · None stated GitHub repository of Quartiles with Box Plot [KL]
4 stars

Calculates Bollinger Bands, RSI, and Stochastic to identify potential reversal opportunities directly on the price chart. It plots buy signals when the bar low is within a set distance of the lower Bollinger Band while both RSI and Stochastic register oversold

Indicator v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of RSI and Stoch (Brahim)

Stats Table

by degenview
3 stars

Displays a statistical summary table pinned to the top right of the price chart. It calculates key metrics including ATR percentage relative to price, high-low range percentage over a configurable bar count, relative volume compared to its simple moving averag

Indicator v6 Screeners & dashboardsTrend
Updated 2 days ago · GPL-3.0 GitHub repository of Stats Table

Dip Bulucu-2

by gocaman
3 stars

Dip Bulucu-2 combines a WaveTrend oscillator and Williams Vix Fix to identify potential market bottoms and trend reversals. It calculates Williams Vix Fix based on standard deviation Bollinger Bands and percentile ranges, highlighting exhaustion bars in red hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 days ago · None stated GitHub repository of Dip Bulucu-2
3 stars

This indicator demonstrates debugging visualization patterns for Pine Script. It plots value tracking with mean, min, and max reference lines, condition markers using shapes and arrows, historical comparisons with standard deviation bands, multi-series overlay

Indicator v5 Moving averagesVolatility & bands
Updated 7 months ago · None stated GitHub repository of Debugging Visualization Patterns

Stella's Bollinger Squeeze

by stella-entry
3 stars

Stella's Bollinger Squeeze plots Bollinger Bands and compares them with a Keltner Channel on the price chart. It marks a squeeze when the Bollinger Bands sit inside the Keltner Channel and a gray background when they sit outside. After the squeeze ends, it mar

Indicator v5 Volatility & bandsBreakout
Updated 8 months ago · MIT GitHub repository of Stella's Bollinger Squeeze

DX Strat

by jawauntb
3 stars

DX Strat is an intraday directional trading strategy that combines a composite RSI momentum calculation, moving averages, Keltner Channels, and VWAP to execute trades. It initiates long positions when composite momentum RSI crosses above 77 and short positions

Strategy v5 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of DX Strat

Envelopes

by piecioshka
2 stars

Envelopes is an overlay indicator that plots percentage bands around a simple moving average. It calculates a baseline SMA using a configurable length and derives upper and lower envelope boundaries shifted by a user-defined percentage deviation. The script pl

Indicator v6 Moving averagesVolatility & bands
Updated 12 days ago · MIT GitHub repository of Envelopes

Volatility Stop

by avatar-lavventura
2 stars

The Volatility Stop indicator calculates a dynamic trailing stop line based on the Average True Range. It tracks ongoing price extremes and adjusts the stop level using a specified ATR multiplier and lookback length. The script evaluates trend direction change

Indicator v5 Volatility & bandsTrend
Updated 7 months ago · None stated GitHub repository of Volatility Stop

This strategy generates long entry signals by combining a Donchian Channel breakout with a moving average trend filter, volume confirmation, and a macro volatility regime gate based on CBOE VIX and VIX3M ratios. It enters long positions when prices break above

Strategy v5 TrendBreakout
Updated 10 months ago · MIT GitHub repository of Trend-Breakout System mit VIX Heatmap Gate

Chandelier Exit

by pineforge-4pass
1 stars

This strategy calculates Chandelier Exit trailing bands using average true range (ATR) and highest high / lowest low lookback levels. It maintains a stateful direction variable that flips bullish when the close crosses above the short band level or bearish whe

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Chandelier Exit
1 stars

A strategy that uses a Hull-smoothed volatility band trend engine to set direction, then enters only on a pullback into the trailing trend level followed by a reclaim candle. Settings cover minimum bars since the flip, pullback tolerance in ATR, lookback and m

Strategy v6 TrendVolatility & bands Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Pullback Continuation v1
1 stars

An indicator in a separate pane that simulates trades from a chosen signal source (MACD with RSI, breakout, mean reversion or an external series), each with an ATR stop, an R-multiple target and a time exit. It collects the results over a window and converts t

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of KLDS v2 Kelly Position Sizer

Kalman Trailing Stop

by vedkanani123
1 stars

A price-chart indicator that builds a Kalman-filter baseline, optionally weighted by volume, and trails a stop at a standard-deviation distance, flipping when price penetrates it and the baseline slope agrees. A wick-and-sweep filter marks liquidity-sweep sign

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Kalman Trailing Stop

TP 8 Lines

by XingHan98
1 stars

This TradingView indicator draws daily support and resistance lines for gold (XAU/USD) at 08:00 Singapore time on weekdays, based on the price action of the 5-minute candle closing at 08:00. It also plots three ATR-based take-profit levels per side, computed a

Indicator v5 Support & resistanceVolatility & bands
Updated 2 months ago · None stated GitHub repository of TP 8 Lines

The Fractal Cone

by tthanhvu002sgu
1 stars

Projects an adaptive probability cone ahead of price on the chart. It measures kurtosis of price changes over a slow lookback to label the instrument growth-like or value-like, then chooses between fast and slow settings in parallel. A Hurst estimate from frac

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of The Fractal Cone

Deep Trades Whales v4

by shubhamtaywade82
1 stars

Deep Trades Whales v4 is an indicator that detects large institutional trades by analyzing volume spikes against historical percentiles and Z-scores. It identifies whale activity through iceberg absorption patterns that require proximity to prior swing highs o

Indicator v6 VolumeVolatility & bands Archived
Updated 5 months ago · None stated GitHub repository of Deep Trades Whales v4
1 stars

This price-chart indicator builds a right-side volume profile and an anchored VWAP for crypto analysis. Lookback, row count, value-area percent, and acceptance bars shape the profile, while daily, weekly, or monthly anchors and a standard-deviation multiplier

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

Moments Functions

by Teerth1
1 stars

Plots rolling statistical moments of returns or a chosen source: mean, variance, skewness and excess kurtosis, selected from a dropdown. Options add standard deviation bands around the mean, show standard deviation in place of variance, and display critical va

Indicator v5 Volatility & bands
Updated 6 months ago · None stated GitHub repository of Moments Functions
1 stars

This Bitcoin trading strategy analyzes golden cycle phases using halving dates and custom lengths for pre- and post-halving rises and drops. It plots a rainbow ribbon, supply and demand zones, Ichimoku cloud, geometric mean indicator, and ZigZag lines on the p

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle v5

SPX Sentiment

by nvFede
1 stars

A Pine v4 indicator in a separate pane that divides the S&P 500 index by the VIX volatility index to form a ratio, then compares it with its own average and a z-score style measure over a chosen length. It colours the background by whether the ratio is above o

Indicator v4 Volatility & bandsMean reversion
Updated 3 years ago · None stated GitHub repository of SPX Sentiment

Bband Pinch & Expand

by JohnsonHsiao
1 stars

Bband Pinch & Expand calculates Bollinger Bands width and compares it against its simple moving average to detect periods of volatility expansion and contraction. The script plots a histogram of the difference between the current band width and its moving aver

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bband Pinch & Expand

RSI-ADI-Combo

by DT021
1 stars

This indicator combines the Average Directional Index (ADX) for trend strength, Money Flow Index (MFI) for volume flow analysis, and Relative Strength Index (RSI) for momentum signals. The ADX is plotted as colored columns with background coloring indicating u

Indicator v4 TrendOscillators & momentum
Updated 6 years ago · GPL-3.0 GitHub repository of RSI-ADI-Combo

ATR Forward Box

by TradersPost
228 stars

This overlay indicator draws a one-bar-wide box a chosen number of bars ahead of the current bar. The box is centered on the selected price—current close, high, low, or HL2—and extends one ATR above and below that level. It deletes the previous box and creates

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of ATR Forward Box

This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.

Strategy v5 AI / machine learningTrend
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy [5] (v.3)

The AMFM indicator decomposes price movements into amplitude and frequency components using Ehlers' digital signal processing methods. It whitens the derivative as close minus open, then computes AM as the smoothed envelope of the absolute difference over 4 pe

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of AMFM - Ehlers AM Detector / FM Demodulator
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap

This indicator combines Chaikin Money Flow (CMF), a SuperTrend baseline, and an Average True Range (ATR) calculation inside a separate sub-pane. It calculates a standard 20-period CMF plotted as a line and colored histogram columns around a zero baseline, trac

Indicator v6 TrendVolume
Updated 6 months ago · Apache-2.0 GitHub repository of Institutional View: CMF & SuperTrend
43 stars

This indicator calculates standardized trend strength and historical volatility to estimate position sizes. It computes the differences between three user-defined EMAs standardized by price using MACD logic, while historical volatility is derived from the stan

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trend Strength & Volatility v2

Greeffer RSI Strategy

by SammyEnigma
18 stars

Greeffer RSI Strategy is a trading strategy that generates buy and sell entries based on Bollinger Bands and RSI levels. It places stop orders at upper and lower Bollinger Bands on band crossovers, and adds positions when RSI reaches extreme levels. Users can

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of Greeffer RSI Strategy
16 stars

This strategy trades Donchian channel breakouts on the price chart and exits on a shorter Donchian channel. It sizes each unit from a percentage of equity and an ATR-based initial stop, then adds units as price moves a set ATR distance, up to a maximum unit co

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 16: Anti-Chop Filters

Calculates a composite Trend Factor ranging from -100 to +100 alongside a confidence score from five weighted evidence blocks: linear regression slope, trend strength metrics (ADX, Efficiency Ratio, R-squared), swing market structure, volatility quality, and e

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Bayesian Trend Factor [WavesUnchained]

Keltner Channel Trend - Eterna

by EternaHybridExchange
9 stars

This strategy plots a Keltner channel from an EMA basis and ATR bands on the price chart. It enters long when price crosses back above the lower band while trading above a slower trend EMA, and short when price crosses back below the upper band while below tha

Strategy v5 TrendVolatility & bands
Updated 7 months ago · MIT GitHub repository of Keltner Channel Trend - Eterna

This strategy marks an n-bar pivot low and treats it as confirmed when the close crosses above that bar's high. On confirmation it stores a sell-to-close level at the pivot low, a standard-deviation trailing stop, a retrace level for adding size, and a rounded

Strategy v4 Support & resistanceVolatility & bands
Updated 4 years ago · None stated GitHub repository of PivotConfirm-with-SellToClose
7 stars

This indicator plots raw volume or dollar volume on a logarithmic or linear scale in a separate pane below the main chart. It calculates Bollinger Bands around the chosen volume series using standard deviation and selectable moving average smoothing types, inc

Indicator v5 VolumeVolatility & bands
Updated 4 months ago · None stated GitHub repository of Log Volume + Bollinger Band

This indicator combines a 200-period Exponential Moving Average (EMA), a Stochastic RSI oscillator, and three distinct Supertrend lines utilizing different ATR periods and multipliers. It overlays the EMA and Supertrend tracking lines directly onto the price c

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Stochastic + Triple Supertrend

AG Trend-Pullback

by eltonaguiar
4 stars

This strategy trades trend pullbacks on the price chart. It goes long when the 50-period EMA is above the 200-period EMA, price is above the slower average, RSI of length 2 is below 20, and ADX is above 15. Shorts mirror that in a downtrend with RSI above 80.

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of AG Trend-Pullback
4 stars

This strategy builds Chandelier trailing stops from the highest high and lowest low over an ATR window, offset by an ATR multiple. The long stop only ratchets up and the short stop only ratchets down. Direction turns long when the close exceeds the prior short

Strategy v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Chandelier Strategy [trugurpala]

Trend Finder w/ COV

by kevinhhl
4 stars

This indicator measures price volatility using the Coefficient of Variation, calculated by dividing the standard deviation by the simple moving average over a specified lookback period. It filters out ranging market conditions by comparing the current variatio

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Trend Finder w/ COV

This indicator measures a 20-bar rolling correlation between lagged changes in several price factors and the close change over the previous 10 bars. It is configured to draw in a separate pane. The factors include the gap between a 13-period EMA and a 30-perio

Indicator v5 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Factor Indicator: Correlation with Price Change

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