Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 76)

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

99 stars

This indicator plots John Ehlers' Cyber Cycle in a separate pane. It smooths the chosen source with a four-bar FIR filter, then applies a two-pole high-pass IIR filter to isolate the dominant cycle. A one-bar delayed trigger line supports crossover reading aga

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Cyber Cycle (CCYC)
47 stars

This indicator calculates the arithmetic average of the open, high, and low prices for every bar and plots the resulting series directly on the main price chart. The calculation uses constant multiplication rather than division to optimize execution speed. It

Indicator v6
Updated 8 months ago · MIT GitHub repository of Open-High-Low Average (OHL3)

This indicator measures the relative strength of a chart symbol compared to a benchmark symbol, such as SPY or QQQ. It plots either a raw relative strength ratio or a Mansfield RS oscillator in a separate pane. Confluence signals trigger when relative strength

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Relative Strength Line [WavesUnchained]

Predictive Moving Average Convergence Divergence - Ryder calculates a classic MACD oscillator with customizable fast, slow, and signal lengths. In addition to plotting the standard MACD line, signal line, and histogram in a separate pane, it calculates forward

Indicator v6 Oscillators & momentumMoving averages

NIG Probability Table

by regalouisei
2 stars

This indicator estimates a normal-inverse Gaussian distribution from recent log returns and approximates the probability of price falling in each return bin. It measures mean, standard deviation, skewness, and kurtosis over a rolling window, then sets the bin

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of NIG Probability Table

Simple Moving Average (SMA)

by mushroom-men-Trading
2 stars

This script calculates and plots a Simple Moving Average on the price chart. It uses a custom function with circular buffer and running sum for efficient computation of the SMA value from the chosen source, defaulting to close prices. The primary setting allow

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Simple Moving Average (SMA)
1 stars

This strategy uses lower-timeframe data to probe numeric array reductions in Pine Script. On a 15-minute chart it fetches 15 one-minute closes using request.security_lower_tf and sums them to create a synthetic intra-bar momentum. It plots EMAs on the price ch

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF lower-tf probe 01 - float ratio15

P_ver_ema_series_length

by GammaExpansion
1 stars

This indicator plots an exponential moving average of the close price in a separate pane. The average length is not a user setting. On each bar it equals the bar index modulo ten, plus one, so the length cycles through the integers from one to ten. Because the

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_ver_ema_series_length

DEPV2 Günlük Veri 1

by YuceSezar89
1 stars

This indicator plots open, high, low, and close for eleven user-selected symbols in a separate pane, using the chart timeframe. The chart symbol supplies the first series, while the others are requested from Binance USDT perpetual pairs by default. Symbol inpu

Indicator v6 Screeners & dashboards
Updated 13 days ago · None stated GitHub repository of DEPV2 Günlük Veri 1
1 stars

A trend indicator drawn on the price chart that plots EMA 9, 21, 50 and SMA 200 with shaded clouds between them. Buy and sell conditions are filtered by RSI thresholds, a minimum and rising ADX, relative volume, and a smart range filter that skips small or cho

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of JL2 EMA RSI ADX Volume Smart Range
99 stars

This indicator calculates the Ehlers Decycler Oscillator as the difference between two 2-pole Butterworth high-pass filters applied to a chosen price source. The long-period filter result is subtracted from the short-period filter result, and the oscillator is

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Decycler Oscillator (DECO)

Parabolic SAR

by mihakralj
47 stars

This indicator calculates J. Welles Wilder's classic Parabolic Stop and Reverse (PSAR) trailing stop levels to highlight trend direction and potential market reversals. It updates an acceleration factor whenever price makes new extreme highs or lows, bound by

Indicator v6 TrendSupport & resistance
Updated 8 months ago · MIT GitHub repository of Parabolic SAR

This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt

Strategy v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Reversal Engine Score [WavesUnchained] Strategy
7 stars

Range Oscillator (Zeiierman) plots a range-based oscillator in a separate pane. It qualifies a range box from a minimum number of bars and sizes that box vertically with an ATR width multiplier. A heatmap splits the recent high-low span into horizontal levels

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 months ago · None stated GitHub repository of Range Oscillator (Zeiierman)
2 stars

The Probability Grid indicator calculates statistical probability distribution levels derived from historical pivot high and low points. It analyzes price movements over a configured swing length and maximum reversal count to project probability zones directly

Indicator v6 Support & resistanceVolatility & bands
Updated 8 months ago · None stated GitHub repository of Probability Grid [LuxAlgo]

The strategy uses RSI(14) on closing prices to detect upward crossovers above 50 for long entries and downward crossovers below 50 for exits. A protective stop loss is placed at the midpoint between open and high on the entry bar to handle mid-bar fills via ma

Strategy v6 Oscillators & momentumMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of PF Magnifier Dist Probe 08a - Endpoints RSI Cross

P_ver_int_as_bool

by GammaExpansion
1 stars

This minimal test indicator evaluates integer values as booleans within conditional statements in Pine Script v6. It assigns an integer to a variable, passes it into an if-else block to determine an output value, and plots the final result in a separate pane.

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

DEPV2 Günlük Veri 2

by YuceSezar89
1 stars

This indicator requests the open, high, low and close of eight user-selected Binance perpetual symbols and plots each value in a separate pane. It is meant to run on a one-day Bitcoin perpetual chart so chart-data export can capture those extra daily series be

Indicator v6 Screeners & dashboards
Updated 13 days ago · None stated GitHub repository of DEPV2 Günlük Veri 2
1 stars

This strategy detects liquidity sweeps and break of structure events using SMC concepts. It plots BOS labels, sweep markers, and matrix floor ceiling lines on the price chart. The SMC structure sensitivity setting adjusts lookback for scalping, standard, or sw

Strategy v6 SMC / ICT / price actionBreakout
Updated 2 months ago · None stated GitHub repository of TN SMC Matrix Sovereign v6

Calculates John Ehlers' Detrended Synthetic Price by taking the difference between a quarter-cycle and a half-cycle exponential moving average of the input source. It includes initial warm-up coefficient adjustments to stabilize early values and plots the resu

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Detrended Synthetic Price (DSP)
47 stars

This indicator calculates the Pearson correlation coefficient between a chosen source series on the current chart and a secondary external symbol across a user-specified lookback period. It processes streaming inputs efficiently using a circular buffer to upda

Indicator v6
Updated 8 months ago · MIT GitHub repository of Pearson's Correlation (CORRELATION)

This overlay indicator scores liquidity-sweep reversals on the price chart. It looks for a swing high or low violation followed by a recovery close, then grades optional conditions such as RSI and structure into a 0–2 quality score with separate long and short

Indicator v6 SMC / ICT / price actionOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Reversal Engine Score v1 [WavesUnchained]

SuperTrend Toolkit

by mushroom-men-Trading
2 stars

SuperTrend Toolkit plots ATR-based SuperTrend bands and direction on the price chart. It calculates upper and lower bands using a configurable source, length, and factor multiplier. Contrarian signals generate buy and sell labels with alerts when the trend rev

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

A test strategy from a reference corpus that checks how intrabar fills behave with the bar magnifier on. It goes long when a 9-period EMA crosses above a 21-period EMA, places a protective stop halfway between the bar open and high, and closes the long when th

Strategy v6 Moving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF Magnifier Dist Probe Endpoints

P_ver_udt_field_history

by GammaExpansion
1 stars

Calculates and plots the historical value of a user-defined type field in a separate indicator pane. The script instantiates a custom object storing the current closing price and references its field on the previous bar using historical indexing. Designed as a

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

This Pine Script indicator probes the tie-breaking behavior of array.sort_indices in Pine Script v6. It creates two arrays of size 5 and 20 using seeded hash functions based on bar_index, then sorts them in descending order. The script plots the original array

Indicator v6
Updated 13 days ago · None stated GitHub repository of DEPV2 P1 · SIRALAMA SONDASI

Kenyon Legacy

by vedkanani123
1 stars

A price-chart indicator that combines two independent parts. The first is a Q-Trend line built from the midpoint of a long highest-lowest range, shifted by an ATR multiple, with buy, sell and strong signals, bar colouring and two signal modes. The second finds

Indicator v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of Kenyon Legacy

TN SMC Sovereign

by raybird
1 stars

TN SMC Sovereign identifies Smart Money Concepts structural changes, Order Blocks, and Fair Value Gaps on the price chart. It determines market direction by tracking swing highs and lows for Break of Structure events. Long entries occur when the structure is b

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

This indicator calculates John Ehlers' Deviation-Scaled Oscillator (DSO) and plots it in a separate pane. It whitens the source price series by taking its two-bar difference, applies a two-pole Super Smoother filter, and normalizes the output using a rolling R

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Deviation-Scaled Oscillator (DSO)
47 stars

This indicator calculates the percentage change of a chosen source over a user-set lookback length and plots that value in a separate pane with a percent format. It compares the current source with the value that many bars earlier, returning no value when the

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Percentage Change (CHANGE)

This ex-post diagnostic indicator identifies confirmed pivot highs and lows, classifying subsequent price action into four outcome types: Snapback, Grind, Fake/Pullback, or Chop. It evaluates forward performance across an ATR-based risk window, factoring in Wa

Indicator v6 Support & resistanceOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Reversal Type Classifier [WavesUnchained]

Replay Footprint

by eddiebelaval
7 stars

An overlay indicator that constructs footprint volume profiles and value areas directly on the price chart using lower-timeframe detailed volume data. It segregates buy and sell volume across automatic or fixed tick-sized price rows, identifying the Point of C

Indicator v6 VolumeSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Replay Footprint

Tillson T3 Moving Average (T3)

by mushroom-men-Trading
2 stars

This indicator plots the Tillson T3 moving average on the price chart. It calculates the line from six cascaded exponential moving averages whose coefficients depend on a volume factor. Users choose the source series, the smoothing period, and the volume facto

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Tillson T3 Moving Average (T3)

PF Max Contracts Held Gate

by pineforge-4pass
1 stars

A test strategy from a reference corpus that checks the highest contract count a strategy has held. At the start of each hour it adds one long unit, up to a pyramiding limit of ten, but stops adding once the all-time maximum held reaches five contracts. Every

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Max Contracts Held Gate

P_ver_when_param

by GammaExpansion
1 stars

This strategy enters a long position when the bar close is above its open. It has no inputs, no exit rules, and no stop loss or take profit. Position size is plotted in a separate pane rather than on the price chart. The script is a minimal parser fixture, so

Strategy v6 Candlestick patterns
Updated 7 days ago · MIT GitHub repository of P_ver_when_param

DEPV2 Veri 1

by YuceSezar89
1 stars

DEPV2 Veri 1 aggregates OHLCV data from 20 cryptocurrency symbols on the 15-minute timeframe and plots volume plus open high low close values for each symbol on a single chart pane. The first symbol uses the chart's native columns while the remaining symbols a

Indicator v6 Screeners & dashboards
Updated 13 days ago · None stated GitHub repository of DEPV2 Veri 1

Linear GANN 2.0

by vedkanani123
1 stars

A price-chart indicator that draws horizontal Gann price levels derived from a square-number sequence, with optional price labels. Settings control line colour and width, label size, how many levels appear around a reference price, the number of interval divis

Indicator v6 Support & resistance
Updated 2 months ago · None stated GitHub repository of Linear GANN 2.0

TN Sovereign

by raybird
1 stars

A strategy on the price chart that scores each setup from 0 to 4 using volume against its average, higher-timeframe EMA trend, bar movement against an ATR noise level and fast versus slow EMA alignment. Long entries are linked to a fast EMA crossing above the

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign

This indicator calculates Ehlers directional movement with a Hann window and plots it in a separate pane. It extracts classic plus and minus directional movement from bar highs and lows, smooths their difference with an exponential moving average, then applies

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Directional Movement with Hann (DMH)

Pretty Good Oscillator

by mihakralj
47 stars

The Pretty Good Oscillator calculates the distance between the selected price source and its simple moving average, normalized by the Average True Range over a specified period. It renders as an oscillator line in a separate pane alongside a zero line and thre

Indicator v6 Oscillators & momentumMean reversion
Updated 8 months ago · MIT GitHub repository of Pretty Good Oscillator
9 stars

The RJ-Wave Fibonacci Validator tracks and validates wave structures using Fibonacci retracement and extension levels directly on the price chart. It identifies impulse movements and evaluates pullback candidates using configurable pivot sensitivity and Fibona

Indicator v6 Support & resistanceTrend
Updated 3 days ago · MIT GitHub repository of RJ-Wave Fibonacci Validator

Rhokeo-VW-RSI Histogram

by eddiebelaval
7 stars

This indicator plots a volume-weighted RSI as a histogram in a separate pane. It weights positive and negative price changes by volume, smooths those values, and scales the result between -1 and +1. Histogram bars change color by zone: strong or weak bull abov

Indicator v6 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of Rhokeo-VW-RSI Histogram

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