Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts

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

About Pine Script v6 Scripts

Pine Script v6 is the current version of the language. A script declares its version on its first line, //@version=6, and TradingView compiles it with that version's rules.

Newer is not the same as better: a v6 script can still repaint or overfit. But v6 scripts are the easiest to read and extend, because they use the current names for every built-in function.

510 of these 4,367 scripts are marked Repaints, or read higher-timeframe data with lookahead on.

Before You Use One

Pine Script v6: Indicators, Strategies and Libraries

Chandelier Exit

by everget
947 stars

This indicator plots an ATR-based Chandelier Exit trailing stop on the price chart. It tracks a long stop under recent highs and a short stop above recent lows, then switches direction when price crosses the opposite stop. Buy and sell labels mark those flips.

Indicator v6 Volatility & bandsTrend Repaints
Updated 11 days ago · GPL-3.0 GitHub repository of Chandelier Exit
575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator

This strategy calculates and plots a fast Exponential Moving Average (EMA) and a slow EMA directly on the main price chart. It enters long trades when the fast EMA crosses above the slow EMA and exits when the fast EMA crosses below the slow EMA. Inputs allow

Strategy v6 TrendMoving averages
Updated yesterday · AGPL-3.0 GitHub repository of Forven S01508 — Simple EMA20/50 Cross

[TVT] VIX Squeeze

by namuan
318 stars

Calculates the standard deviation of VIX high prices across a configurable lookback period. It plots the resulting volatility metric in a separate pane alongside upper and lower threshold horizontal levels. When the standard deviation falls below the lower thr

Indicator v6 Volatility & bands
Updated 2 months ago · MIT GitHub repository of [TVT] VIX Squeeze

NVDA Trend Ribbon

by longsurf-ai
280 stars

This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre

Indicator v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of NVDA Trend Ribbon
257 stars

This indicator plots auto trade signals for E-mini S&P 500 futures on the price chart. It computes an EMA200 filter along with day ETH RTH session levels and percentage-based entry zones. Signals trigger CALL or PUT cases when price crosses defined thresholds

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Auto Trade Futures ES
228 stars

Confluence of Alerts is an overlay indicator that combines up to three user-defined conditions on the price chart. Each condition watches a price source for crossing, crossing up or down, greater than, less than, rising, or falling events against a numeric val

Indicator v6
Updated 3 months ago · None stated GitHub repository of [TradersPost] Confluence of Alerts

MACD Crossover (tutorial)

by pineforge-4pass
193 stars

This strategy calculates the Moving Average Convergence Divergence indicator and plots the MACD line, signal line, and histogram in a separate pane. It enters long positions when the MACD line crosses above the signal line and enters short positions when it cr

Strategy v6 Oscillators & momentumMoving averages
Updated yesterday · Apache-2.0 GitHub repository of MACD Crossover (tutorial)

Open Source Fractal

by cantolab
183 stars

This indicator implements the Fractal Model concept to plot market structure shifts, liquidity sweeps, and Change in State of Delivery (CISD) levels. It overlays custom higher-timeframe candle previews, open prices, and time markers directly on the price chart

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MIT GitHub repository of Open Source Fractal

Swing Failure Signals

by Ganador1
154 stars

This indicator calculates pivot highs and pivot lows to detect liquidity sweeps and Swing Failure Patterns. It identifies when price breaks past recent key swing highs or lows within a configurable historical window, then looks for a quick reversal or change i

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Apache-2.0 GitHub repository of Swing Failure Signals

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

Unicorn Model

by fxraptor-alpha
138 stars

The Unicorn Model indicator identifies liquidity sweeps across multiple higher timeframes and highlights breaker blocks on the price chart. When Unicorn Mode is enabled, it filters setups where breaker blocks overlap with Fair Value Gaps. It draws breaker boxe

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 weeks ago · Custom licence GitHub repository of Unicorn Model

8zz反指標v2

by hansai-art
121 stars

The 8zz Contrarian Indicator plots reverse sentiment trading signals directly on the price chart based on tracked retail post activity. It generates bullish signals during retail panic and bearish signals during market euphoria. The indicator features adjustab

Indicator v6 Moving averagesOscillators & momentum
Updated 3 months ago · None stated GitHub repository of 8zz反指標v2
105 stars

Gold Scalping BOS & CHoCH is an overlay strategy designed for detecting market structure shifts. It calculates rolling swing highs and lows to identify Break of Structure (BOS) and Change of Character (CHoCH) events. Long signals trigger when bullish BOS and C

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Gold Scalping BOS & CHoCH

Aberration (ABERR)

by mihakralj
99 stars

The Aberration indicator calculates channel bands based on the absolute deviation of a price source from a central moving average. Traders can choose between SMA, EMA, WMA, RMA, or HMA for the baseline, then apply a multiplier to the smoothed deviation to form

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Aberration (ABERR)
92 stars

This indicator plots horizontal liquidation heatlines directly on the price chart, highlighting estimated Bitcoin liquidation levels for long and short positions. It renders color-coded lines and descriptive labels showing position sizes, leverage, and distanc

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Liq Lines — BTC

This strategy builds a spot grid between user-set high and low prices and draws it on the price chart. It splits that range into ten levels and places up to five long limit orders at the lower levels, sizing each from current equity. Orders already below price

Strategy v6 Support & resistanceMean reversion Repaints
Updated 6 weeks ago · None stated GitHub repository of Grid Spot Trading Algorithm [The Quant Science]

Machine Learning: Lorentzian Classification

by artificial-intelligence-edge
75 stars

An overlay indicator that applies a k-nearest-neighbors machine learning classifier using Lorentzian distance to predict price movement. It evaluates historical market features, such as RSI, WaveTrend, CCI, and ADX, to identify similar price-time patterns and

Indicator v6 AI / machine learningOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Machine Learning: Lorentzian Classification

Session Edge Probabilities

by TraderOracle
61 stars

Session Edge Probabilities tracks eight session-based trading rules using statistical probabilities evaluated on historical chart data. It utilizes a fixed calculation timeframe to evaluate opening ranges, midnight levels, afternoon reversal windows, and price

Indicator v6 Sessions & timeScreeners & dashboards
Updated 10 days ago · None stated GitHub repository of Session Edge Probabilities

Minimal Fill Examples

by frizLabz-FFriZz
59 stars

Minimal Fill Examples is an educational reference script demonstrating five basic implementations of the fill function in Pine Script. It calculates simple moving averages and plots price lines alongside horizontal reference levels. The script showcases variou

Indicator v6 Moving averagesSupport & resistance
Updated 1 year ago · MIT GitHub repository of Minimal Fill Examples

Momentum Rider Alerts

by greenpeas007
58 stars

Momentum Rider Alerts is an indicator overlay designed to generate momentum signals on the price chart. It visualizes price momentum dynamics and triggers real-time alerts when momentum conditions are met. Users can apply this tool across various markets to id

Indicator v6 Oscillators & momentumTrend
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider Alerts

BTC Futures MACD

by iamrichardD
57 stars

This strategy plots a MACD oscillator in a separate pane and trades Bitcoin futures from zero-line and signal-line crosses. Optional early momentum signals, a volume filter, and a trend moving-average filter can confirm entries. It sizes positions as fixed con

Strategy v6 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of BTC Futures MACD

Calculates higher-timeframe volume profiles to identify Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC) levels directly on the price chart. It flags potential reversal setups and Change in State of Delivery (CISD) patterns relative to v

Indicator v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of CandelaCharts - Value Area Reversals
55 stars

This Pine Script indicator overlays institutional liquidity levels on the price chart. It identifies order block levels using pivot highs and lows, then draws mean reversion lines from the 20 and 50 period simple moving averages, a volatility range midpoint pr

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 6 months ago · Apache-2.0 GitHub repository of AAPL Institutional Liquidity Grid
53 stars

Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi

Indicator v6 TrendSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Apex Trend & Liquidity Master

SSE Index RSI Bounce Strategy

by zhutoutoutousan
49 stars

SSE Index RSI Bounce Strategy is a multi-timeframe momentum and trend strategy that combines daily and weekly Relative Strength Index (RSI) bounds with Exponential Moving Averages (EMA). It identifies long entries when daily or weekly RSI crosses up from overs

Strategy v6 Oscillators & momentumTrend Repaints
Updated 3 months ago · Custom licence GitHub repository of SSE Index RSI Bounce Strategy

Aberration (ABBER)

by mihakralj
47 stars

This indicator plots Aberration bands on the price chart around a central moving average. It measures the absolute deviation of the source from that average, smooths the deviation with a simple moving average, and offsets the center by a multiplier to form upp

Indicator v6 Moving averagesVolatility & bands
Updated 8 months ago · MIT GitHub repository of Aberration (ABBER)

4H Candle Curves

by TamaraKGreen
46 stars

4H Candle Curves highlights 4-hour trading sessions based on New York time by overlaying customizable colored boxes directly on the main price chart. It divides 4-hour sessions with quarter separator lines at one-hour intervals and places name labels at the mi

Indicator v6 Sessions & timeScreeners & dashboards
Updated 7 weeks ago · None stated GitHub repository of 4H Candle Curves

Peak Reversal v3

by Zettt
43 stars

Peak Reversal v3 identifies potential mean-reversion points by plotting configurable Keltner Channels alongside a squeeze detector directly on the price chart. It detects momentum extremes when candles cross or trade completely outside the inner or outer chann

Indicator v6 Mean reversionVolatility & bands
Updated 1 year ago · None stated GitHub repository of Peak Reversal v3

Bradley Siderograph: Blueprint_So9

by blueprintresearch-dev
42 stars

This indicator plots Donald Bradley's siderograph as a weighted sum of planetary longitude aspects and declination parallels and contraparallels. It draws the sidereal potential, optional long-term and mid-term curves, and a Mars-Venus declination factor on th

Indicator v6 Screeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Bradley Siderograph: Blueprint_So9
41 stars

This indicator transforms standard RSI calculations into logit space, estimating rolling distributions to derive empirical z-scores mapped back to the 0–100 RSI scale. Plotted in a separate pane, it features multi-horizon central lines—fast and structural cent

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 days ago · None stated GitHub repository of Calibrated RSI Position Zones
39 stars

This intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th

Strategy v6 BreakoutSessions & time Repaints
Updated 5 days ago · MIT GitHub repository of Futures Intraday Pro (ES/NQ) Strategy

This macro indicator analyzes international and domestic transmission channels affecting Vietnamese government bond yields. Plotted in a separate pane with diagnostic tables and background shading, it tracks six macro pathways including Japanese yields, Yen ca

Indicator v6 Screeners & dashboards

Extension Functionality Test

by tradesdontlie
33 stars

Extension Functionality Test is a Pine Script v6 script designed to evaluate editor extension capabilities such as syntax highlighting, code completions, hover documentation, and static analysis. The code demonstrates various Pine v6 features, including dynami

Indicator v6
Updated 8 days ago · MIT GitHub repository of Extension Functionality Test
32 stars

Ghost Channels fits dynamic parallel trend channels over a configurable lookback window using linear regression or pivot swing methods. It layers confirmation signals onto the channel geometry, detecting candlestick pattern reactions at the rails, volume-confi

Indicator v6 TrendBreakout
Updated 3 days ago · MIT GitHub repository of Ghost Channels [mph1nance]

Zen ABR Against

by Zen-Tim
29 stars

This overlay indicator measures average bar range as a simple moving average of high minus low, then draws short horizontal ticks at one to four times that range above and below the close. The user chooses which multipliers appear, their colors, and the line w

Indicator v6 Volatility & bandsSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Against
29 stars

This indicator calculates a dynamic trend-following line on the price chart by combining custom Supertrend calculations with exponential rate scaling. It identifies trend direction based on price crossovers against ATR-based distance bands. As a trend persists

Indicator v6 TrendVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Exponential Trend [AlgoAlpha]

Test Script

by iamrichardD
29 stars

This indicator is a short Pine Script v6 test fixture for function signature checks. It calculates a 14-period simple moving average of the close and calls alert with a fixed message. The remaining lines deliberately misuse functions, including an extra argume

Indicator v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Test Script

Auto Fib Extension

by heyphat
26 stars

Auto Fib Extension automatically identifies high and low pivot points on the price chart to construct Fibonacci extension levels. The script calculates pivot points based on a user-defined depth setting and tracks significant swing points using dynamic chart p

Indicator v6 Support & resistance Repaints
Updated 2 months ago · AGPL-3.0 GitHub repository of Auto Fib Extension

Debug Test

by jpantsjoha
23 stars

Debug Test is a minimal example script written in Pine Script v6 designed for editor testing and extension validation. It demonstrates basic input parameter definitions, configuring a boolean toggle and a color selection setting without executing complex calcu

Indicator v6
Updated 3 weeks ago · Custom licence GitHub repository of Debug Test

Stocks - Bullish Engulfing

by LouisLetcher
23 stars

This Pine Script strategy identifies classic bullish engulfing candlestick patterns to open long positions, deploying 100 percent of equity. It calculates a short-term Relative Strength Index to determine exits, closing open long positions when the RSI exceeds

Strategy v6 Candlestick patternsOscillators & momentum
Updated 3 months ago · Custom licence GitHub repository of Stocks - Bullish Engulfing

PVP | Key Levels

by abbaselmas
21 stars

This indicator draws a periodic volume profile on the price chart and marks the point of control plus optional value-area high and low. It distributes each bar's volume across profile rows using a selected periodic timeframe, row count, value-area percentage,

Indicator v6 VolumeSupport & resistance Repaints
Updated 8 days ago · None stated GitHub repository of PVP | Key Levels

Complete

by ferranbt
21 stars

Complete is a short Pine Script v6 indicator used as an editor completion fixture. It declares a user-defined Point type with float fields, constructs one instance, and reads its x coordinate. It also calculates a five-bar simple moving average of the close an

Indicator v6 Moving averages
Updated 7 weeks ago · MPL-2.0 GitHub repository of Complete
21 stars

This script serves as a syntax demonstration and test suite for Pine Script v6 type declarations, created primarily for testing editor syntax highlighters and themes. It defines user-defined types, exported enums, and demonstrates various variable forms across

Indicator v6 Repaints
Updated 1 year ago · MIT GitHub repository of Type Declaration Coverage

Crypto Context Dashboard

by zabor-crypto
20 stars

This indicator draws a visual present-state context panel on the price chart. It classifies volatility from ATR and Bollinger bandwidth percentiles, measures how far price sits from an EMA in ATR units, and scores trailing candle noise with wick ratio, directi

Indicator v6 Screeners & dashboardsVolatility & bands
Updated 4 days ago · MIT GitHub repository of Crypto Context Dashboard

Bandz HTF

by samuelharting
18 stars

Bandz HTF projects higher-timeframe candle structures, ranges, and key levels directly onto the main price chart. It visualizes multiple configurable timeframe lanes from intraday to weekly alongside primary and macro range levels, including 25%, 50%, and 75%

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz HTF

More Pine Script Categories

Browse the whole Pine Library

Related on ForexR

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.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers