Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 39)

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

Markov State Engine classifies market conditions into six distinct regimes, including strong trends, weak trends, compression, and expansion. It evaluates historical state transitions using an exit-conditional Markov model with Laplace smoothing to estimate re

Indicator v6 AI / machine learningTrend
Updated 3 days ago · MIT GitHub repository of Markov State Engine [WavesUnchained]

Dual Super Trend Indicator

by eddiebelaval
7 stars

The Dual Super Trend Indicator calculates and evaluates Supertrend values across two customizable timeframes to determine combined trend direction. A bullish signal triggers when both timeframes register a bullish Supertrend direction, while a bearish signal t

Indicator v6 TrendVolatility & bands Repaints
Updated 3 months ago · None stated GitHub repository of Dual Super Trend Indicator

Strategy Short Template

by krosenfeld7
5 stars

Strategy Short Template provides a base structure for backtesting short-only trading strategies. It includes modular risk management with take profit and stop loss levels calculated using fixed percentages or Average True Range (ATR) multipliers. Users can sel

Strategy v4 Volatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Strategy Short Template

Supertrend [trugurpala]

by trugurpala
4 stars

This indicator calculates the ATR-based Supertrend line overlaid directly on the price chart to identify market trend direction. It computes upper and lower bands around the median price using Average True Range (ATR) scaled by a configurable multiplier. The s

Indicator v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Supertrend [trugurpala]
1 stars

This Pine Script strategy identifies trend changes by checking for crossovers between fast and slow EMAs on the current timeframe. It confirms the trend with a higher timeframe EMA confluence gate set to 60 minutes. The strategy draws its signals directly on t

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of MTF probe 11 - HTF bracket manual trail

DEPV2 DEBUG S28

by YuceSezar89
1 stars

DEPV2 DEBUG S28 is a Pine Script v6 indicator that draws in a separate pane. It watches up to twenty user-chosen symbols, defaulting to Binance perpetual crypto pairs, and combines four method classes: trend, momentum, volatility, and volume. Signal mode can u

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S28

Supertrend

by webcrack4
1 stars

This indicator calculates a classic Supertrend line on the price chart using Average True Range (ATR) and a user-defined multiplier. It identifies prevailing market trends by dynamically trailing support and resistance levels. When price closes across the band

Indicator v4 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of Supertrend

Price Spike Detector

by ivansoft
1 stars

An indicator in a separate pane that measures candle wick sizes, the distance from the body to the high and to the low, and shows them as columns for the chart timeframe along with 15-minute and 60-minute versions requested with lookahead. Percentile levels ov

Indicator v6 Volatility & bandsCandlestick patterns Repaints
Updated 1 year ago · None stated GitHub repository of Price Spike Detector

ATR RSI Strategy v2

by hasnocool
106 stars

This strategy combines Average True Range (ATR) and the Relative Strength Index (RSI) to generate volatility-filtered momentum trades on the price chart. It checks whether a normalized ATR moving average falls within user-defined bounds and requires current AT

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR RSI Strategy v2

ATR

by be-thomas
65 stars

This indicator calculates the Average True Range over a user-chosen period and shows the latest value in a single-cell table at the top right of the price chart. A helper builds a format string from the symbol's minimum tick so the number is printed to tick pr

Indicator v4 Volatility & bandsScreeners & dashboards
Updated 6 days ago · GPL-3.0 GitHub repository of ATR
16 stars

This strategy trades Donchian breakouts measured on weekly bars while orders execute on the chart timeframe. It allows long and short entries when price breaks the prior weekly channel and exits against the shorter weekly channel. Position size risks a set per

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 4: Weekly Donchian
4 stars

This trend-following strategy calculates the Supertrend indicator using average bar prices and Average True Range (ATR). It plots a color-coded trend line directly on the price chart along with buy and sell shapes. The strategy enters a long position when the

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

The SVIX Bollinger Bands Strategy V2 uses Heikin-Ashi price calculations to plot customized Bollinger Bands and Keltner Channels directly on the price chart. It triggers a long entry when the Heikin-Ashi close crosses above the lower Bollinger Band. The strate

Strategy v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of SVIX Bollinger Bands Strategy V2

DEPV2 Debug S3

by YuceSezar89
1 stars

Calculates and visualizes multi-symbol signals across four distinct metric categories: trend, momentum, volatility, and volume. It tracks up to 20 cryptocurrency pairs simultaneously, supporting signal combination modes like single-method execution, simultaneo

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug S3
1 stars

A Bollinger Band breakout strategy with Spanish-language settings. It goes long when price closes above the upper band and short when it closes below the lower band, limited to a configurable date range and a cooldown of bars between trades. Three take-profit

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of Bollinger - 3 TPs (Frecuentes)

This strategy plots multi-timeframe Bollinger Bands on the price chart and trades mean reversion around them. It enters long when the close is below the higher-timeframe lower band and, if enabled, short when the close is above the upper band. An optional high

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 2 months ago · None stated GitHub repository of MTF Bollindger Bands Strategy [Alorse]

This strategy executes breakout trades based on historical high and low entry bands and manages risk using adaptive ATR trailing stop-loss levels. It enters long positions when the close breaks above the lookback band and short positions when it breaks below.

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR trailing SL tight to slack [Takazudo]
16 stars

This trend-following strategy executes long and short trades based on Donchian channel breakouts directly on the price chart. It enters positions when price breaks a multi-bar high or low and exits on opposing Donchian channel band crosses. Risk management inc

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 5: Accelerated Pyramid

This strategy trades long and short on the price chart using a multi-timeframe TradingLatino setup. It requires EMA 10 to cross or sit above or below EMA 55 on the one-hour, four-hour, and daily charts, together with a positive ADX slope, a directional monitor

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino A010
9 stars

This indicator plots an anchored MIDAS support and resistance curve from launch-anchored volume-weighted price on the price chart. It adds two configurable volume-weighted standard-deviation, ATR, or hybrid bands and a topfinder or bottomfinder accelerated exh

Indicator v6 Mean reversionSupport & resistance Repaints
Updated 3 days ago · MIT GitHub repository of MIDAS 2.0 [WavesUnchained]
7 stars

This price-chart overlay compares market effort with price result and does not generate buy or sell signals. Effort combines current volume divided by a moving average of volume with true range divided by ATR. Result uses absolute net progress over a lookback

Indicator v6 VolumeVolatility & bands
Updated 3 months ago · None stated GitHub repository of Effort vs Result Context Overlay

DTEK Candles

by g-moe
3 stars

This indicator calculates dual trend filters by combining a custom SuperTrend with a Commodity Channel Index ATR trailing stop. The SuperTrend component utilizes customizable moving average types, including Hull, Exponential, and Simple Moving Averages. When p

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of DTEK Candles

Wick Hunter VWAP

by avatar-lavventura
2 stars

This indicator calculates the volume-weighted average price using a specified period and plots it on the price chart along with upper and lower bands set at a percentage deviation above and below the VWAP value. The bands serve as reference levels for potentia

Indicator v4 Moving averagesSupport & resistance
Updated 7 months ago · None stated GitHub repository of Wick Hunter VWAP

Wave Trend Overbought Oversold

by wynnforthework
2 stars

This indicator plots the WaveTrend Oscillator in a separate pane. It computes an EMA of normalized price deviations from the median price divided by standard deviation, then applies an SMA to generate the oscillator line. Signals trigger on overbought conditio

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Wave Trend Overbought Oversold

HMD ATR Trailing Stop Tool

by Web3Degenerate
2 stars

The HMD ATR Trailing Stop Tool calculates and plots a dynamic trailing stop line directly on the price chart. Users select a Long or Short direction, an anchor start time, structure lookback bars, and Average True Range parameters. For long positions, the stop

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of HMD ATR Trailing Stop Tool

DEPV2 DEBUG S30

by YuceSezar89
1 stars

This indicator monitors and analyzes up to twenty cryptocurrency perpetual futures pairs from a separate pane. It evaluates market conditions across four distinct analytical dimensions: trend, momentum, volatility, and volume. The script tests signal confirmat

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S30
330 stars

This strategy plots Bollinger Bands on the chart timeframe and a second pair from a selectable higher timeframe. It averages the two upper bands and the two lower bands, then shades the space between matching bands. It opens a long when the close falls below t

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 2 months ago · None stated GitHub repository of Multi Bollinger Bands [Alorse]
257 stars

An overlay indicator that combines an ATR-based SuperTrend trailing stop with an integrated RSI-derived midline calculation on the price chart. The SuperTrend uses an ATR period and factor multiplier to plot dynamic green or red trend lines based on price dire

Indicator v5 TrendVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of SuperTrend ATR + RSI

This strategy enters long or short when price closes beyond a Donchian channel and can require a slow moving average, called the tide, to agree with the direction. It sizes each unit from ATR risk, sets an initial ATR stop, and adds units after further ATR mov

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 5: Close-Confirmed + Tide

This strategy enters long or short when eight conditions align over the last two bars. It requires EMA 10 and EMA 55 alignment on the one-hour, four-hour and daily charts, a positive ADX slope, matching monitor direction, and price relative to a 400-bar point

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino B002

Modern Trend Regime classifies price action into trend, range, and transition modes using a score rather than a strict conjunction of conditions. It builds fast, base, and slow structure from a price-range, EMA, WMA, or SMA calculation, then compares ATR-norma

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

EMA System

by eddiebelaval
7 stars

EMA System plots four exponential moving averages on the price chart and marks a long-only pullback setup. It treats price above the 200 EMA and the 21 EMA above the 50 EMA as a valid trend, then flags a buy when price is near the 21 EMA, volume is below its s

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of EMA System
4 stars

This strategy plots a fast and a slow exponential moving average on the price chart and enters when they cross. A long opens when the fast average crosses above the slow average, and a short opens on a cross below unless long-only mode is on. An optional trend

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Universal Strategy [trugurpala]
2 stars

The Dynamic Equity Allocation Model is an indicator that calculates and plots dynamic allocation percentages between equity and cash in a separate pane. It weighs five factors including market regime detection, risk metrics, valuation, sentiment, and macro con

Indicator v6 Screeners & dashboardsVolatility & bands
Updated 8 months ago · None stated GitHub repository of Dynamic Equity Allocation Model

HMD Bollinger Band Volatility

by Web3Degenerate
2 stars

This indicator measures volatility changes by tracking the expansion and contraction of Bollinger Bands over time. It calculates standard Bollinger Bands, measures the percentage difference in band width relative to a user-defined lookback period, and identifi

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of HMD Bollinger Band Volatility

SMC Hold Manager

by skipp-dev
1 stars

SMC Hold Manager is a visual decision-support overlay for managing Smart Money Concept trade positions. It connects to the SMC Engine BUS v2 system or accepts manual trade inputs to display trade lifecycle levels on the price chart. The indicator tracks entry

Indicator v6 SMC / ICT / price actionVolatility & bands
Updated 4 days ago · None stated GitHub repository of SMC Hold Manager
1 stars

This validation strategy evaluates the execution timing of stop loss and take profit orders in Pine Script. It enters a single long position at fixed daily wall-clock times (00:00 and 12:00 UTC) whenever the strategy is flat. Stop loss and limit profit targets

Strategy v6 Volatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Parity Probe 01 - Stop/Limit Timing

DEPV2 DEBUG S32

by YuceSezar89
1 stars

DEPV2 is a multi-symbol cryptocurrency indicator that processes 20 major crypto pairs including BTC, ETH, SOL, BNB and others. It evaluates four signal classes consisting of trend, momentum, volatility and volume. Signals are generated according to user-select

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S32
228 stars

This strategy identifies trade opportunities based on candlestick wick imbalances relative to the Average True Range. It enters positions when candle wicks exceed defined thresholds and filters out doji candles using a minimum body ATR requirement. Exits are h

Strategy v6 Candlestick patternsVolatility & bands Repaints
Updated 3 months ago · None stated GitHub repository of Super Negative R:R Wick Strategy

Bubbles Indicator

by capissimo
114 stars

The Bubbles Indicator measures volatility squeezes and expansion bursts using Bollinger Bands combined with a sinusoid oscillator and RSI divergence. It processes price data through scaled Bollinger Bands to highlight volatility changes while confirming trend

Indicator v4 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Bubbles Indicator
47 stars

The Interquartile Range (IQR) indicator measures the statistical dispersion of price data over a user-defined lookback window. It computes the 25th percentile (Q1) and 75th percentile (Q3) using array sorting and linear interpolation, plotting the difference b

Indicator v6 Volatility & bands
Updated 8 months ago · MIT GitHub repository of Interquartile Range (IQR)

Envelope

by TWODS-CAPITAL
37 stars

This indicator plots a percentage envelope around a moving average of the selected source on the price chart. It computes a simple or exponential moving average as the basis, then places upper and lower bands a fixed percentage above and below that line. The l

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · MIT GitHub repository of Envelope
16 stars

Seykota Alt 6 Pure ATR Stop is a trend-following strategy based on Donchian channel breakouts and ATR volatility trailing stops. It enters trades when price breaks out beyond the Donchian lookback channel, provided optional market regime and volume filters are

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 6: Pure ATR Stop

This strategy trades long and short using TradingLatino rules as ABCBitcoin interprets them. Entries need EMA 10 crossing or aligned with EMA 55 on the one-hour, four-hour, and daily charts, agreeing ADX slope and directional monitor, and price on the matching

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino C003

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