Pine Library · 2,503 open-source scripts

Free Volatility and Band Pine Scripts (page 47)

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

My Strategy

by hasnocool
106 stars

This overlay strategy combines a Schaff Trend Cycle, an ATR trailing stop, and a fixed 200-period simple moving average. It enters long when the cycle turns upward, the ATR bias is bullish, and price is at or above the average, and short on the opposite alignm

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of My Strategy

Sergiosqueeze

by ruckard
13 stars

This strategy executes trades based on the Squeeze Momentum indicator and overlays directly on the price chart. It opens long positions when momentum is positive and active, and enters short positions when momentum is negative and active. Trades exit when the

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze

LinReg Bands

by g-moe
3 stars

LinReg Bands calculates a linear regression channel and multiple deviation bands over a user-defined length directly on the price chart. It determines the linear regression slope using weighted and simple moving averages, then projects three configurable upper

Indicator v5 TrendVolatility & bands Repaints
Updated 5 months ago · None stated GitHub repository of LinReg Bands

Sergiosqueeze B002

by ruckard
13 stars

Sergiosqueeze B002 is an automated trading strategy based on Squeeze Momentum and moving average closing lines designed to work with Zignaly copy trading webhooks. It executes long or short positions based on momentum direction and exits when momentum weakens.

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze B002

This indicator calculates synthetic fear and complacency gauges based on the Williams VIX Fix formula for both bullish and bearish directions. It overlays standard deviation bands, percentile lookbacks, and context moving averages to identify volatility spikes

Indicator v6 Volatility & bandsOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Williams VIX Fix Advanced [WavesUnchained]

SmartTrend Pro

by vedkanani123
1 stars

A trend indicator on the price chart with an adaptive volatility trend engine controlled by a sensitivity and an ATR period. Signals get a score from 0 to 100, with a minimum score and a strong-only option, and pullback signals can be added. A trend cloud, an

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of SmartTrend Pro
106 stars

This strategy backtests hammer and star candlestick patterns on the price chart. It filters setups with an exponential moving average slope angle, optional swing high and low checks, and entry-candle size versus ATR. It opens one position at a time inside a us

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of NoSKi Hammer Star Backtester %

Sergiosqueeze D004

by ruckard
13 stars

Sergiosqueeze D004 is a trading strategy designed for automated execution via Zignaly alerts. It utilizes squeeze momentum logic to open long positions when momentum expands positively and short positions when momentum expands negatively, exiting when the sign

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze D004

Statistical Trailing Stop

by vedkanani123
1 stars

An overlay indicator that draws a trailing stop whose distance comes from a statistical distribution of recent price movement. Data length sets the sample window, distribution length sets how much history is normalised, and a base level setting picks one of fo

Indicator v6 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of Statistical Trailing Stop
99 stars

Calculates and plots Fractal Chaos Bands directly on the price chart. The indicator identifies local fractal swing highs and lows, tracking the highest fractal high and lowest fractal low across a user-specified lookback period using monotonic deques. The resu

Indicator v6 Volatility & bandsSupport & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Fractal Chaos Bands (FCB)
13 stars

This indicator plots a squeeze-momentum histogram in a separate pane. It compares Bollinger Bands with Keltner Channels to mark squeeze on, squeeze off, or no squeeze, and colors the zero line by that state. The histogram is a linear regression of close agains

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TradingLatino Abajo A001

StealthTrail SuperTrend

by vedkanani123
1 stars

An ATR SuperTrend indicator on the price chart with an adaptive multiplier that scales with volatility relative to its average. Flips use a cushion measured in ATR and a signal cooldown, and can require an RSI threshold and optional volume. Risk presets draw a

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of StealthTrail SuperTrend

KC Combo v2

by nishpa800
1 stars

Draws a Keltner Channel and ATR supertrend on the price chart and marks candles where gated combinations of pullback, displacement and volume detectors fire together. Inputs set the base moving average, channel length, ATR multiplier and displacement threshold

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo v2

Tn Sovereign VAMO

by raybird
1 stars

Calculates a Volatility-Adjusted Momentum Oscillator (VAMO) by dividing the price Rate of Change by the Average True Range, smoothed by an EMA signal line. Long positions enter when VAMO crosses above its signal line above zero, and short positions enter on be

Strategy v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign VAMO

Relative Vigor Index

by hasnocool
106 stars

This strategy overlays two exponential moving averages and ATR-based price targets directly on the price chart while calculating the Relative Vigor Index internally. It enters long positions when the RVI line crosses above its signal line during an established

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Relative Vigor Index
13 stars

TradingLatino Abajo B002 is a momentum and volatility indicator that calculates a Squeeze Momentum oscillator in a separate pane. It compares Bollinger Bands and Keltner Channels to detect squeeze conditions while calculating momentum using linear regression b

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TradingLatino Abajo B002
1 stars

A SuperTrend-style indicator on the price chart that can tune its ATR length and multiplier automatically from a profile of the instrument over a lookback window. It adds multi-timeframe confluence with selectable strictness and an optional machine-learning si

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of StealthTrail SuperTrend ML Pro

KC Combo v3

by nishpa800
1 stars

Draws a Keltner Channel and ATR supertrend on the price chart and marks candles where gated combinations of pullback, displacement and volume detectors fire together. Inputs set the base moving average, channel length, ATR multiplier and displacement threshold

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo v3
13 stars

Calculates and plots a smoothed variation of the Squeeze Momentum indicator in a separate pane. It identifies market compression and expansion states by comparing Bollinger Bands with Keltner Channels, while tracking momentum via linear regression. Settings al

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TradingLatino Abajo D002
7 stars

The MACD RSI EMA Aggressive indicator generates momentum and trend-following signals on the price chart. It combines a MACD crossover or crossunder with an RSI threshold filter, price location relative to an Exponential Moving Average, volume expansion above a

Indicator v5 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of MACD RSI EMA Aggressive + ATR SLTP

Heat Map Seasons

by regalouisei
2 stars

Heat Map Seasons plots a linear regression of typical price and colors each price bar by how far close sits from that line. It normalizes the gap with standard deviation, clamps extreme values, and maps them from aqua through yellow to red using a heat-sensiti

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Heat Map Seasons

ORION: Hybrid Strategy

by eddiebelaval
7 stars

This strategy identifies volatility breakout opportunities by constructing dynamic ATR-based price boxes and detecting volatility squeezes. Trades are filtered using an exponential moving average trend condition and designated session hours. Entries trigger up

Strategy v5 Volatility & bandsBreakout
Updated 3 months ago · None stated GitHub repository of ORION: Hybrid Strategy
1 stars

Mirror Oscillator Pro is a momentum oscillator plotted in a separate pane. It detects pivot highs and lows on a user-selected timeframe and price source using specified pivot lengths. The indicator builds multiple bands including highest-lowest ranges, ATR ban

Indicator v5 Oscillators & momentumVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Mirror Oscillator Pro by Morindok

SuperTrend Recovery

by vedkanani123
1 stars

A SuperTrend variant for the price chart using ATR bands around the midpoint of each bar. When price moves against the level where the trend last switched by more than a threshold in ATRs, the band moves toward price by a small percentage weight, so the trend

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of SuperTrend Recovery

Test-020-Freq

by ricardosantos79
261 stars

This indicator counts how often rounded high-low ranges appear. After the first 100 bars, it measures the highest high and lowest low for every lookback from 1 to 100 bars, converts each range into bins of ten minticks, and stores a hit count in a large intege

Indicator v4 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Test-020-Freq
7 stars

The Per Bak Self-Organized Criticality indicator calculates a composite fragility score by blending weights for tail risk from the SKEW index, volatility regimes from VIX terms, credit stress from HYG and LQD, and positioning from short volume data. It plots t

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Per Bak Self-Organized Criticality

Synapse Trail Pro

by vedkanani123
1 stars

A trailing-stop trend indicator on the price chart. The trail is based on an EMA with an ATR band whose multiplier can adapt to volatility, and a ratchet option stops the trail from loosening. Signals receive a quality score and can be filtered by a minimum sc

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Synapse Trail Pro

Supertrend

by TWODS-CAPITAL
37 stars

This indicator plots the Supertrend line on the price chart using TradingView's built-in Supertrend calculation. It derives the line from the average true range and a multiplier, then colors an uptrend green and a downtrend red. A light fill sits between the c

Indicator v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Supertrend

2 Candles Inside ATR

by hasnocool
106 stars

2 Candles Inside ATR is an overlay script that measures volatility compression across two consecutive candles. It calculates a smoothed Average True Range (ATR) and compares it against the combined high and low range of the current and previous bars. When the

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of 2 Candles Inside ATR

Supertrend Strategy

by TWODS-CAPITAL
37 stars

This strategy uses the built-in Supertrend calculation to generate long and short trade entries based on trend reversals. It triggers a long position when the Supertrend direction flips to indicate an uptrend and a short position when it flips to indicate a do

Strategy v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Supertrend Strategy

Ichimoku Kinkō Hyō

by regalouisei
2 stars

This indicator plots an enhanced version of the traditional Ichimoku Kinkō Hyō on the main price chart. It calculates adaptive Tenkan-Sen and Kijun-Sen lines using dynamic lookback periods adjusted by volume, ATR volatility, and Chikou trend filters. Users can

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Ichimoku Kinkō Hyō
106 stars

This overlay strategy plots a two-timeframe Ichimoku setup on the price chart, with Tenkan, Kijun, Chikou, and Kumo from a base higher timeframe and an optional highest-timeframe cloud. It allows two entries in the same direction and uses ATR-based trailing st

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of 2Tier Ichimoku Pyramiding [Takazudo]

The Morindok Dynamic Gann Spiral Ratio indicator computes time and price angles derived from a dynamic N value based on volatility and a selected price source. It calculates a ratio between these angles and generates buy or sell signals when the ratio approach

Indicator v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Morindok Dynamic Gann Spiral Ratio

Trend Context

by vedkanani123
1 stars

A price-chart indicator that classifies the market as up, down or neutral using an adaptive baseline whose smoothing speed follows price efficiency. A weighted score combines price location against ATR zones, baseline slope, momentum and position within the re

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Trend Context
106 stars

This strategy identifies trend-following entries using a triple exponential moving average alignment and ATR-based exits on the main price chart. Long signals trigger when the fast EMA is above the medium EMA and medium is above slow, accompanied by a close ab

Strategy v4 Moving averagesVolatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3 EMA + Stochastic RSI + ATR

Uptrick Vector Trail Trend

by vedkanani123
1 stars

A price-chart indicator that estimates trend with a smoothed velocity and a projected vector, then draws an ATR-based trailing line coloured by direction. Up and down signals appear on trend changes. Optional dynamic take-profit markers use momentum and a Z-sc

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Uptrick Vector Trail Trend
1 stars

This strategy detects value area rejections on the price chart. It calculates a fair value midpoint using a simple moving average of length 50 and ATR-based bands. Bullish and bearish rejection signals trigger when price crosses the value area boundaries and c

Strategy v6 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Value Area Rejection v6

Trailering H005

by ruckard
13 stars

Trailering H005 is a trading strategy template designed for automated position management and execution via Zignaly webhooks, originally tested on BTCUSDT on the 1-hour timeframe. It evaluates price excursion across configurable sub-strategy lookback periods t

Strategy v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Trailering H005
1 stars

A strategy that sorts the market into quiet, active and extreme regimes using ATR as a percentage of price against two thresholds. Position size is 15 percent of equity in quiet markets, 25 percent in active ones, and zero in extreme ones. Entries are long onl

Strategy v6 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of TN Volatility Regime Sovereign

Test-033-Distribution

by ricardosantos79
261 stars

This indicator measures the absolute bar-to-bar change of the close and tracks the smallest and largest of those changes seen so far. It maps each change onto a 0 to 100 scale between that minimum and maximum, then, on the last bar only, counts how often each

Indicator v4 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Test-033-Distribution

Trailering I005

by ruckard
13 stars

Trailering I005 is a crypto-focused trading strategy template designed for automated execution through Zignaly webhooks. It evaluates price excursion to minimize risk and maximize returns. The strategy supports take-profit targets, trailing take-profits, fixed

Strategy v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Trailering I005
3 stars

This strategy combines MACD and Supertrend to generate entries on the price chart. The MACD oscillator uses selected source, fast length 12, slow 26, signal 9 and EMA or SMA. Supertrend on higher timeframe 15 provides trend direction and ATR trailing stop. Sig

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of MACD VWMA Strategy

VWMA True Range

by vedkanani123
1 stars

A separate-pane indicator that applies a volume-weighted moving average to true range over a chosen period, with optional smoothing. Long and short thresholds set when the reading counts as a bullish or bearish state. Options include a fast Hull line, a band d

Indicator v6 Volatility & bandsVolume
Updated 2 months ago · None stated GitHub repository of VWMA True Range
106 stars

This trading strategy combines three Exponential Moving Averages (8, 14, and 50 periods by default) with Stochastic RSI and Average True Range (ATR). It enters a long position when EMA 1 is above EMA 2, EMA 2 is above EMA 3, and the Stochastic RSI %K line cros

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 3 x EMA + Stochastic RSI + ATR

Trailering J009

by ruckard
13 stars

Trailering J009 is a long-only strategy designed for cryptocurrency trading with Zignaly integration. It evaluates price excursion across multiple sub-strategy trigger conditions to size trade entries and refine exit points. The system features flexible exit m

Strategy v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Trailering J009

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