Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 65)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

Hurst Peak Marker V4

by mikeyhu70
1 stars

A Pine Script v5 indicator in a separate pane, the fourth revision of a Hurst cycle peak marker. It runs the hl2 price through bandpass filters covering cycles from 1 day to 18 years, then draws labels and lines at detected peaks. Each cycle has separate bandw

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Peak Marker V4

HarmonicPattern

by ricardosantos79
261 stars

This Pine Script library provides helper functions to detect and validate harmonic patterns using price and time ratio calculations. It includes utilities to calculate price and time rates between consecutive pattern points, check if values fall within specifi

Library v5
Updated 4 years ago · None stated GitHub repository of HarmonicPattern

Snag - SPY

by dearvn
257 stars

Snag - SPY is an overlay indicator that tracks market trends using three Weighted Moving Averages (WMA 13, WMA 48, and WMA 200). It plots the three WMAs directly on the main price chart and calculates crossovers between price and the moving averages, as well a

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Snag - SPY

AlphaTrend Strategy

by hasnocool
106 stars

Calculates the AlphaTrend indicator using ATR combined with the Money Flow Index or RSI, plotting the primary trend line and its two-bar lagged counterpart directly on the price chart. The strategy opens long positions when AlphaTrend crosses above its lagged

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of AlphaTrend Strategy
46 stars

Initial Balance Statistical Mapping plots the high, low, and midpoint of a defined initial balance session, such as the first hour of trading, directly on the main price chart. It projects statistical extension levels using fixed percentile multipliers (25th,

Indicator v5 Support & resistanceSessions & time
Updated 8 weeks ago · None stated GitHub repository of Initial Balance Statistical Mapping

Directional Movement Index

by TWODS-CAPITAL
37 stars

This indicator plots the Directional Movement Index in a separate pane. It calculates plus directional movement and minus directional movement from changes in highs and lows, smooths them with the DI length, and derives the ADX from the absolute difference of

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Directional Movement Index

FilledValueGap A006

by ruckard
13 stars

This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap A006
6 stars

Apex Protocol - The SMC Engine is a Smart Money Concepts indicator designed for price chart analysis across multiple timeframes. It automatically detects key SMC market structure events including Break of Structure (BOS), Market Structure Shifts (MSS), Order B

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol - The SMC Engine
3 stars

The CSW Ø-Lag Oscillator is a modified MACD indicator designed to reduce lag using zero-lag moving averages and a custom leader calculation. It plots a zero-lag line, a lagging signal line, and a histogram in a separate pane. The oscillator uses three distinct

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of CSW Ø-Lag Oscillator

RoyalPrince Scanner

by IAMATOMIC001
3 stars

This indicator scans multiple symbols using RSI for overbought and oversold levels, TSI for trend strength, ADX for trend direction and strength, and Supertrend for trend reversals. It plots buy and sell signals on the price chart for each enabled symbol based

Indicator v5 Oscillators & momentumTrend
Updated 12 months ago · None stated GitHub repository of RoyalPrince Scanner

SSL Algo

by TamTH-Dev
2 stars

SSL Algo calculates and displays multi-moving-average SSL hybrid channels directly on the price chart. It combines a customizable baseline, a continuation channel, an exit indicator, and optional ATR bands alongside support EMAs. Users can toggle baseline line

Indicator v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of SSL Algo

This indicator plots ICT balanced price ranges together with fair value gaps and inversion fair value gaps on the price chart. It marks bullish and bearish BPR zones and optional FVG and IFVG boxes, then tracks mitigation at a proximal, midpoint, or distal lev

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Balanced Price Range [TradingFinder] BPR | FVG + IFVG

Momentum Indicator Strategy

by wynnforthework
2 stars

This trend-following strategy generates long signals by combining the Stochastic Momentum Index (SMI) with a Supertrend filter. It enters a long position when the SMI signal line crosses above an oversold threshold while the Supertrend indicates an uptrend. Po

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Momentum Indicator Strategy

Draw - Boxes

by Web3Degenerate
2 stars

This educational script demonstrates how to draw and format rectangular boxes on the price chart using Pine Script. It generates a box on the current bar extending ten bars forward, spanning from the bar's low to high, and dynamically colors the fill green or

Indicator v5
Updated 2 years ago · None stated GitHub repository of Draw - Boxes
1 stars

This indicator draws the 5-minute closing price on the chart for multi-timeframe analysis. It takes the number of bars for prediction as an input and initializes an array of predictors with recent close prices. A matrix is prepared for heuristic logic but rema

Indicator v5 AI / machine learning
Updated 2 days ago · None stated GitHub repository of Omni-Resolution Matrix Machine

Hurst Peak Marker V5

by mikeyhu70
1 stars

A Pine Script v5 indicator in a separate pane, the fifth revision of a Hurst cycle peak marker. It filters the hl2 price with bandpass filters from 1 day to 18 year cycles and places labels and lines at cycle peaks. Every cycle has its own bandwidth and period

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Peak Marker V5
330 stars

Strat base [Alorse] is a template strategy script designed as a foundational framework for constructing custom trading logic in Pine Script. It plots a single Exponential Moving Average (EMA) on the main price chart and includes configurable inputs for enablin

Strategy v5 Moving averages
Updated 2 months ago · None stated GitHub repository of Strat base [Alorse]
261 stars

This script provides a function implementation of a Markov Chain Monte Carlo (MCMC) simulation. On the initial chart bar, it generates a probabilistic random walk path where each step has a configured probability of moving up, moving down, or staying unchanged

Indicator v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of Markov Chain Monte Carlo Simulation (MCMC)
257 stars

This indicator marks swing pivot highs and lows on the price chart. It uses left and right bar counts, defaulting to five, to confirm a pivot high and a pivot low. After confirmation it stores the latest high and low and plots them as blue and yellow circles.

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Snag - Swing Pivot HL

Altered OBV On MACD

by hasnocool
106 stars

This strategy calculates and plots 9, 21, 50, 90, and 200-period Simple Moving Averages on the main price chart. It constructs a modified On-Balance Volume (OBV) metric and calculates a MACD oscillator based on this custom volume series rather than price. Long

Strategy v5 Moving averagesVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Altered OBV On MACD
46 stars

This indicator identifies inside bars and outside bars, classifying each by close direction as bullish or bearish. It tracks cumulative occurrences and evaluates how often subsequent price action breaks the high or low of each pattern. A summary table drawn on

Indicator v5 Candlestick patternsScreeners & dashboards
Updated 8 weeks ago · None stated GitHub repository of Inside bar/outside bar - stats

Divergence Indicator

by TWODS-CAPITAL
37 stars

The Divergence Indicator plots an RSI oscillator in a separate pane alongside horizontal lines for oversold, overbought, and middle levels. It scans for regular and hidden bullish and bearish divergences by comparing pivot high and low points of price with tho

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 3 years ago · MIT GitHub repository of Divergence Indicator

FilledValueGap B002

by ruckard
13 stars

FilledValueGap B002 is a strategy designed to execute trades when price moves to fill recently created gaps, operating under the assumption that price action will continue along the main trend direction. It uses Curie moving average closing lines for additiona

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of FilledValueGap B002
6 stars

This indicator plots Smart Money Concepts structures directly on the price chart. It identifies and tracks break of structure markers, market structure shifts, fair value gaps, order blocks, and session ranges across London, New York, and Asian trading hours.

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol - The SMC Engine
3 stars

This strategy plots directly on the price chart, drawing a multi-line stepped channel calculated from a simple moving average of OHLC4 expanded by Average True Range multipliers. It identifies potential mean-reversion setups, executing buy, sell, trim, and exi

Strategy v5 Volatility & bandsMoving averages
Updated 5 months ago · None stated GitHub repository of Current Backtester

RR Dangov

by IAMATOMIC001
3 stars

RR Dangov is a price-chart strategy that combines optional confluence modules for entries. The trader selects a primary and a secondary source from Guppy moving averages, VWAP, an opening-range breakout, Supertrend, or CPR, and can add WaveTrend, stochastic, a

Strategy v5 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of RR Dangov

SuperTrend

by TamTH-Dev
2 stars

SuperTrend indicator calculates ATR-based bands on the price chart and determines trend direction by comparing current price to the bands. It plots upper and lower SuperTrend bands that shift based on price action. Signals trigger when the trend flips from dow

Indicator v5 TrendVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of SuperTrend
2 stars

This indicator detects and plots multi-timeframe order blocks and wick levels as boxes and labels directly on the main price chart. It tracks bullish and bearish order block zones across selectable intervals ranging from 5-minute charts to monthly charts, with

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT MTF Order Block Wicks [MK]

Multi-Order Breakout Strategy

by wynnforthework
2 stars

This breakout strategy enters long positions when the price moves above the upper Bollinger Band, Parabolic SAR, and a 100-period exponential moving average, provided ATR confirms elevated volatility. It allows opening multiple scaled entries up to a user-defi

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multi-Order Breakout Strategy

Draw - Lines

by Web3Degenerate
2 stars

This educational Pine Script indicator demonstrates how to draw and manage custom line objects directly on the price chart. It calculates line endpoints by connecting specified historical low prices and bar indices or timestamps to current bar highs. The scrip

Indicator v5 Support & resistance
Updated 2 years ago · None stated GitHub repository of Draw - Lines
1 stars

A Pine Script v5 indicator in a separate pane, an alternative build of the fifth Hurst peak marker revision. It applies bandpass filters to the hl2 price for cycles from 1 day to 18 years and labels cycle peaks with lines. Bandwidth and period can be set per c

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Peak Marker V5 Alt
330 stars

This indicator plots a Supertrend built from ATR bands on the price chart. It raises a lower band and lowers an upper band from the selected source, then flips trend when the close crosses the opposite band. Green and red broken lines mark the active trend, wi

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend From Scratch [Alorse]

MathComplexArray

by ricardosantos79
261 stars

MathComplexArray is a Pine Script v5 utility library that provides array functions for managing complex numbers. It represents complex arrays as flat float arrays storing interleaved real and imaginary components. The library includes functions to instantiate

Library v5
Updated 4 years ago · None stated GitHub repository of MathComplexArray

Snag - VWAP

by dearvn
257 stars

This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of Snag - VWAP

Anand's Strategy

by hasnocool
106 stars

Anand's Strategy is a multi-timeframe breakout strategy that determines overall bias using daily candle data and triggers entries on 15-minute breakouts. It calculates higher-timeframe trend direction by comparing previous daily closes against daily high and l

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Anand's Strategy
46 stars

Leptokurtic Directional Bias is an overlay indicator that measures kurtosis on a chosen source and marks directional bias on the price chart. The source can be a moving average, ATR, volume, close, or a Bollinger-band trend stop. Bias mode switches among RSI m

Indicator v5 Volatility & bandsMean reversion
Updated 8 weeks ago · None stated GitHub repository of Leptokurtic Directional Bias

Doji

by TWODS-CAPITAL
37 stars

This indicator marks standard doji candles on the price chart. It treats a bar as a doji when the range is positive, the body is no larger than five percent of the range, and the upper and lower shadows are nearly equal. Dragonfly and gravestone variants are e

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Doji

FilledValueGap C002

by ruckard
13 stars

The FilledValueGap C002 strategy opens positions in the opposite direction of filled value gaps, assuming price action will resume the underlying trend after a gap fills. It includes customizable take profit, stop loss based on gap distance or percentage, trai

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FilledValueGap C002

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