Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 71)

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

VİOP Session Strategy

by trugurpala
4 stars

This strategy trades Turkish VIOP BIST 30 futures on the price chart. It opens positions when a fast exponential moving average crosses a slow one, but only while chart time falls inside the 09:30 to 18:15 UTC+3 session. Stop loss and take profit distances are

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of VİOP Session Strategy

Test Div

by skipp-dev
1 stars

This test indicator evaluates basic arithmetic division in Pine Script v6. It declares two persistent integer variables, computes their quotient as a floating-point number, and plots the resulting constant value in a separate indicator pane. The script has no

Indicator v6
Updated 4 days ago · None stated GitHub repository of Test Div
1 stars

This strategy enters long positions every Monday at 00:00 UTC on the 15-minute chart. It computes quantity as 10 percent of current equity divided by the bar close, rounded to three decimal places for stability. Market orders open the position and it flattens

Strategy v6 TrendMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of Parity probe 05 - small equity fraction

P_syn_drawings

by GammaExpansion
1 stars

This Pine Script v6 indicator draws multiple objects on the price chart for testing. It creates a red dashed line from the previous low to the current low, a blue line from the previous high to the current high, and connects their endpoints. A green label show

Indicator v6 Support & resistanceCandlestick patterns
Updated 7 days ago · MIT GitHub repository of P_syn_drawings
1 stars

A strategy that enters on a liquidity sweep and reclaim of a stored swing level, gated by trend and momentum filters. Trend uses EMAs, ADX, DI alignment and a confirmed higher-timeframe EMA check, and momentum uses ROC and balance of power. Cleaner overlay ext

Strategy v6 TrendSMC / ICT / price action Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Sweep Trend Continuation + SVP

DEPV2 DEBUG S36

by YuceSezar89
1 stars

DEPV2 DEBUG S36 is a multi-symbol quantitative research indicator rendered in a separate pane. It evaluates market conditions across up to twenty cryptocurrency pairs by combining four distinct analytical dimensions: trend, momentum, volatility, and volume. Us

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

This statistical arbitrage strategy uses matrix algebra to calculate dynamic Ordinary Least Squares regression parameters between the chart symbol and a secondary asset. It constructs a synthetic spread and calculates its Z-score. The strategy enters a long po

Strategy v6 Mean reversionScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of TN Matrix OLS Stat Arb Sovereign v6

Technical Ratings

by ivansoft
1 stars

Displays a table of technical ratings for the chart symbol, using an imported rating library that combines moving averages and oscillators. Each row can show the rating from all indicators, oscillators only or moving averages only, as Strong Sell, Sell, Neutra

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Technical Ratings
99 stars

Calculates and plots the Detrended Price Oscillator in a separate pane to identify short-term price cycles. The indicator removes longer-term trends by subtracting a historical simple moving average, displaced back by half the period plus one bar, from the cur

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Detrended Price Oscillator (DPO)

Kalman Filter (KF)

by mihakralj
47 stars

The Kalman Filter (KF) calculates a recursive state estimation to smooth price data and reduce noise on the main chart. It continuously updates state and error covariance estimates by balancing process noise against measurement noise via the Kalman gain. Users

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

The Market Stress Oscillator plots a bi-directional Williams VIX Fix in a separate pane, with separate bull and bear stress lines. It applies JMA smoothing to both series and shows ADX strength as context for judging noisy readings. Peak-hold markers mark stre

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 days ago · MIT GitHub repository of MSO - Market Stress Oscillator [WavesUnchained]
7 stars

This indicator plots a zero-lag EMA center line with ATR bands on the price chart. It marks bullish or bearish mode after closes stay beyond a band for a set number of bars and the center line slopes that way. Confirmed buy and sell labels appear only after th

Indicator v6 TrendMoving averages Repaints
Updated 3 months ago · None stated GitHub repository of GK Trend Ribbon SWING + PREPARE HUD
4 stars

This indicator analyzes trading volume in a separate chart pane by plotting raw volume histogram bars alongside a simple moving average of volume and On-Balance Volume (OBV). It identifies unusually high volume bars where volume exceeds the moving average mult

Indicator v6 VolumeMoving averages
Updated 2 months ago · MIT GitHub repository of Volume Analysis [trugurpala]
2 stars

Expected Value Monte Carlo analyzes historical price returns and projects potential future outcomes directly on the price chart using statistical simulations. It calculates historical performance metrics over a configurable sample period and simulates future p

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Expected Value Monte Carlo

On Balance Volume (OBV)

by mushroom-men-Trading
2 stars

This indicator calculates and plots the standard On Balance Volume (OBV) in a separate chart pane. It tracks cumulative volume flow by adding volume on up bars and subtracting volume on down bars relative to the prior close. The indicator does not generate aut

Indicator v6 Volume
Updated 9 months ago · None stated GitHub repository of On Balance Volume (OBV)

USI Flip

by skipp-dev
1 stars

USI Flip is a Pine Script indicator that plots six USI lines with customizable lengths for different timeframes. The fastest red line generates BUY and SHORT flip signals when crossing slower lines, with options for volume filter, bar close only, margin hyster

Indicator v6 Oscillators & momentumVolume
Updated 4 days ago · None stated GitHub repository of USI Flip
1 stars

This strategy opens a long position at the start of each Monday at midnight by sizing it to 50% of current equity divided by the close price. It automatically flattens the position on the next bar close. No stop loss or take profit is used. The strategy runs o

Strategy v6 Sessions & timeMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of Parity probe 06 - 50% equity sizing

P_syn_enum

by GammaExpansion
1 stars

This indicator serves as a simple demonstration and test fixture for Pine Script v6 custom enum structures. It allows users to select a moving average type—Simple (SMA), Exponential (EMA), or Weighted (WMA)—from an enum drop-down menu alongside a configurable

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_syn_enum
1 stars

A strategy with one entry type, a liquidity sweep and reclaim of a stored swing level, allowed only when trend and momentum filters agree. The trend filter uses a fast and slow EMA, a minimum ADX, DI alignment and an optional confirmed higher-timeframe EMA che

Strategy v6 TrendSMC / ICT / price action Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Sweep Trend Continuation Strategy

DEPV2 DEBUG S37

by YuceSezar89
1 stars

DEPV2 DEBUG S37 is a separate-pane indicator that watches up to twenty user-chosen symbols, defaulting to Binance perpetual crypto pairs. It forms directional signals from four method classes: trend, momentum, volatility, and volume. Modes use one class, requi

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

CODEX NO1 Flip Engine v2

by vedkanani123
1 stars

A confirmed-close trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. It uses an ATR trail, a zero-lag EMA for fast structure and a slow baseline, plus ADX, choppiness, efficiency and RSI inputs. An optio

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NO1 Flip Engine v2
1 stars

A portfolio-style strategy that estimates weights for three assets, Bitcoin, Ethereum and Solana by default, using return covariance matrices over a selectable lookback of 60, 120 or 252 bars and an annual baseline rate input. It solves for tangency weights ev

Strategy v6
Updated 2 months ago · None stated GitHub repository of TN Max Sharpe Sovereign
1 stars

This strategy calculates a composite rating from a TechnicalRating library using moving averages and oscillators. It plots signals directly on the price chart. The ratingSignal setting selects which components to base the signal on: MAs, Oscillators, or All. W

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Technical Ratings Strategy

Traditional Pivot Points

by TradersPost
228 stars

Calculates and plots daily pivot levels directly on the price chart. It supports Traditional, Fibonacci, and Camarilla calculation formulas to generate a central pivot point along with three support levels and three resistance levels. The script pulls the prev

Indicator v6 Support & resistance
Updated 3 months ago · None stated GitHub repository of Traditional Pivot Points
99 stars

This indicator calculates the Directional Movement Index from true range and plus and minus directional movement, smoothed with Wilder's compensated RMA. It plots the DX line together with plus DI and minus DI in a separate pane and draws a dashed horizontal l

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Directional Movement Index (DX)

KDJ

by mihakralj
47 stars

This indicator plots KDJ, described as an enhanced stochastic oscillator, in a separate pane. It finds the highest high and lowest low over the length with deque buffers, converts close into a raw stochastic value, and smooths K and D with Wilder-style RMA con

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of KDJ

This indicator scores multi-timeframe Stochastic RSI confluence in a separate pane. It calculates a StochRSI reading on six configurable timeframes, dampens exhaustion, then combines adjacent timeframe pairs with a sync bonus or conflict penalty and user pair

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 3 days ago · MIT GitHub repository of MTF StochRSI Pair Score [WavesUnchained]

Gold Breakout Trader

by eddiebelaval
7 stars

Plots timed breakout ranges directly on the price chart, designed for gold trading using dollar-based spacing. At scheduled trigger times or recurring two-hour intervals, it creates a central reference box flanked by upper and lower breakout stop lines, follow

Indicator v6 BreakoutSupport & resistance
Updated 3 months ago · None stated GitHub repository of Gold Breakout Trader

VWAP Bands [trugurpala]

by trugurpala
4 stars

This indicator plots a volume-weighted average price that restarts at the beginning of each daily session, using typical price and cumulative volume. It draws the VWAP line on the price chart and optional standard-deviation bands at two user-set multipliers. B

Indicator v6 VolumeVolatility & bands
Updated 2 months ago · MIT GitHub repository of VWAP Bands [trugurpala]

Fair Value Gaps by DGT

by regalouisei
2 stars

The indicator plots Fair Value Gaps zones on the price chart derived from selected timeframes. It detects imbalances between swing highs and lows then applies chosen fill methods including Wick Sweep and Body Beyond to mark filled gaps. Up to three instances s

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 8 months ago · None stated GitHub repository of Fair Value Gaps by DGT

Parkinson Volatility (PV)

by mushroom-men-Trading
2 stars

This indicator calculates Parkinson volatility from the logarithm of each bar's high divided by its low. It squares that term, smooths it with an RMA over the chosen length, and takes the square root after scaling by four times the natural log of two. When ann

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Parkinson Volatility (PV)

USI Flip + Lines

by skipp-dev
1 stars

This indicator calculates and plots a multi-line Ultimate Strength Indicator (USI) ribbon based on six relative strength lines ranging from slow to fast in a separate pane. It identifies momentum flip signals when fast lines cross slower lines with an adjustab

Indicator v6 Oscillators & momentumVolume Repaints
Updated 4 days ago · None stated GitHub repository of USI Flip + Lines

Percent Rank Reversion

by pineforge-4pass
1 stars

This strategy measures the percentile rank of bar-to-bar close changes and plots that rank in a separate pane with a five-bar simple moving average and fixed overbought, oversold, and midline levels. It enters long when the rank is below the oversold threshold

Strategy v6 Oscillators & momentumMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of Percent Rank Reversion

P_syn_functions

by GammaExpansion
1 stars

This Pine Script v6 indicator defines helper functions for value transformation and calculation. It includes double which multiplies by two, add which sums values with optional second argument, clamp which bounds a value between low and high, smooth which appl

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

An overlay indicator that tracks pivot, session, previous-day and flipped support and resistance levels and records how price reacts when it tests them. Each trial resolves into break, fade, fail or expire, and a Bayesian-style model sorted into twelve context

Indicator v6 Support & resistanceSessions & time Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Trading Coach - Hybrid S/R Reaction Probability

DEPV2 DEBUG S39

by YuceSezar89
1 stars

DEPV2 DEBUG S39 is a multi-asset signal evaluation indicator designed to monitor up to twenty cryptocurrency pairs simultaneously. It processes four analytical categories—trend, momentum, volatility, and volume—to evaluate market direction. Users can configure

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

CODEX NO1 Flip Engine v3

by vedkanani123
1 stars

A confirmed-close trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. Version 3 adds an adaptive KAMA component to the baseline and a reversal acceptance step that checks directional energy, close locatio

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NO1 Flip Engine v3

This strategy combines a simplified Lorentzian distance-based machine learning prediction with a three-factor filter matrix to generate trade signals. It normalizes RSI, CCI, ADX, and momentum over rolling windows to evaluate feature distance, while scoring tr

Strategy v6 AI / machine learningTrend
Updated 2 months ago · None stated GitHub repository of TN ML Matrix Ensemble Sovereign v6
1 stars

Plots the time weighted average price on the price chart: a running average of a chosen source, ohlc4 by default, that restarts whenever the selected anchor period begins, one day by default. Inputs set the anchor timeframe, source and an offset. Unlike VWAP,

Indicator v6 Support & resistanceMean reversion
Updated 1 year ago · None stated GitHub repository of Time Weighted Average Price

Trend Line Plot Indicator

by TradersPost
228 stars

The Trend Line Plot Indicator automatically identifies pivot highs and lows across price history and draws dynamic bullish and bearish trend lines directly on the price chart. Users can adjust the pivot lookback length, filter lines based on a minimum number o

Indicator v6 Support & resistanceTrend
Updated 3 months ago · None stated GitHub repository of Trend Line Plot Indicator
99 stars

Plots one component of an à trous stationary Haar discrete wavelet transform of a chosen source in a separate pane. Decomposition levels from one to eight set the lookback, which doubles with each level. Output zero returns the deepest approximation, described

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Discrete Wavelet Transform (DWT)
47 stars

This indicator calculates and plots a standard Keltner Channel directly on the price chart. It generates an exponential moving average middle line alongside upper and lower bands spaced by an Average True Range multiplier. The implementation features warm-up c

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Keltner Channel (KCHANNEL)

MTF Structure Bias classifies market structure across four timeframes by comparing rolling highest highs and lowest lows N bars ago. Each timeframe receives a bullish (+1), bearish (-1), or mixed (0) state based on whether highs and lows are rising or falling.

Indicator v6 SMC / ICT / price actionScreeners & dashboards
Updated 3 days ago · MIT GitHub repository of MTF Structure Bias [WavesUnchained]

GT EMA

by eddiebelaval
7 stars

This strategy uses two EMAs with a trend filter to generate crossover signals on the price chart. It applies game theory validation through Nash equilibrium detection and expected utility calculations based on RSI and volume. Trades enter on confirmed crossove

Strategy v6 TrendOscillators & momentum Repaints
Updated 3 months ago · None stated GitHub repository of GT EMA

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