Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 81)

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

1 stars

This strategy identifies trend momentum shifts using a Twin Range Filter (TRF) oscillator and volatility regime gates. It calculates the ratio of fast and slow price ranges, smooths it through a double exponential moving average, and signals entries when the s

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Katana Flow v6

The Ehlers SSF Detrended Synthetic Price indicator calculates a detrended price series using dual Super Smooth Filters based on a dominant cycle period. It subtracts a half-cycle super smooth filter from a quarter-cycle super smooth filter to isolate cyclical

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers SSF Detrended Synthetic Price (SSFDSP)
47 stars

Ultrasmooth Filter (USF) calculates a noise-reduced trend curve using a two-pole infinite impulse response (IIR) filter structure with momentum enhancement. Designed to minimize lag while suppressing price fluctuations, it computes efficiently with constant O(

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Ultrasmooth Filter (USF)

This indicator detects market accumulation phases and bottom formations over time rather than generating single-point buy signals. It evaluates five scoring components: trend loss, range formation, volatility compression, liquidity behavior, and early bullish

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Vein: Accumulation Phase 4H [WavesUnchained]

PF Probe 50 - Stop Limit Trail

by pineforge-4pass
1 stars

PF Probe 50 - Stop Limit Trail is a synthetic validation strategy designed to test simultaneous exit conditions. It opens long positions at 08:15 and short positions at 16:15 when flat. Position exits utilize a single bracket exit command incorporating an ATR-

Strategy v6 Volatility & bandsSessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 50 - Stop Limit Trail

NO.1 V1 Fast Confirmed Flip

by vedkanani123
1 stars

A price-chart indicator that builds an adaptive core line by blending a Kaufman-style adaptive average with a zero-lag EMA, then surrounds it with ratcheting ATR trail rails. A buy label means the active side flips long and a sell label flips short, committed

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of NO.1 V1 Fast Confirmed Flip
1 stars

A Keltner channel breakout strategy. It goes long when the close crosses above the upper band and short when it crosses below the lower band, only if ADX is above a threshold and price is on the matching side of a 200 EMA. Each trade exits at the channel midli

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Sovereign Keltner
99 stars

This indicator plots John Ehlers Super Passband Filter in a separate pane. It builds a wide-band passband oscillator by differencing two z-transformed exponential moving averages that use a smoothing factor of five divided by the period. It also plots the root

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Super Passband Filter (SPBF)

This indicator calculates the statistical variance of a price series over a user-defined lookback window and plots it in a separate pane. Using a ring buffer alongside running sums and squared sums, it computes sample dispersion efficiently without recalculati

Indicator v6 Volatility & bands
Updated 8 months ago · MIT GitHub repository of Variance, Dispersion or Spread (VARIANCE)

Vein Execution 15m is an execution and timing overlay designed to complement higher-timeframe context. It monitors lower-timeframe micro structure shifts, liquidity sweeps, rejection candles, engulfing patterns, and follow-through momentum. The script calculat

Indicator v6 TrendSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Vein: Execution 15m [WavesUnchained]
1 stars

This validation strategy tests TradingView trailing stop execution semantics using trail points and trail offset parameters without accompanying fixed stop or take-profit orders. It opens a long position at 09:15 and a short position at 15:15 when flat, tracki

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 51 - Trail Points Offset

NO.1 V1 Final Regime Router

by vedkanani123
1 stars

An overlay signal indicator that routes between three exclusive modes: a trend mode using Supertrend flips or Donchian continuation, a range fade mode, and a transition mode that trades breakouts of a finished Asia range. Shock candles, gaps, micro-ranges and

Indicator v6 Sessions & timeTrend Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V1 Final Regime Router
1 stars

A strategy that trades liquidity sweeps on the price chart. A bullish sweep is a low below the lowest low of the prior 20 bars that closes back above it with a lower wick longer than a set multiple of the body; a bearish sweep mirrors this at the highs. A volu

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN Sovereign Liquidity Hunt
99 stars

This indicator calculates John Ehlers Trendflex in a separate pane. It pre-filters the chosen source with a two-pole SuperSmoother, sums the difference between the current filtered value and recent filtered values as a cumulative slope, then divides that slope

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Trendflex (TRENDFLEX)
47 stars

This indicator plots a rolling linearly weighted average of a chosen source on the price chart. Weights rise from the oldest bar to the newest, matching a weighted moving average, and a circular buffer updates the sums in constant time. During warm-up the deno

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of Weighted Average (WAVG)

Vein Exhaustion is a price-chart indicator that scores how stretched a directional move is before structure confirms a turn. It builds separate bull and bear scores from consecutive directional bars, EMA distance in ATR units, RSI and MFI extremes, volume-base

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Exhaustion [WavesUnchained]

PF probe 52 - stop entry cancel

by pineforge-4pass
1 stars

This strategy compares an 8-period EMA with a 21-period EMA on the price chart. When the fast average is above the slow average it places a long stop at the prior bar high and cancels the pending short; otherwise it places a short stop at the prior bar low and

Strategy v6 Moving averagesBreakout Repaints
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 52 - stop entry cancel

NO.1 V3 Dual-Regime Router

by vedkanani123
1 stars

A price-chart indicator that classifies the market into trend, range, transition or shock regimes using an adaptive core, ATR, ADX, choppiness and efficiency measures. Each regime has its own sleeve: trend-following on structure and momentum, range-edge revers

Indicator v6 TrendBreakout
Updated 2 months ago · None stated GitHub repository of NO.1 V3 Dual-Regime Router
1 stars

TN Sovereign Lorentzian v6 is a quantitative strategy that classifies price action regimes using multi-dimensional indicators and causal volume auditing. It generates entry signals based on RSI center-line crossovers, 10-period momentum, and price alignment re

Strategy v6 AI / machine learningTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Lorentzian v6

This indicator plots John Ehlers' truncated bandpass filter beside a standard infinite-impulse-response bandpass in a separate pane. It passes cycles near a chosen center period, with bandwidth setting how wide the passband is and length setting the finite tru

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Truncated Bandpass Filter (TBF)

Weighted Close (HLCC4)

by mihakralj
47 stars

This indicator calculates the classic weighted close, also called HLCC4, as one quarter of the high plus the low plus twice the close. It calls a small helper that multiplies the four price terms by 0.25 and plots the result as a yellow line of width two direc

Indicator v6
Updated 8 months ago · MIT GitHub repository of Weighted Close (HLCC4)

Vein: Pullback identifies temporary counter-trend retracements and signals when they end versus when structure breaks. It calculates a multi-layer confluence score from 0 to 10 based on trend quality, move weakness, structure preservation, and Fibonacci retrac

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Pullback [WavesUnchained]
1 stars

PF probe 53 - stop touch boundary is a strategy that draws on the price chart. It checks for specific UTC hours (2:15 for long, 14:15 for short) and enters a long position when no position exists by placing a stop order one tick beyond the previous bar's high.

Strategy v6 Sessions & timeSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 53 - stop touch boundary
1 stars

A price-chart indicator that extends a three-regime signal engine (trend, range edge reversal, breakout) with higher-timeframe context and a transparent confidence score. The higher timeframe uses the previous completed bar, either auto-selected or set manuall

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V4 MTF Confidence Fusion
1 stars

This strategy executes trades based on MACD line crossovers filtered by trend direction and histogram slope. Long positions open on bullish MACD crossovers when price is above the trend EMA and histogram momentum is rising. Short positions open on bearish cros

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MACD v6
99 stars

This indicator plots Ehlers Ultimate Bands on the price chart. It smooths the selected source with an Ehlers ultrasmooth filter, measures the root-mean-square of residuals over the lookback, and draws upper and lower bands as that smooth line plus or minus the

Indicator v6 Volatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Bands (UBANDS)
47 stars

This indicator calculates the Williams Gator Oscillator derived from Bill Williams Alligator lines and plots dual histograms in a separate pane. The upper histogram displays the absolute difference between the Jaw and Teeth moving averages, while the lower his

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of Williams Gator Oscillator
9 stars

The script calculates a two-layer reversal scoring system designed to identify potential market turning points. Layer A evaluates momentum, overextension, volume, and candle metrics to establish a setup score, while Layer B confirms structural events such as m

Indicator v6 Oscillators & momentumSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Vein: Reversal Score 4H

PF probe 54 - MTF roll state

by pineforge-4pass
1 stars

This strategy detects roll states in multiple timeframes to generate trading signals on the price chart. It fetches close prices from 60m, 240m and daily bars using request.security. Long entries trigger on a 60m roll up with flat 240m state or on a daily high

Strategy v6 TrendBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 54 - MTF roll state
1 stars

A price-chart indicator that combines trend, range edge reversal and transition breakout sleeves, with shock conditions blocking new signals. It uses an adaptive core, causal trail, completed ranges and a previous completed higher-timeframe filter. Presets suc

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V5 Ultimate Adaptive Engine

TN Sovereign Market Structure v6 is an overlay strategy that identifies market structure breaks and trends using pivot points, a 50-period Exponential Moving Average (EMA), and the Ichimoku Cloud. It detects Break of Structure (BOS) signals when price closes p

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Market Structure v6
99 stars

Ehlers Ultimate Channel calculates volatility bands around an adaptive smoothed centerline based on John Ehlers' smoothing algorithm. It applies a specialized infinite impulse response filter to both price and True Range, constructing an upper, middle, and low

Indicator v6 Volatility & bandsSupport & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Channel (UCHANNEL)
47 stars

This indicator plots a winsorized mean moving average of the close on the price chart. Over a lookback window it sorts values, replaces the lowest and highest percentage of samples with the values at the trim boundaries, and averages the full window so outlier

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of WINS: Winsorized Mean Moving Average

This indicator draws support and resistance zones on the price chart from reversal bars that later reach ATR-based targets. Weak and strong labels depend on travel distance, adverse move, and how quickly the target is hit. Nearby same-direction zones merge, a

Indicator v6 Support & resistanceOscillators & momentum Repaints
Updated 3 days ago · MIT GitHub repository of Vein: Reversal Zones [WavesUnchained]
1 stars

This strategy is a validation probe that isolates an implicit reversal exit. When flat at 00:15 it enters one long unit. At 00:45 an opposite short entry of quantity one closes that long and opens a short. At 01:15 an opposite long entry reverses back to long.

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 55 - entry reversal implicit exit

OBV Signal Confluence

by vedkanani123
1 stars

An On-Balance Volume oscillator in a separate pane. It plots an OBV histogram against a moving average chosen from SMA, RMA, WMA or VWMA and marks regular and hidden divergence from pivots. Optional filters use a higher-timeframe confirmation, ADX and a volume

Indicator v6 VolumeDivergence
Updated 2 months ago · None stated GitHub repository of OBV Signal Confluence
1 stars

This multi-timeframe strategy combines higher-timeframe trend context with lower-timeframe execution. It evaluates macro trend direction on a higher timeframe using Exponential Moving Average crosses and a Supertrend indicator. On the lower timeframe, entry si

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign MTF Dual-Layer v6

This indicator calculates John Ehlers' Ultimate Smoother Filter, a two-pole infinite impulse response filter designed to reduce market noise while minimizing lag. It computes filter coefficients using exponential decay and trigonometric functions, then applies

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Smoother Filter (USF)

Z-Score

by mihakralj
47 stars

The Z-Score indicator computes the standardized deviation of a source series from its mean and variance over a specified lookback period. It plots the resulting Z-Score values in a separate pane on the chart. Users adjust the period length and select the sourc

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Z-Score

This indicator plots calendar-spread context for commodity futures on the price chart. It maps the chart symbol to front and next month contracts automatically, or uses manual symbols, then calculates the spread as a difference or ratio. Fast and slow EMAs, a

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Spread Context [WavesUnchained]
1 stars

This strategy isolates trailing-stop exits that use trail points and a trail offset without a paired stop or limit. It enters one long unit at 09:15 and one short unit at 15:15 when flat, then arms a trailing exit for the open side. Trail points and trail offs

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 56 - trailing activation path

P&P Cloud Professional

by vedkanani123
1 stars

A price-chart indicator that plots a fast and slow EMA cloud, defaulting to 9 and 21 periods, in green when bullish and red when bearish. The cloud can be locked to a chosen timeframe, with a wait-for-close option that is off by default, so locked higher-timef

Indicator v6 Moving averagesTrend Repaints
Updated 2 months ago · None stated GitHub repository of P&P Cloud Professional
1 stars

This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MTF Intraday v6
99 stars

The Ehlers Ultimate Strength Index (USI) calculates a symmetric RSI replacement using the UltimateSmoother filter instead of Wilder's exponential smoothing. It plots the USI value in a separate pane, bounded between -1 and +1, with bullish signals above 0 and

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Strength Index USI

Vein Structure & Zones 4H combines market structure event detection with automated support and resistance zone mapping directly on the price chart. It calculates micro and major swing pivots, break of structure (BOS), equal highs and lows, and Wyckoff heuristi

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 days ago · MIT GitHub repository of Vein: Structure & Zones 4H [WavesUnchained]
1 stars

PF Probe 57 is a Pine Script validation strategy designed to test stop-entry position reversals following pyramided entries. It builds a multi-lot long position at specific intraday times, triggers short and long stop-entry reversal orders based on bar high an

Strategy v6
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 57 - Stop Reversal Grouping

Phantom Trend Cloud

by vedkanani123
1 stars

A trend indicator on the price chart that draws a 21-period ribbon with a cloud whose width is an ATR multiple, 1.618 by default. A trend flip changes the cloud direction, and retest signals appear when price pulls back to the cloud, filtered by volume, RSI an

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Phantom Trend Cloud

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