Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 62)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

ATR Indicator

by Web3Degenerate
2 stars

This educational script calculates trailing stop loss reference levels based on the Average True Range. It measures 14-period market volatility and projects potential long stop levels below the current low and short stop levels above the current high. The scri

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of ATR Indicator

WaveTrend Adv

by 7b809
1 stars

An overlay version of the WaveTrend oscillator whose lines are hidden by default, showing buy and sell labels on the price chart instead. A bullish or bearish cross of the two lines is signalled, optionally only when price is above or below a 200-period EMA. L

Indicator v5 Oscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of WaveTrend Adv
1 stars

The strategy plots fast and slow exponential moving averages with their difference as spread on the price chart. It enters long when the spread line crosses from negative to positive and short when crossing from positive to negative. Positions stay open until

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Tuple Return Custom Function
1 stars

A Pine Script v5 indicator in a separate pane that works with Hurst-style forward cycle projections known as future line of demand (FLD) lines. It offers seven FLD slots, each with an automatic or manual period and a bars-per-period multiplier, and a switch be

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Diamond Notation Pivots

Range Scalper

by knectardev
1 stars

Range Scalper marks support and resistance from the latest confirmed pivot low and pivot high. It treats price as range-bound when the distance between those levels, divided by the close, is at or below the range threshold. While that condition holds, it plots

Indicator v5 Support & resistanceBreakout
Updated 9 months ago · None stated GitHub repository of Range Scalper
1 stars

An alert-focused version of a multi-indicator divergence scanner. It checks pivot highs and lows on the price chart against MACD, MACD histogram, RSI, Stochastic, CCI, momentum, OBV, volume-weighted MACD, Chaikin Money Flow, MFI and the Stochastic Momentum Ind

Indicator v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Meta Divergence Alert

STDDEV & ATR Gap

by JohnsonHsiao
1 stars

This indicator calculates the difference between the standard deviation and average true range of the closing price over a specified period. It plots this gap as a histogram in a separate pane, using different colors to indicate volatile or ranging conditions.

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of STDDEV & ATR Gap
330 stars

This separate-pane indicator plots a MACD line, a signal line, and a histogram whose colors show whether the histogram is rising or falling above or below zero. The oscillator and signal can each use an SMA or an EMA, and an optional marker highlights MACD and

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MTF + MACD [Alorse]

FunctionDatestring

by ricardosantos79
261 stars

This Pine Script v5 library turns a Unix timestamp into zero-padded text for date, time, or both. It exports datetime, date_, and time_, each defaulting to the current time, and prefixes single-digit months, days, hours, minutes, and seconds with a leading zer

Library v5
Updated 4 years ago · None stated GitHub repository of FunctionDatestring
257 stars

Snag - Auto Trade Futures is an overlay indicator designed for trend tracking using weighted moving averages (WMAs). It plots 13-period, 48-period, and 200-period WMAs directly on the price chart and identifies momentum shifts when these averages cross. When f

Indicator v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Snag - Auto Trade Futures

This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced VWAP-Momentum Pullback Trend Qualifier
65 stars

This indicator defines a function that tracks bar updates by incrementing a counter exclusively on new bars detected via barstate.isnew in Pine Script v5. It plots the resulting update number in a separate pane as a visual reference for bar state concepts. The

Indicator v5 Sessions & time Repaints
Updated 6 days ago · GPL-3.0 GitHub repository of V5 Concepts Bar States 03
55 stars

This indicator plots support and resistance from confirmed pivot highs and lows on the price chart. It uses a fixed lookback of 20 bars on each side. A pivot high draws a solid red horizontal line that extends to the right, and a pivot low draws a dashed green

Indicator v5 Support & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Dynamic Pivot S/R Lines

Daily Segment Probabilities

by TamaraKGreen
46 stars

Daily Segment Probabilities is an overlay indicator that lays out twelve percentage bands around the previous day's high and low, from 100 percent below that range to 200 percent above it, in 25 percent steps. It draws previous-day high and low lines and segme

Indicator v5 Support & resistanceScreeners & dashboards
Updated 8 weeks ago · None stated GitHub repository of Daily Segment Probabilities

Connors RSI

by TWODS-CAPITAL
37 stars

Calculates the Connors RSI composite momentum oscillator, combining a short-term Relative Strength Index, an Up/Down streak length RSI, and a Percent Rank of the one-period Rate of Change. The three components are averaged together to output a single value bou

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Connors RSI

FairValueGap A008

by ruckard
13 stars

FairValueGap A008 is an automated strategy template designed for integration with the Zignaly trading platform. It uses customizable moving average filters (Curie closing lines) to generate buy and sell signals directly on the main price chart. The strategy fe

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of FairValueGap A008

RSI Signal Alert

by suyons
7 stars

This indicator calculates Relative Strength Index values across multiple selectable timeframes to generate trade signals overlaid directly on the price chart. It checks for RSI threshold crossings on a lower timeframe while confirming trend conditions on a hig

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of RSI Signal Alert
6 stars

This indicator maps session-based Candle Range Theory (CRT) cycles by identifying range formation, manipulation, and distribution phases directly on the price chart. It projects range boxes, supply and demand zones, midpoints, and manipulation trendlines accor

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Pro

Triple_EMA_STEPFUN

by eltonaguiar
4 stars

This trend-following strategy generates long and short entries based on the alignment of three exponential moving averages and price position relative to the fastest EMA. An optional RSI momentum filter can confirm directional bias. By default, exits occur on

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Triple_EMA_STEPFUN

CSW Pro Panel

by g-moe
3 stars

CSW Pro Panel is a lower-pane momentum and trend-confirmation indicator. It builds a momentum oscillator from smoothed Heikin Ashi open, high, low, and close values and colors gradient columns by the open-close range relative to the high-low range. Optional pl

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 5 months ago · None stated GitHub repository of CSW Pro Panel

OT Algo Toolkit

by IAMATOMIC001
3 stars

OT Algo Toolkit is a Smart Money Concepts market structure indicator that plots swing and internal structure transitions, including Break of Structure (BOS) and Change of Character (CHoCH) labels directly on the price chart. It highlights equal highs and lows,

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of OT Algo Toolkit

Ichimoku Raiden

by TamTH-Dev
2 stars

This indicator plots dual Ichimoku Kumo clouds, designated as Lightning and Thunder, directly on the price chart. It calculates Donchian midpoints across two distinct parameter sets to generate fast and slow Senkou Span A and B boundary lines. The script fills

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Ichimoku Raiden

This chart overlay indicator identifies and plots Smart Money Concepts (SMC) elements based on the ICT 2022 trading model. It detects Fair Value Gaps (FVG), Market Structure Shifts (MSS), and key swing high and low levels using specialized external libraries.

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of 2022 Model ICT Entry Strategy TradingFinder

Custom Strategy with DSMA

by wynnforthework
2 stars

This strategy calculates short and long-period Deviation Scaled Moving Averages (DSMA) powered by a SuperSmoother filter to adapt to price volatility. It combines breakout bands, RSI momentum levels, and long-term EMA trend filters to signal entries. Position

Strategy v5 Moving averagesBreakout
Updated 1 year ago · None stated GitHub repository of Custom Strategy with DSMA

Basic Engulfing Candles

by Web3Degenerate
2 stars

This indicator identifies standard bullish and bearish engulfing candlestick patterns and plots visual signals directly on the price chart. A bullish engulfing pattern occurs when a bearish bar is followed by a bar that opens below or equal to the prior close

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Basic Engulfing Candles
1 stars

A strategy in a separate pane built on the WaveTrend oscillator. It enters long when the fast line crosses above the slow line while below the second oversold level, and short on a downward cross while above the second overbought level. Positions close on the

Strategy v5 Oscillators & momentumMean reversion
Updated 2 weeks ago · None stated GitHub repository of WaveTrend Cross Strategy

Anish TB Foster Fix

by nishpa800
1 stars

Overlay indicator for stock-style charts that flags pocket pivot candles: a large percentage body whose volume beats the highest opposite-colour volume over a lookback. It also tests trend stages using 50, 150 and 200 period EMAs plus distance from the 52-week

Indicator v5 TrendVolume
Updated 2 months ago · None stated GitHub repository of Anish TB Foster Fix
1 stars

The strategy combines the Moving Average Convergence Divergence (MACD) oscillator with Bollinger Bands to generate trading signals on the main price chart. A long signal occurs when the MACD line crosses above its signal line while the closing price is above t

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Tuple Visual MACD BB

A Pine Script v5 indicator in a separate pane that applies Hurst-style bandpass filters to a chosen price source, such as the low, to mark cycle pivots from the 5 day to the 40 day range. Each cycle has its own bandwidth and period, and a bandpass offset, cycl

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Diamond Notation Pivots 5D to 40D

Range Scalper

by knectardev
1 stars

The Range Scalper indicator identifies support and resistance levels to help traders spot range-bound price action. It calculates pivot highs and pivot lows using a user-defined pivot length parameter. The resistance levels plot in red and support levels plot

Indicator v5 Support & resistanceScalping
Updated 9 months ago · None stated GitHub repository of Range Scalper
1 stars

This overlay indicator calculates LazyBear's WaveTrend oscillator as modified by DGT. It smooths price with an EMA channel, builds a channel index from absolute deviation, then plots a WaveTrend line and a shorter signal average. It marks crosses, optional val

Indicator v5 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of WaveTrend [LazyBear] by DGT

STDDEV Filter

by JohnsonHsiao
1 stars

This indicator compares two rolling standard deviations of the closing price and plots their difference as a histogram in a separate pane. The shorter-period standard deviation uses a default length of 20 and the longer one uses 50. The histogram is blue when

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of STDDEV Filter
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

FunctionLinearRegression

by ricardosantos79
261 stars

This Pine Script v5 library provides functions to calculate and plot linear regression channels using sample point arrays. It evaluates paired X and Y arrays to calculate the regression slope, intercept, fitted values, maximum deviation, minimum deviation, and

Library v5 Trend
Updated 4 years ago · None stated GitHub repository of FunctionLinearRegression
257 stars

This overlay indicator rebuilds a synthetic candle from the current open and the previous three opens. It treats the highest and lowest of those earlier opens as the range, the prior open as the synthetic open, and the current open as the synthetic close. From

Indicator v5 TrendCandlestick patterns
Updated 7 weeks ago · None stated GitHub repository of Snag - Best Futures Color Trend

This indicator plots an oscillator in a separate pane. It builds several SuperTrend series across a user-defined factor range and step, using ATR as the band width. On each bar it measures the distance between the close and each SuperTrend output, then groups

Indicator v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of AI SuperTrend Clustering Oscillator [LuxAlgo]
65 stars

This v5 indicator calculates the Relative Strength Index of close prices using a period of 20. It plots the RSI value exclusively when barstate.isconfirmed evaluates to true and renders no data otherwise. The approach filters the RSI line to confirmed bar stat

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of V5 Concepts Bar States 04

Fair Value Gaps (FVG)

by dcaoyuan
55 stars

This indicator detects fair value gaps on the price chart. A bullish gap occurs when the current low is above the high two bars earlier and the middle candle closes above its open. A bearish gap uses the opposite comparison. It draws a solid line at the gap ed

Indicator v5 SMC / ICT / price action
Updated 6 months ago · Apache-2.0 GitHub repository of Fair Value Gaps (FVG)
46 stars

This indicator plots expected volatility zones on the price chart. It requests the previous daily close of the chart symbol and a user-selected volatility index, then converts the index into log space. Two volatility measures build upper and lower bands at 0.2

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 8 weeks ago · None stated GitHub repository of Expected Volatility (Log-Transformed)

Consecutive Up/Down Strategy

by TWODS-CAPITAL
37 stars

This strategy tracks consecutive bullish and bearish candlestick closes relative to the preceding bar. It enters a long position when price closes higher for a specified number of consecutive bars, and enters a short position when price closes lower for a desi

Strategy v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Consecutive Up/Down Strategy

FairValueGap B002

by ruckard
13 stars

This price-chart strategy measures the distance from the current price to the opposite end of the latest fair value gap and enters on the idea that price fills much of that gap. Take profit is set toward a large share of that distance, with a wider stop meant

Strategy v5 SMC / ICT / price actionMean reversion
Updated 1 year ago · None stated GitHub repository of FairValueGap B002

Stochastic

by suyons
7 stars

This indicator plots a standard Stochastic oscillator in a separate pane to measure momentum. It calculates the raw stochastic oscillator based on closing, high, and low prices, then applies simple moving averages to generate the smoothed %K and %D signal line

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of Stochastic
6 stars

This indicator detects Turtle Soup liquidity sweeps and Candle Range Theory setups directly on the price chart. It checks breakout distances against ATR boundaries while requiring optional volume spikes and momentum shifts to confirm reversal signals or flag i

Indicator v5 SMC / ICT / price actionSupport & resistance

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