Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 28)

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

Fair Value Gaps

by lunarticktrading
7 stars

This overlay indicator marks fair value gaps and inverse fair value gaps as boxes on the price chart. A mode switch selects standard gaps or inverse gaps, with separate bullish and bearish colors. Optional filters require the three gap bars to share one direct

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of Fair Value Gaps

This indicator overlays a trend and momentum regime filter directly on the price chart. It calculates an Ehlers Highpass Filter to isolate a low-frequency decycler trend line from price data. Additionally, it integrates a DecisionPoint Price Momentum Oscillato

Indicator v6 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Decycler Momentum Regime Filter ~ CharonQuant

Renko Emulator

by suyons
7 stars

This indicator emulates Renko bricks on a standard price chart. It builds a Renko series with either ATR or a fixed traditional box size, then reads that series through security requests. Optional circle plots and fills show the latest brick open and close whe

Indicator v6 Trend
Updated 4 months ago · None stated GitHub repository of Renko Emulator
7 stars

This indicator overlays Bollinger Bands on the price chart and fills the area between upper and lower bands using a color based on Cumulative Volume Delta trend. It plots an EMA 9 line and fills between the EMA 9 and Bollinger basis in green or red depending o

Indicator v6 Volatility & bandsVolume
Updated 5 months ago · None stated GitHub repository of Deep Chart + BB (CVD Internal)

Enhanced DCA Strategy

by SynergOps
7 stars

The Enhanced DCA Strategy invests a fixed dollar amount at regular intervals (daily, weekly or monthly) into the asset after start date, deducting trading fees and tracking total invested, units acquired, current value, profit, ROI, Sharpe ratio, Sortino ratio

Strategy v6 ScalpingMean reversion Repaints
Updated 1 year ago · MPL-2.0 GitHub repository of Enhanced DCA Strategy

Numeric Input Metadata

by pineforge-4pass
6 stars

Demonstrates and tests Pine Script input metadata handling across numeric and other input types. It defines inputs using dropdown options, constant defaults, signed values, range bounds, timestamps, expressions, and colors, then plots the closing price in a se

Strategy v6
Updated 2 days ago · Custom licence GitHub repository of Numeric Input Metadata

Capital41 ADX Filter

by damianpitt
6 stars

This indicator calculates the Average Directional Index alongside positive and negative directional movement lines to assess market trend strength and direction. Displayed in a separate pane, it plots the ADX line, directional lines, and horizontal threshold l

Indicator v6 Trend
Updated 2 months ago · MIT GitHub repository of Capital41 ADX Filter
6 stars

This strategy combines higher-timeframe market bias filtering with an oscillator and ADX trend detection to generate trading signals. It calculates market bias using Heikin-Ashi values across custom timeframes and filters entries using dynamic or static ADX th

Strategy v6 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of EURUSD Synergy + PropEA Hedge

This indicator calculates 1-hour Bollinger Bands and overlays them directly on lower timeframe price charts, such as M15. It fetches hourly middle, upper, and lower band values and locks them until the next hourly bar opens to provide higher-timeframe volatili

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 1 year ago · MIT GitHub repository of H1 Bollinger Bands on M15 (Forward Shifted)

Invalidation Stop Classic

by 345-strategies
5 stars

Invalidation Stop Classic plots a structural TheStrat invalidation stop on the price chart. It stays on one side from the first bar that completed 30-minute and 60-minute extremes exist, then flips immediately when price breaks that line. Tightens come from a

Indicator v6 Support & resistanceSessions & time
Updated 4 days ago · MPL-2.0 GitHub repository of Invalidation Stop Classic

SMA Crossover

by durdenbtc
5 stars

This strategy plots a 14-period and a 28-period simple moving average on the price chart. It opens a long position when the fast average crosses above the slow average and closes that long when the fast average crosses back below. Position size defaults to 100

Strategy v6 TrendMoving averages Repaints
Updated 5 months ago · MIT GitHub repository of SMA Crossover
5 stars

Monthly Candle Closed Yesterday is a price action and Smart Money Concepts helper indicator that plots rolling virtual monthly candles in a separate pane, treating yesterday as the end of the monthly period. It uses daily price data to dynamically calculate op

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 7 months ago · MIT GitHub repository of Monthly Candle Closed Yesterday
5 stars

This indicator builds a synthetic index from a user-supplied list of symbols and plots the result in a separate pane. For each symbol it requests open, high, low, close, two mid prices, inferred volume, inferred volume delta, and inferred tick count, then appl

Indicator v6 Volume
Updated 8 months ago · None stated GitHub repository of Index Construction Tool

Exponential Moving Average

by SiegerTerpstra
5 stars

This indicator calculates an Exponential Moving Average with custom seeding and optional multi-timeframe support. It computes a weighted average of the selected price source over a specified length and allows for an optional secondary smoothing pass. Drawn dir

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Exponential Moving Average
4 stars

This indicator plots directional trade signals, ATR-based target and stop-loss boxes, and SuperSmoother reversal bands directly on the price chart. It evaluates market conditions across selectable technical strategies, displaying confidence scores alongside an

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 2 days ago · None stated GitHub repository of Elton's Predictions Decision Engine

Crypto Cap

by InNoobWeTrust
4 stars

Crypto Cap estimates and plots the individual market capitalization of a cryptocurrency asset in a separate pane. It queries the aggregate cryptocurrency market cap index along with the specific base currency dominance percentage, multiplying them together to

Indicator v6
Updated 2 days ago · None stated GitHub repository of Crypto Cap
4 stars

This indicator plots support and resistance pivot levels, order blocks, market structure changes, and Fibonacci optimal trade entry zones directly on the price chart. It calculates touch counts across dynamic zones, detects chart patterns, and tracks pre-spike

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO — Full Integration

This overlay indicator researches multi-timeframe setup zones for NQ and ES futures on the price chart. It builds chart, five-minute through four-hour zones, including transformed IFVG and BB zones, scores them, and tracks liquidity pools and structure. During

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Futures Setups Research

BB Breakout [trugurpala]

by trugurpala
4 stars

This strategy executes trades based on Bollinger Band breakouts and ATR-based dynamic risk management. It opens a long position when price crosses above the upper Bollinger Band and a short position when price crosses below the lower band, provided no position

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · MIT GitHub repository of BB Breakout [trugurpala]

Power of Three [FEELS]

by VolodymyrFilias
4 stars

This overlay indicator maps the Power of Three cycle on the price chart. It builds an accumulation range around a higher-timeframe cycle open, marks a manipulation sweep beyond that range, and labels the later distribution move in the opposite direction. Confi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Power of Three [FEELS]

Institutional HFT Engine - QuantAlgo

by thesenegalesehitch
4 stars

This strategy evaluates trading opportunities using a probabilistic scoring model combined with Smart Money Concepts (SMC) pattern detection, including Break of Structure (BOS), Fair Value Gaps (FVG), and Order Blocks. It overlays signals directly on the price

Strategy v6 SMC / ICT / price actionSessions & time
Updated 4 months ago · Custom licence GitHub repository of Institutional HFT Engine - QuantAlgo
4 stars

Momentum Rotation (Top 3) ranks ten large-cap US tech stocks by their six-month returns using daily closes. It rebalances monthly and holds the top three performing stocks long only on the price chart. A ranking table shows the current order. Main settings adj

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of Momentum Rotation (Top 3)

Parabolic RSI

by YooooungLee
4 stars

This indicator calculates the RSI oscillator using a user-defined length. It then applies a custom Parabolic SAR function to the RSI values to generate dynamic trend levels that function as support and resistance zones. The SAR levels are plotted in a separate

Indicator v6 Oscillators & momentumSupport & resistance
Updated 10 months ago · Apache-2.0 GitHub repository of Parabolic RSI
4 stars

This indicator serves as a test script for Pine Script v6 to demonstrate and validate user-defined functions that return tuples. It defines custom functions returning numeric arithmetic pairs, boolean price conditions, mixed-type tuples, and technical indicato

Indicator v6
Updated 1 year ago · Custom licence GitHub repository of User Function Tuple Test
4 stars

This strategy plots a 10-period and a 30-period simple moving average on the price chart. It opens a long position when the faster average crosses above the slower one and closes that long when the faster average crosses back below. Green and red markers and p

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Simple Auto Buy/Sell Strategy

Higher Timeframe Trend

by degenview
3 stars

This indicator plots an exponential moving average taken from a selected higher timeframe and colors both the line and the chart background by whether the close is above or below that average. It requests the EMA through request.security and, when the chosen t

Indicator v6 TrendMoving averages
Updated 2 days ago · GPL-3.0 GitHub repository of Higher Timeframe Trend

ZigZag OrderBlock Retracement

by ricksimpsontrading
3 stars

ZigZag OrderBlock Retracement plots multi-layer ZigZag swing structures, order blocks, breaker blocks, and optimal trade entry (OTE) zones directly on the price chart. It supports up to four distinct ZigZag depth layers to analyze both short-term and long-term

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 10 days ago · None stated GitHub repository of ZigZag OrderBlock Retracement

Supertrend

by AkashSasikumar47
3 stars

This script plots up to three ATR-based Supertrend lines directly on the price chart. Each line uses customizable ATR periods and multipliers to establish trailing support or resistance levels based on median price calculations. Green lines below price indicat

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Supertrend

Overlay Scaffold

by jpantsjoha
3 stars

This indicator plots a fast and a slow exponential moving average on the price chart. It marks bullish and bearish crosses with optional labels and circle markers, and it shades the background according to which average is higher. Users can change both lengths

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Custom licence GitHub repository of Overlay Scaffold

Stella's Smart Money Proxy

by stella-entry
3 stars

This indicator detects institutional or large-scale market activity using candle body size and trading volume. It compares current candle bodies against a 20-period simple moving average and checks for volume spikes above an adjustable moving average filter. I

Indicator v6 VolumeCandlestick patterns
Updated 8 months ago · MIT GitHub repository of Stella's Smart Money Proxy
3 stars

This indicator computes Root Mean Square Error (RMSE) relative to benchmark moving averages such as EMA or ALMA and applies Bollinger Band envelopes or iterative loop thresholds. It plots the RMSE metric and threshold bands in a separate pane to signal trend c

Indicator v6 Volatility & bandsMoving averages
Updated 12 months ago · None stated GitHub repository of RMSE Bollinger Bands + Loop | Lyro RS

Spot Buy Marker + PnL

by shitcoding
3 stars

The Spot Buy Marker + PnL indicator tracks manual spot trading positions directly on the price chart. Users specify a buy price, entry timestamp, and either coin quantity or total USD investment. The script computes real-time profit and loss as a percentage of

Indicator v6 Support & resistanceScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Spot Buy Marker + PnL

SPX/Gold Ratio Bubble Detector

by EngineeredSuccess
3 stars

Calculates the price ratio between the S&P 500 (defaulting to SPY) and Gold (defaulting to GLD) to evaluate macro valuation extremes. It tracks the ratio alongside a simple moving average and evaluates market status across customizable warning, danger, and ext

Indicator v6 Moving averagesSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of SPX/Gold Ratio Bubble Detector

QQQ 5min Pure Runner

by yalili8521
2 stars

This strategy identifies trend continuation and accumulation setups on 5-minute charts. It enters long or short positions based on an aligned moving average stack, rising or falling price grinds within a lookback period, and a maximum bar size threshold to avo

Strategy v6 TrendMoving averages
Updated 9 days ago · None stated GitHub repository of QQQ 5min Pure Runner

This strategy identifies trend pullback entries using MACD signal line crossovers plotted in a separate indicator pane. Long trades enter on bullish MACD crossovers below the zero line when price is above a trend EMA and ADX exceeds a minimum threshold, with r

Strategy v6 TrendOscillators & momentum
Updated 2 weeks ago · MIT GitHub repository of MACD Pullback Sniper | Trend + ADX Filtered Strategy

Pivots + Key Levels MP

by midngtpickle
2 stars

This indicator calculates and plots multi-timeframe pivot points using Fibonacci or Camarilla formulas alongside key higher-timeframe and session levels directly on the price chart. It renders support and resistance lines from S1/R1 through S5/R5 and session r

Indicator v6 Support & resistance Repaints
Updated 4 weeks ago · Custom licence GitHub repository of Pivots + Key Levels MP

Market Cipher B

by TamTH-Dev
2 stars

Market Cipher B is a multi-oscillator indicator that draws in a separate pane. It plots a Wave Trend line from a channel period, an average period, a moving-average source, and a moving-average length, with optional divergence markers at long and short bullish

Indicator v6 Oscillators & momentumDivergence
Updated 6 weeks ago · None stated GitHub repository of Market Cipher B
2 stars

This strategy fades liquidity sweeps of confirmed swing highs and lows. It enters a reversal only after price sweeps a prior swing and closes back inside the range. The stop sits an ATR multiple beyond the sweep wick, the target is a fixed reward-to-risk multi

Strategy v6 SMC / ICT / price actionMean reversion
Updated 2 months ago · Custom licence GitHub repository of Liquidity Sweep Reversal [Vantrade]

SMC Flow System plots smart money concepts and market structure directly on the price chart. It identifies internal and external swings, marking Break of Structure (BOS), Change of Character (CHoCH), and swing highs or lows according to customizable sensitivit

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of SMC Flow System – by Fatich.id

Chart Visualization

by danielbodnar
2 stars

A Pine Script visualization script demonstrating custom technical drawing techniques on price charts. It plots a 20-period simple moving average with dynamic color intensity derived from price momentum, marks inside and outside bar patterns using shapes, and l

Indicator v6 TrendCandlestick patterns
Updated 2 months ago · MIT GitHub repository of Chart Visualization

ICT FVG Buy/Sell Signals

by alvinng214
2 stars

Calculates three-bar Fair Value Gaps (FVG) and pivot-based dealing ranges to generate buy and sell signals directly on the price chart. It determines premium and discount zones relative to the dealing range equilibrium and colors the background accordingly. A

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT FVG Buy/Sell Signals
2 stars

This indicator calculates the proportion of trading volume that occurs within a user-defined time window in the America/New York timezone. On intraday charts, it evaluates whether the current bar falls inside the session, while on higher timeframes it retrieve

Indicator v6 VolumeSessions & time
Updated 3 months ago · Apache-2.0 GitHub repository of Filtered Volume Markers

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