Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 21)

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

2 stars

Inside Bar Chain Detector identifies sequences of inside bars fully contained within the prior bar's high-low range on price charts. It marks each inside bar with a diamond below the bar and optionally shows labels with chain length and range contraction perce

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 3 months ago · Apache-2.0 GitHub repository of Inside Bar Chain Detector

XAUUSD Strategy V4.17 is a Pine Script strategy that plots buy and sell signals on the gold price chart using Stochastic oscillator, RSI, EMA trend filters, Fibonacci zones, and ATR-based risk management. It supports confirm-only, confirm+scalp, or scalp-only

Strategy v5 Oscillators & momentumMoving averages

This indicator functions as a range-defining plugin for the Grid Bot system, calculating dynamic upper and lower grid boundaries based on a moving average and standard deviation offsets. It supports 17 different moving average algorithms, including EMA, SMA, H

Indicator v6 Moving averagesVolatility & bands Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Moving Avarage StDev [psyll]

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1

Inverse Choppiness Index

by ryangaraygay
2 stars

This indicator calculates the Choppiness Index to gauge market consolidation versus trending conditions. When the Choppiness Index indicates high choppiness above a threshold of 50 during a defined trading session, the script plots a transparent rectangle over

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Inverse Choppiness Index

VIX 10SMA

by klevler
2 stars

This indicator plots candles for a selected symbol, defaulting to CBOE:VIX, in a separate pane together with a simple moving average of close and a line at 1.2 times that average. It colors the background when the symbol high is more than 20 percent above the

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · MIT GitHub repository of VIX 10SMA

[CBB] 2023 System

by codybbrown
2 stars

This overlay indicator calculates the Commodity Channel Index from a selected source and detects crossings above an upper threshold and below a lower threshold, storing the high, low, and midpoint of those bars. It also builds two Bollinger Band sets with inde

Indicator v5 Oscillators & momentumVolatility & bands
Updated 3 years ago · None stated GitHub repository of [CBB] 2023 System

Chandelier Exit + MACD [UT]

by theupslidedown
2 stars

This indicator draws a Chandelier Exit on the price chart. It sets a long stop under the highest price and a short stop above the lowest price, each offset by a multiple of ATR, then trails the active stop as price moves. Direction turns long or short when pri

Indicator v5 TrendVolatility & bands Repaints
Updated 3 years ago · None stated GitHub repository of Chandelier Exit + MACD [UT]
1 stars

The Moving Average Exponential indicator plots an EMA of the input source with a user-defined length on the price chart. It supports offset for shifting the plot. Additional smoothing options apply different MA types to the EMA output and optionally overlay Bo

Indicator v6 Moving averagesVolatility & bands
Updated 2 days ago · Custom licence GitHub repository of Moving Average Exponential

Ghost x Gemini

by mphinance
1 stars

A dashboard-style overlay meant to be added next to another indicator, showing a structured information panel of trend, volatility and momentum readings on the price chart. It draws on Hull trend, TRAMA, Keltner bands, swing structure, Williams %R exhaustion,

Indicator v6 Screeners & dashboardsTrend
Updated 3 days ago · Custom licence GitHub repository of Ghost x Gemini

AI Renko Supertrend

by ankurksoni
1 stars

A price-chart overlay that builds Renko-style bricks from an adaptive ATR and runs a Supertrend on them. ATR length is blended from short, base, long and slow readings, and the band factor and brick size widen or narrow depending on whether volatility is high

Indicator v6 TrendVolatility & bands
Updated 3 days ago · None stated GitHub repository of AI Renko Supertrend

A strategy that trades the trend flips of a volatility band trend line, either on the original flip or on a close crossing the trend level, with entries confirmed on bar close. It can reverse on an opposite signal, filter by session or higher timeframe trend,

Strategy v6 TrendVolatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Flow Strategy Optimized v6

DEPV2 A5 · HACİM

by YuceSezar89
1 stars

DEPV2 A5 plots volume participation in a separate pane. It divides current volume by its simple moving average, estimates directional flow from a close-location delta, and measures how much recent volume sits inside a price band around the close, scaled by ATR

Indicator v6 VolumeVolatility & bands
Updated 13 days ago · None stated GitHub repository of DEPV2 A5 · HACİM
1 stars

This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy Developed

VWAP Signal Suite

by JACKZHOU0521
1 stars

This indicator calculates a session-resetting Volume Weighted Average Price (VWAP) along with inner and outer standard deviation bands plotted directly on the price chart. It provides bar-close confirmed visual signals for VWAP crossovers, pullback reclaims fo

Indicator v6 Moving averagesVolatility & bands
Updated 5 weeks ago · None stated GitHub repository of VWAP Signal Suite
1 stars

A Pine v5 indicator in a separate pane that labels the market state using volatility and trend alignment. It plots ATR as a percentage of price, Bollinger Band width with its 50-bar average, and a squeeze and expansion flag. A 10, 20 and 50 EMA alignment marks

Indicator v5 Volatility & bandsTrend
Updated 7 weeks ago · None stated GitHub repository of Volatility Regime Detector
1 stars

An indicator in a separate pane that separates realised variance from jump-robust bipower variation over a rolling window, and shows the share of recent volatility attributed to jumps. It adds a Barndorff-Nielsen and Shephard style significance test, bar-by-ba

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of JRD v2 Jump Risk Differential

Kalman Flow

by vedkanani123
1 stars

An overlay indicator that runs price through a Kalman filter and builds adaptive noise bands from the tracking error around the estimate. The trend flips bullish when price closes above the upper band with positive velocity, and bearish when it closes below th

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Kalman Flow
1 stars

Overlay indicator for XAUUSD gold that draws predicted support and resistance levels at 08:00 and 19:00 SGT on the price chart along with buy and sell take-profit levels spaced by ATR multiples. It generates RSI reversal signals as triangles when the indicator

Indicator v5 Support & resistanceOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Predicted Signals + RSI trigger

Buddha Squeeze

by DarthBuddha
1 stars

A separate-pane momentum and volatility indicator in the style of the TTM Squeeze. It plots a linear-regression oscillator as columns coloured by direction and by whether momentum is rising or falling, with yellow marks on the zero line while Bollinger Bands s

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 months ago · MIT GitHub repository of Buddha Squeeze

Reynolds Flow - Energy River

by tthanhvu002sgu
1 stars

Applies a fluid-dynamics analogy to price in a separate pane. A raw Reynolds-style number divides candle body size, signed by price against a moving average, by ATR. It is normalised and ranked by percentile to classify flow as laminar, turbulent, viscous or s

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Reynolds Flow - Energy River

BB Squeeze + Breakout

by kevinesk
1 stars

This indicator measures Bollinger Band width as a percentage of the middle band and plots it in a separate pane. It marks a squeeze when that width equals its lowest value over 126 bars and also flags bars where the Bollinger Bands sit inside Keltner Channels

Indicator v5 Volatility & bands
Updated 4 months ago · None stated GitHub repository of BB Squeeze + Breakout

Deep Trades Whales LuxAlgo

by shubhamtaywade82
1 stars

A cleaner display version of a volume-based whale detector on the price chart. It uses a volume percentile and z-score gate, scales ATR thresholds by a low, normal or high volatility regime, and marks price impact bars, iceberg-style absorption, clusters and e

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

Linear Moments

by Teerth1
1 stars

Calculates L-moments of a rolling window of log returns or the raw source: the mean, L-scale, L-skewness and L-kurtosis. A selector chooses which moment is plotted, and the lookback sets the window size. For kurtosis it draws a reference level for a chosen the

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

The Hybrid Overbought/Oversold Detector combines several classic technical indicators, such as Bollinger Bands %B, CCI, CMF, and CMO, into a consolidated oscillator displayed in a separate pane. It calculates aggregate momentum and volume conditions to identif

Indicator v5 Oscillators & momentumVolatility & bands
Updated 10 months ago · None stated GitHub repository of Hybrid Overbought/Oversold Detector

EZ Algo Debug Hedge

by turnupdigital
1 stars

A strategy that combines up to five external buy and sell signal sources, each with its own name and usage mode, and manages positions with ATR-based exits and an optional moving average exit. A switch chooses between faster intrabar exits and safer exits that

Strategy v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of EZ Algo Debug Hedge

This indicator uses a two-dimensional k-nearest-neighbours model on scaled oscillator values to classify the current bar as buy, sell, or hold from similar historical states. Users select RSI, ROC, CCI, momentum, or all of them, and set the neighbour count, fa

Indicator v4 AI / machine learningOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-based Strategy (update)

Hammers & Shooting Stars

by fiji-solutions
1 stars

This indicator identifies single-bar candlestick patterns, specifically hammer and shooting star formations. It uses a configurable Fibonacci threshold to determine if the candle body rests in the upper or lower proportion of the total price range. An Average

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Hammers & Shooting Stars

Donchian Trend

by JoeTonDev
1 stars

A trend-following strategy that goes long when price closes above the prior 20-bar high while a fast EMA is above a slow EMA, and short on a close below the prior 20-bar low when the fast EMA is below. Positions close on a 10-bar opposite extreme, and an ATR-b

Strategy v5 BreakoutTrend
Updated 2 years ago · None stated GitHub repository of Donchian Trend
1 stars

This strategy plots the built-in Supertrend line in green or red on the price chart. When the Supertrend value steps up it enters a long position, and when it steps down it enters a short position, so it stays in the market and reverses on each change. Each or

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend
1 stars

This strategy follows Supertrend, with a 10-period ATR and a multiplier of three by default. It goes long when price crosses above the Supertrend line and short when price crosses below, and also closes on the opposite cross. In addition, each trade has a perc

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Supertrend + Percentage Target and Stop

ATR/Close Ratio

by JohnsonHsiao
1 stars

This indicator calculates the ratio of the Average True Range (ATR) to the closing price, expressed as a percentage. It plots the resulting percentage line in a separate pane along with a customizable horizontal line representing a volatility threshold. Trader

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of ATR/Close Ratio
1 stars

Relative Volatility Index is a Pine v5 strategy that calculates a relative volatility index and draws Bollinger Bands, with a basis line and fill, in a separate pane with reference lines at 20 and 80. The index line itself is commented out of the plots. It goe

Strategy v5 Volatility & bandsMean reversion Archived
Updated 4 years ago · None stated GitHub repository of Relative Volatility Index

[TradersPost] Sick Sigma

by TradersPost
228 stars

Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma

Strategy v6 Volatility & bandsMean reversion Repaints
Updated 3 months ago · None stated GitHub repository of [TradersPost] Sick Sigma

MACD-V

by harryguiacorn
220 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V

This overlay strategy combines a Nadaraya-Watson envelope, an RSI calculation, and an ATR stop-loss finder. With repainting off, it plots yellow upper and lower bands from a Gaussian endpoint estimate; with repainting on, it redraws the envelope on the last ba

Strategy v5 Oscillators & momentumVolatility & bands Repaints
Updated 3 years ago · MIT GitHub repository of Nadaraya-Watson Envelope, RSI, and ATR Stop Loss Finder

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 6 days ago · GPL-3.0 GitHub repository of CCI DC

Take Profits & Stop Losses

by PythonForForex
64 stars

This educational strategy demonstrates moving average crossovers filtered by RSI momentum, incorporating ATR-based risk management. It calculates a 10-period SMA, a 30-period SMA, a 14-period RSI, and a 14-period ATR. Long entries trigger when the fast SMA cro

Strategy v5 Moving averagesOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Take Profits & Stop Losses
56 stars

This indicator marks forex trading sessions and opening ranges on the price chart. It can draw Sydney, Tokyo, Frankfurt, London, and New York session boxes or five- and fifteen-minute opening ranges, plus an optional opening channel and a day-open range. Day r

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading Booster by DGT
43 stars

This indicator evaluates market momentum and risk by calculating trend metrics and volatility stats, displaying them in an on-chart table pane. It measures short-term and long-term trend strength via two MACD configurations built on three customizable EMA leng

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

This indicator plots a relative strength index in a separate pane. It calculates RSI from the average of the previous ten opens rather than the current bar, so that source does not change during the live candle. A moving average of the RSI is plotted and can b

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of No Repaint - Relative Strength Index
29 stars

This overlay indicator builds trend ranges from a Donchian midpoint. It takes the highest high and lowest low over a user length, averages them, and holds that basis until the midpoint changes. When the basis updates, it sets a range from the close standard de

Indicator v5 TrendVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Donchian Trend Ranges [AlgoAlpha]
24 stars

This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing
16 stars

A trend-following strategy based on Ed Seykota's Donchian breakout framework, modified to take a single full-risk entry instead of pyramiding multiple units. It enters long or short on 55-bar channel breakouts with ATR-based position sizing and an initial stop

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 15: Single Position

TPCharts ADR

by TPCharts
10 stars

TPCharts ADR calculates average daily, weekly, monthly and yearly ranges from a simple moving average of prior high-minus-low ranges. It projects each range into high and low levels, draws those levels as lines on the price chart, and labels the pip or tick di

Indicator v4 Volatility & bandsSupport & resistance Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of TPCharts ADR

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