Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 73)

Scripts written for Pine Script version 6, the current version of TradingView's language. They paste into the Pine Editor and run as they are.

Pine scripts4,367
Code shown here2,412open licence
Updated in a year4,021
No repaint flag3,857

Pine Script v6: Indicators, Strategies and Libraries

PF Eventrades Count

by pineforge-4pass
1 stars

A test strategy from a reference corpus that checks the count of trades with zero net result. At midnight it buys one unit, then places a limit exit at the entry price so that the trade closes flat once price returns to it. The trade counter is plotted but hid

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Eventrades Count

P_syn_loops

by GammaExpansion
1 stars

P_syn_loops calculates a composite numeric sum using several Pine Script v6 loop structures and plots the final value in a separate pane. It demonstrates standard forward for-loops, reverse stepping for-loops over historical close prices, array for-in loops wi

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_syn_loops

A Donchian-style trend strategy that enters on a breakout of a 55-bar channel and exits on a 20-bar channel break, with a 200-period EMA as the regime filter. Entries can require a fresh breakout and an ADX and DMI strength check. An ATR trailing stop is drawn

Strategy v6 TrendBreakout
Updated 8 days ago · GPL-3.0 GitHub repository of Trend Following Strategy v6 Signal Cooldown

DEPV2 DEBUG S46

by YuceSezar89
1 stars

DEPV2 DEBUG S46 is a Pine Script v6 indicator that draws in a separate pane. It tracks up to twenty user-selected crypto perpetual symbols and combines four signal classes: trend, momentum, volatility, and volume. The signal mode can use one class, require sev

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

Demand & Supply Zones Pro

by vedkanani123
1 stars

A price-chart indicator that finds supply and demand zones from leg-in, base and leg-out candle structures. Demand comes from rally-base-rally and drop-base-rally patterns, and supply from rally-base-drop and drop-base-drop, each switchable. Leg and base candl

Indicator v6 Support & resistanceVolume
Updated 2 months ago · None stated GitHub repository of Demand & Supply Zones Pro

True Strength Index

by ivansoft
1 stars

Plots the True Strength Index in a separate pane. Price change is smoothed twice with exponential averages, using long and short lengths of 25 and 13 by default, and divided by the same smoothing of absolute change. A signal line is an EMA of the result with a

Indicator v6 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of True Strength Index

VWAP Bands Template

by TradersPost
228 stars

This indicator plots a volume-weighted average price and three standard-deviation bands on the price chart. It resets the running volume-weighted totals at the selected anchor, which can be the session, week, month, quarter, or year. The source price, band mul

Indicator v6 VolumeVolatility & bands
Updated 3 months ago · None stated GitHub repository of VWAP Bands Template

Calculates John F. Ehlers' Distance Coefficient Filter as a distance-weighted finite impulse response filter overlaid directly on the price chart. It weights historical price samples based on the sum of squared price differences across the lookback window, red

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of EDCF: Ehlers Distance Coefficient Filter
47 stars

This indicator computes and plots the natural logarithm of a selected price series in a separate pane. It evaluates the input series, returning the natural log for positive values and na for values less than or equal to zero. The user can adjust the input sour

Indicator v6
Updated 8 months ago · MIT GitHub repository of Logarithmic Transformation (LOG)

Oscillator Divergence Zones calculates nine selectable momentum oscillators, including RSI, CCI, MFI, TSI, STC, and Ehlers filters, to detect regular and hidden divergences. It evaluates price and momentum pivots to spot structural divergence, applying optiona

Indicator v6 Oscillators & momentumSupport & resistance
Updated 3 days ago · MIT GitHub repository of Oscillator Divergence Zones [WavesUnchained]

IFA-VP Context

by eddiebelaval
7 stars

This indicator plots a fixed lookback Volume Profile alongside 20, 50, and 200 Simple Moving Averages directly on the price chart. It highlights trend changes via moving average crosses and marks Point of Control reactions, High Volume Nodes, and Value Area bo

Indicator v6 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of IFA-VP Context
2 stars

The Liquidity Void Detector calculates a custom oscillator to identify low-participation price moves in a separate pane. It computes a log volume shock z-score against a moving average baseline and a 1-bar log return z-score. When volume drops below the low-vo

Indicator v6 SMC / ICT / price actionVolume
Updated 8 months ago · None stated GitHub repository of Liquidity Void Detector (Zeiierman)

Price Volume Rank (PVR)

by mushroom-men-Trading
2 stars

This indicator categorizes price and volume dynamics on each bar by assigning a numeric rank from 0 to 4. It compares the current price and volume to their previous bar values, distinguishing whether price and volume are rising or falling together or diverging

Indicator v6 Volume
Updated 9 months ago · None stated GitHub repository of Price Volume Rank (PVR)
1 stars

This indicator plots a volume-weighted moving average as the central trend baseline on the price chart and surrounds it with ATR volatility bands. Trend conditions change when price breaks beyond those bands. Presets change the VWMA length and ATR multiplier f

Indicator v6 TrendMoving averages
Updated 4 days ago · None stated GitHub repository of Volume Weighted Trend [SkippAlgo]

PF FX 5dp - SMA20/50 cross

by pineforge-4pass
1 stars

This strategy generates crossover signals using SMA20 and SMA50 on the EURUSD forex pair at 5 decimal places. It enters a long position when the fast SMA crosses above the slow SMA and immediately closes any existing short position. It enters a short position

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF FX 5dp - SMA20/50 cross

P_syn_math_color

by GammaExpansion
1 stars

The P_syn_math_color indicator computes a variable v by applying a series of mathematical functions to given values, including absolute value, trigonometric functions, averages, powers, and random number generation. It also performs color calculations using co

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_syn_math_color

Trend Pivot Retracements

by rosijay17-cmd
1 stars

An overlay indicator that sets a trend direction from 50-bar highs and lows, flagging an uptrend on a new high and a downtrend on a new low. Within the trend it detects pivot lows or highs and measures the retracement from the recent extreme, drawing a dashed

Indicator v6 TrendSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Trend Pivot Retracements

DEPV2 DEBUG S47

by YuceSezar89
1 stars

This indicator is a multi-symbol debug panel that plots signal state in a separate pane. It watches up to twenty configurable symbols, defaulting to Binance USDT perpetual contracts, and classifies direction with trend, momentum, volatility, and volume methods

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

A simple price-chart indicator that plots a fast and a slow exponential moving average, defaulting to 20 and 50 periods, with a fill between them. It prints a buy label when the fast average crosses above the slow one and a sell label when it crosses below, an

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of EMA Crossover Buy/Sell Signals

Up/Down Volume

by ivansoft
1 stars

Plots up volume and down volume as green and red columns in a separate pane, with a small marker colouring the net delta. Values are approximated from lower-timeframe data, chosen automatically or set by the user; a coarser setting gives more history but less

Indicator v6 Volume
Updated 1 year ago · None stated GitHub repository of Up/Down Volume

Efficiency Ratio (ER)

by mihakralj
99 stars

This indicator calculates Kaufman's Efficiency Ratio as a signal-to-noise measure of price movement. It compares the absolute net change over a lookback period with the sum of absolute bar-to-bar changes, then clamps the result between 0 and 1. Values near 1 m

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Efficiency Ratio (ER)
47 stars

This indicator applies a natural logarithm to a selected price series and plots the transformed values in a separate pane. The single input selects the source, which defaults to the close. Non-positive source values return na instead of a logarithm, and an na

Indicator v6
Updated 8 months ago · MIT GitHub repository of Logarithmic Transformation (LOG)

This strategy calculates regular and hidden divergences across selectable momentum oscillators, including RSI, CCI, and MFI, and plots volatility-based divergence zones. It displays oscillator dynamics in a separate pane while projecting support and resistance

Strategy v6 DivergenceOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Oscillator Divergence Zones [WavesUnchained] — Strategy

Impulse Candles

by eddiebelaval
7 stars

Impulse Candles identifies unusually large price bars relative to an Average True Range baseline. It measures candle body size against a user-defined ATR ratio and optionally filters for reversal setups following two consecutive candles of the opposite directi

Indicator v6 Volatility & bandsCandlestick patterns
Updated 3 months ago · None stated GitHub repository of Impulse Candles

Price Volume Trend (PVT)

by mushroom-men-Trading
2 stars

This indicator calculates Price Volume Trend as a running sum of volume scaled by the bar's relative price change. It plots the cumulative PVT line and a simple moving average signal in a separate pane, plus a dashed zero line. The signal period sets the lengt

Indicator v6 VolumeTrend
Updated 9 months ago · None stated GitHub repository of Price Volume Trend (PVT)

PF IES probe 01 - adx regime

by pineforge-4pass
1 stars

PF IES probe 01 is a Pine Script v6 strategy that calculates ADX with a custom DI chain using ta.rma smoothing and manual plus/minus DM flow. It applies an ATR-ratio volatility gate comparing current ATR to its 42-period SMA to classify regimes into four categ

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 01 - adx regime

P_syn_matrix_map

by GammaExpansion
1 stars

P_syn_matrix_map is an indicator script that demonstrates and validates matrix and map data structures in Pine Script v6. It initializes a two-by-two floating-point matrix, modifies its elements, transposes it, and computes matrix sums and averages. Additional

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_syn_matrix_map
1 stars

A strategy that buys pullbacks in uptrends and sells rallies in downtrends. Trend comes from fast and slow EMAs with a minimum slope, an optional higher-timeframe EMA check defaulting to daily, and an ADX filter. A setup arms when price stretches an ATR distan

Strategy v6 Mean reversionTrend Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Trend-Aligned Mean Reversion Strategy

DEPV2 Debug S48

by YuceSezar89
1 stars

DEPV2 Debug S48 is a multi-symbol crypto indicator that monitors up to 20 cryptocurrency pairs across four analytical categories: trend, momentum, volatility, and volume. It evaluates trading conditions using several signal modes, including single-dimension tr

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

EMA Trend Ribbon

by vedkanani123
1 stars

A simple price-chart indicator that plots five exponential moving averages, defaulting to 8, 13, 21, 34 and 55 periods, as a ribbon with a shaded fill between the fastest and slowest. The ribbon is green when the averages are stacked in bullish order, red when

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of EMA Trend Ribbon

TN Multi-Confluence

by raybird
1 stars

A Pine v6 strategy that trades smart money concepts on the price chart. It combines a higher-timeframe bias with an EMA, equal highs and lows liquidity, order blocks, fair value gaps and an optional displacement confirmation. Entries are limited to New York an

Strategy v6 SMC / ICT / price actionSessions & time
Updated 2 months ago · None stated GitHub repository of TN Multi-Confluence

Var Keyword Example

by ivansoft
1 stars

Teaching script that shows how the var keyword keeps values between bars. It plots the first bar's close, the close of the first green bar and the close of the tenth green bar on the price chart. The comments explain which value each variable holds. It has no

Indicator v6
Updated 1 year ago · None stated GitHub repository of Var Keyword Example

This indicator calculates John Ehlers' 2-Pole Butterworth Filter, an infinite impulse response (IIR) second-order lowpass filter designed to remove high-frequency market noise with minimal phase lag. It processes price data using trigonometric functions and hi

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers 2-Pole Butterworth Filter (BUTTER2)

LRSI: Laguerre RSI

by mihakralj
47 stars

This indicator calculates a Laguerre RSI oscillator using four cascaded Laguerre filter stages applied to closing prices. It measures momentum with reduced time lag compared to a traditional RSI. The script plots the bounded values in a separate pane alongside

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of LRSI: Laguerre RSI

Oscillator Topology analyzes the structural shape of a WaveTrend oscillator rather than just its price level or crossover. It evaluates curvature, peak width, asymmetry, and flatness around pivot extremes to categorize oscillator movements into V-Spikes, Round

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 3 days ago · MIT GitHub repository of Oscillator Topology [WavesUnchained]
7 stars

This strategy detects an inside bar when the current high and low sit inside the previous bar. A bullish inside bar enters long and a bearish inside bar enters short, both on the price chart. The long stop is the entry bar low and the short stop is the entry b

Strategy v6 Candlestick patterns
Updated 3 months ago · None stated GitHub repository of Inside Bar Strategy with SL/TP

Quadruple EMA (QEMA)

by mushroom-men-Trading
2 stars

The Quadruple Exponential Moving Average (QEMA) indicator calculates a smoothed, low-lag moving average by cascading four exponential moving average stages with dynamic warmup compensation. It plots directly on the price chart as an overlay line. Users can adj

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Quadruple EMA (QEMA)
1 stars

This strategy builds a directional bias from three exponential moving averages drawn on the price chart. It scores bullish and bearish alignment of the fast, slow, and trend averages, plus whether price is above or below that structure, and treats a score at o

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 02 - three-ema bias

P_syn_operators

by GammaExpansion
1 stars

The P_syn_operators indicator, written in Pine Script version 6, calculates and plots a series of values based on arithmetic expressions, logical operators, ternary operators, and string functions. Variables a through j are defined with operations including ad

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_syn_operators

An overlay indicator that looks for the Wyckoff upthrust after distribution pattern. It requires a prior advance measured in ATR, detects a trading range with a minimum duration and boundary tests, and flags a terminal breakout attempt that fails back inside w

Indicator v6 BreakoutVolume
Updated 8 days ago · GPL-3.0 GitHub repository of Upthrust After Distribution + Entry Alerts

DEPV2 DEBUG S5

by YuceSezar89
1 stars

DEPV2 DEBUG S5 monitors a multi-ticker basket of up to twenty cryptocurrency pairs across four analytical dimensions: trend, momentum, volatility, and volume. It evaluates market signals using customizable modes, including individual method triggers, simultane

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

Evasive SuperTrend

by vedkanani123
1 stars

A SuperTrend variant for the price chart based on ATR bands around the midpoint of each bar. When price comes closer to the active band than a noise threshold measured in ATRs, the band is pushed away by an expansion amount instead of tightening, which reduces

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

This overlay strategy builds a weighted score from three factors. Trend is positive when a fast EMA is above a slow EMA and negative otherwise. Momentum is positive when 14-period RSI is above 50. The volatility factor is positive when close is above a 20-peri

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Multi-Factor Sovereign V6

Varip With Types

by ivansoft
1 stars

Teaching script on the varip keyword inside a user-defined type. A bar counter increments once per bar and a tick counter increments on every real-time update, and both are plotted in a separate pane. Because the tick counter changes with each update on the li

Indicator v6 Repaints
Updated 1 year ago · None stated GitHub repository of Varip With Types

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