Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 3)

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

Bollinger Squeeze Breakout

by LePotoRico2105
4 stars

Calculates standard Bollinger Bands and identifies volatility contraction when band width drops below a percentage of its moving average. The strategy enters long positions when a confirmed candle closes above the upper band following a recent squeeze, and ent

Strategy v5 Volatility & bandsBreakout
Updated 6 months ago · MIT GitHub repository of Bollinger Squeeze Breakout

Bollinger Bands

by YooooungLee
4 stars

This indicator plots Bollinger Bands on the price chart. It uses a lookback length and a multiplier, the usual controls for the middle band and the distance of the upper and lower bands. The length setting changes how many bars enter the calculation, and the m

Indicator v6 Volatility & bands
Updated 10 months ago · Apache-2.0 GitHub repository of Bollinger Bands

VAMO Crossover Strategy

by TPTBusiness
4 stars

The VAMO Crossover Strategy is a scalping system that combines momentum and volatility into a Volatility-Adjusted Momentum Oscillator (VAMO). It calculates momentum using Rate of Change divided by ATR and generates trade signals when VAMO crosses its EMA signa

Strategy v6 Oscillators & momentumVolatility & bands
Updated 12 months ago · MIT GitHub repository of VAMO Crossover Strategy

GainzAlgo V2 [Alpha]

by krishnandank
4 stars

This indicator generates buy and sell signals based on engulfing candlestick patterns, a candle stability ratio relative to true range, RSI thresholds, and a multi-bar price momentum condition. It draws visual signal labels on the chart alongside suggested tak

Indicator v5 Candlestick patternsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of GainzAlgo V2 [Alpha]

This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes. It enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered b

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of XAUUSD High Probability Strategy

UT Bot Alerts

by AntSan813
4 stars

This indicator implements the UT Bot Alerts system by tracking price action against an Average True Range trailing stop line directly on the price chart. It calculates volatility bands using user-defined ATR length and sensitivity multiplier parameters. When t

Indicator v4 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of UT Bot Alerts

Vol-Targeted Position Size

by Robot-Wealth
4 stars

This indicator calculates volatility-targeted position sizes using an exponentially weighted moving average volatility forecast. It plots the target position size along with upper and lower no-trade buffer boundaries in a separate pane. A dashboard table in th

Indicator v5 Volatility & bandsScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of Vol-Targeted Position Size
4 stars

This strategy executes trend-following trades based on Bollinger Band breakouts confirmed by a long-term moving average filter. A long position opens when the price crosses above the upper Bollinger Band, provided the band spread meets a minimum threshold and

Strategy v5 Volatility & bandsTrend
Updated 2 years ago · None stated GitHub repository of Bollinger Trend - Strategy V1

STPP20 + ADX

by rKv4dr4t
4 stars

This strategy combines a Pivot Point SuperTrend with an Average Directional Index (ADX) filter and a 21-period simple moving average. It enters long positions when the close crosses above the SuperTrend trailing band while remaining above the moving average an

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of STPP20 + ADX
4 stars

This overlay strategy combines a Supertrend with a k-nearest-neighbors filter. It smooths price and the Supertrend with weighted moving averages, then uses neighbor count and lookback length to form an AI trend signal. Traders can allow long, short, or both di

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of AI Volume Supertrend Strategy

3 Bar Gap

by kevinhhl
4 stars

The 3 Bar Gap indicator identifies fair value gaps and price imbalances across a three-bar pattern directly on the price chart. It calculates displacement between the price boundaries of two bars ago and the current bar. To filter out market noise during quiet

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 3 years ago · None stated GitHub repository of 3 Bar Gap
4 stars

This TradingView indicator provides scalping money management tools by displaying a customizable panel on the chart. It shows risk management details such as deposit size, maximum risk per trade as a percentage, and commission adjustments. The indicator plots

Indicator v5 ScalpingScreeners & dashboards
Updated 3 years ago · MIT GitHub repository of Scalping Money Management

Bollinger Bands

by bfoura
4 stars

This indicator calculates standard Bollinger Bands using a simple moving average and standard deviation multiplier. Instead of plotting continuous band lines, it evaluates whether the current price trades within a configurable threshold distance of the band bo

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

This strategy plots custom upper and lower bands on the price chart using configurable moving average types and deviation multipliers. It opens long or short positions when price crosses above or below these envelopes, with optional RSI oscillator filters for

Strategy v5 Volatility & bandsMoving averages
Updated 4 years ago · MIT GitHub repository of Bollinger Bands Strategy
4 stars

The VIX Fix Double Pleasure indicator calculates standard synthetic Williams VIX Fix to spot market bottoms and combines it with a reversed VIX Fix calculation to detect market tops. It renders both metrics as histograms and lines in a separate pane. By evalua

Indicator v4 Volatility & bandsOscillators & momentum
Updated 4 years ago · MIT GitHub repository of VIX Fix: Double Pleasure

This strategy plots three EMAs (50, 100, 200) on the price chart for crossover signals. Long entries occur when fast EMA crosses above mid EMA and close exceeds slow EMA; short entries when fast crosses below mid and close is below slow. It uses ATR trailing s

Strategy v4 Moving averagesTrend
Updated 5 years ago · MIT GitHub repository of Algo Trading Simple 3-EMA Strategy + Trailstop
4 stars

This indicator overlays four simple moving averages and marks crosses between the short and basis averages on the price chart. It also plots Bollinger Bands around the basis average using a standard-deviation multiplier and fills the band. Separate resistance

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · GPL-3.0 GitHub repository of Bollinger Bands/MA Cross

Supertrend MTF Heikin Ashi

by setyadhiputrad
4 stars

This indicator calculates and plots Supertrend lines based on Heikin Ashi price data for both the current chart timeframe and a higher timeframe. It determines trend direction by comparing prices against ATR-derived upper and lower bands, shifting colors and p

Indicator v4 TrendVolatility & bands
Updated 5 years ago · GPL-3.0 GitHub repository of Supertrend MTF Heikin Ashi

Bollinger Squeeze

by degenview
3 stars

This indicator calculates standard Bollinger Bands using a simple moving average basis along with upper and lower volatility bands. It measures normalized band width to detect squeeze conditions where the bands contract to their narrowest point over a specifie

Indicator v6 Volatility & bandsMoving averages
Updated yesterday · GPL-3.0 GitHub repository of Bollinger Squeeze
3 stars

This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a

Strategy v5 Volatility & bandsBreakout
Updated 2 days ago · None stated GitHub repository of H4 布林ATR型態多單策略

GBPUSD H1 QuadLayer

by GifariKemal
3 stars

An institutional order block and EMA pullback indicator designed for GBPUSD on the 1-hour timeframe. It filters trading signals based on specific London and New York session kill zones, ATR volatility thresholds, signal quality metrics, and day or hour multipl

Indicator v5 SMC / ICT / price actionMoving averages
Updated 4 days ago · MIT GitHub repository of GBPUSD H1 QuadLayer
3 stars

The strategy plots SuperTrend and ADX indicators directly on the price chart. It generates long signals on SuperTrend bullish flips combined with ADX above the set threshold and closes positions on SuperTrend bearish flips or when stop-loss or take-profit leve

Strategy v5 TrendOscillators & momentum
Updated 12 days ago · None stated GitHub repository of OctaStack SuperTrend + ADX

This indicator calculates a multi-timeframe MACD line alongside signal lines and volatility bands in a separate chart pane. It offers nine customizable moving average types, including SMA, EMA, DEMA, TEMA, Hull MA, Volume Weighted MA, and Least Squares MA. Use

Indicator v5 Oscillators & momentumMoving averages
Updated 4 weeks ago · None stated GitHub repository of MACD Bands - Multi Timeframe [TradeMaster Lite]

KatanaFlow

by 7mertyavuz
3 stars

KatanaFlow is a trend-following overlay indicator that combines a Twin Range Filter with a smoothed moving average line to identify market direction and signal reversals. It calculates adaptive volatility bands using dual-period range smoothing to filter out p

Indicator v6 TrendVolatility & bands
Updated 3 months ago · MIT GitHub repository of KatanaFlow

Cyber HUD XAU

by panzmoravylab
3 stars

Cyber HUD XAU is an overlay indicator designed for XAUUSD that combines trend, momentum, and volatility filters. It calculates fast and slow ATR ratios alongside local price ranges to detect consolidation and chop filter states. The script evaluates candle bod

Indicator v6 Volatility & bandsOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Cyber HUD XAU
3 stars

The Linchuan Event Indicator plots multi-timeframe opening price zones alongside key moving averages and Bollinger Bands in a separate indicator pane. It tracks opening price lines and colored expansion zones across 5-minute, 30-minute, 1-hour, and 4-hour time

Indicator v5 Support & resistanceMoving averages
Updated 5 months ago · None stated GitHub repository of Linchuan Event Indicator

DIY Entry Signals

by benso87
3 stars

This indicator plots optional moving averages on the price chart and generates entry signals based on custom conditions from multiple technical indicators. Users select which indicators contribute to long or short signals, choose confirmation of candles, and c

Indicator v5 Oscillators & momentumMoving averages
Updated 6 months ago · MPL-2.0 GitHub repository of DIY Entry Signals

VW-ATR Strategy

by wesleyzilva
3 stars

Calculates a volume-weighted Average True Range by multiplying the standard ATR calculation by the current bar volume. The indicator plots this combined metric as a red line directly on the price chart. The main setting controls the lookback length for the ATR

Indicator v4 Volatility & bandsVolume
Updated 7 months ago · None stated GitHub repository of VW-ATR Strategy

GainzAlgo EA

by saadkhan371
3 stars

GainzAlgo EA is a trend-following strategy designed for scalping and intraday trading, optimized for gold and liquid assets. It establishes trend direction using a three-EMA alignment alongside RSI momentum filters and an optional higher-timeframe trend confir

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of GainzAlgo EA
3 stars

This strategy calculates standard Bollinger Bands and Average True Range to implement a basic mean-reversion system. It opens long positions when price drops below the lower band and short positions when price pierces above the upper band. Open trades are exit

Strategy v5 Mean reversionVolatility & bands
Updated 7 months ago · MIT GitHub repository of Bollinger Band Mean Reversion

DP2

by grinay
3 stars

DP2 is a price-chart strategy that looks for a short dump between the chosen from and to prices, optionally requiring a break of a multi-day low while ignoring moves larger than a dump cap. It can enter through classic, two-close, break-and-retest, ATR-stop, a

Strategy v6 Mean reversionVolatility & bands
Updated 8 months ago · MIT GitHub repository of DP2

RitstaR-Algo

by ritstar
3 stars

This overlay indicator scores each confirmed bar from zero to six using fast, slow, and trend EMAs, higher-timeframe bias, RSI, MACD, ATR, and volume. It plots buy and sell labels when the score meets the minimum entry threshold and exit labels when the opposi

Indicator v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of RitstaR-Algo

Stella's Bollinger Bands

by stella-entry
3 stars

This strategy plots Bollinger Bands on the price chart and trades a long-only mean-reversion idea. It enters when the close is below the lower band, or when the low touches that band if Touch mode is selected, and only while flat. With the opposite-band exit e

Strategy v6 Volatility & bandsMean reversion
Updated 8 months ago · MIT GitHub repository of Stella's Bollinger Bands

Liquidity Health Index (LHI)

by LucasRibeiroCaetano
3 stars

This indicator plots a composite Liquidity Health Index in a separate pane. It averages four 0 to 100 scores: the US 10-year minus 2-year yield spread, an inverse CBOE VIX score, an inverse MOVE index score, and the year-over-year change in the Fed balance she

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 11 months ago · Custom licence GitHub repository of Liquidity Health Index (LHI)

Supertrend Strategy

by dharaarpan7
3 stars

This strategy executes long trades based on the Supertrend indicator and candle color confirmation. It enters when a fresh bullish Supertrend flip occurs on a green candle and exits when the trend flips bearish on a red candle. It also places bracket orders wi

Strategy v6 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Supertrend Strategy

ATR-SB Algo

by TheMikerik
3 stars

This indicator tracks market trends using an ATR trailing line derived from close prices and a risk multiplier, inspired by the UT Bot algorithm. It plots the trailing line directly on the price chart, identifies bullish and bearish regime flips, highlights si

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of ATR-SB Algo
3 stars

This indicator plots ATR-based stop bands on the price chart. It smooths true range with a selectable moving average, multiplies it by a factor, and adds that distance to the high and subtracts it from the low. The upper plot is labeled as a short stop and the

Indicator v4 Volatility & bandsSupport & resistance

This trend-following strategy calculates asymmetric Bollinger Bands and overlays them on the price chart alongside a central moving average. It enters long positions when the price crosses above the upper band, provided an optional benchmark trend filter (chec

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Bollinger Band Trend Follow Strategy
3 stars

Advanced Option Price Estimator applies the Black-Scholes model to estimate call and put option prices directly on the main price chart. It uses standard normal distribution functions and Newton-Raphson iterations to calculate implied volatility across calcula

Indicator v5 Volatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced Option Price Estimator
3 stars

This strategy plots Bollinger bands and a simple moving average on the price chart. It opens a short when price crosses above the upper band while below the average, and a long when price crosses below the lower band while above the average. Entries are allowe

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of 周末布林带策略
3 stars

This Pine Script strategy plots a G-Channel and a 200-period Exponential Moving Average (EMA) directly on the price chart. It triggers buy signals when price crosses the lower G-Channel line while trading below the EMA line. Long positions are managed using Av

Strategy v4 TrendMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of G-Channel & EMA Strategy with ATR SL/TP

This indicator plots Linear Regression lines with deviation bands on the price chart to identify support and resistance levels. It filters signals using configurable EMA lines and optional Supertrend filter. A session filter restricts calculations to specified

Indicator v5 TrendSupport & resistance
Updated 3 years ago · None stated GitHub repository of Fedra Algotrading LR + TTP Indicator Lite

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