Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 66)

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

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts indicator designed for session-based trading. It determines market direction using a higher timeframe Exponential Moving Average and highlights Asian range boundaries alongside London and New York killzones. Th

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

Custom Engulfing

by g-moe
3 stars

Custom Engulfing is an overlay indicator that highlights bullish and bearish candle patterns directly on the price chart using background colors. It identifies a bullish signal when a green candle closes above the prior candle's body and its body length exceed

Indicator v5 Candlestick patterns
Updated 5 months ago · None stated GitHub repository of Custom Engulfing

SAB PRO Pivot Master

by IAMATOMIC001
3 stars

SAB PRO Pivot Master is a price-chart overlay that builds an RSX-style oscillator from a chosen source and length, then compares price extremes with that oscillator over a lookback window to mark pivots and bullish or bearish divergence. Overbought and oversol

Indicator v5 Oscillators & momentumVolatility & bands
Updated 12 months ago · None stated GitHub repository of SAB PRO Pivot Master

ICT Setup 01 TFlab

by alvinng214
2 stars

This indicator detects Fair Value Gaps using a multiplier factor and validity period. It identifies liquidity sweeps and hunts within or outside defined zones to generate long and short signals. Signals can be configured to fire after a specified number of hun

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Setup 01 TFlab

Draw - Plot Character

by Web3Degenerate
2 stars

This educational Pine Script demonstrates how to plot characters and text annotations directly on the price chart using the built-in plotchar function. It checks bar conditions, such as whether a bar is confirmed or represents the chart's last bar, to trigger

Indicator v5
Updated 2 years ago · None stated GitHub repository of Draw - Plot Character

This indicator scans the chart for 101 distinct patterns, including single-bar, two-bar, and multi-bar candlestick patterns, classic chart patterns, and harmonic patterns. It features a complex situation context engine for confluence detection and displays a B

Indicator v5 Candlestick patternsSupport & resistance Repaints
1 stars

A utility indicator that counts combo hits across recent bars in line with a one-bar-one-hit rule. It takes plotted matrix, fair value gap and pullback-and-jump signals from another indicator through source inputs, collapses matrix and gap signals on the same

Indicator v5 Volume
Updated 2 months ago · None stated GitHub repository of Combo Chain Binary Fix (Tick)
1 stars

A Pine Script v5 indicator in a separate pane that plots cycle waves from Hurst-style bandpass filters applied to the hl2 price. A single bandwidth setting is shared by all filters, and each cycle has its own period, from 5 days through weeks and months up to

Indicator v5 Oscillators & momentum
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator
1 stars

A separate-pane indicator that is one component of a weighted scoring system. It plots a 14-period RSI with 30, 50 and 70 reference lines, and detects regular bullish and bearish divergence between price and RSI pivots, labelling them on the pane. Divergence i

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 21 RSI

TTM Squeeze

by Alorse
330 stars

This indicator plots a TTM Squeeze momentum oscillator in a separate pane. It compares a Bollinger Band offset to a Keltner Channel offset and marks the zero line white when the difference is non-negative and black when the bands are inside the channel. A line

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of TTM Squeeze

MathComplexCore

by ricardosantos79
261 stars

This library provides core functions to handle complex numbers in Pine Script v5. Complex numbers are represented as float arrays containing real and imaginary parts. Functions set the real or imaginary component of a number, create new complex numbers from gi

Library v5
Updated 4 years ago · None stated GitHub repository of MathComplexCore
257 stars

This indicator analyzes short-term price action on index futures and options charts by applying Rational Quadratic kernel smoothing to detect sideways consolidation ranges and potential breakouts. It processes pivot highs and lows over customizable loopback pe

Indicator v5 Support & resistanceTrend Repaints
Updated 7 weeks ago · None stated GitHub repository of SPX 30M - Trading Chart

Andean Scalping

by hasnocool
106 stars

Andean Scalping is a Pine Script v5 strategy template designed for backtesting trading signals. It features session and date-range filtering, directional trade toggles for long and short entries, and optional trend filtering tools including higher-timeframe EM

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Andean Scalping
46 stars

This multi-timeframe indicator calculates an adaptive trailing stop line based on Bollinger Bands evaluated on a user-selected resolution. It calculates standard deviation and simple moving average bands from the higher timeframe data, tracking trend shifts wh

Indicator v5 TrendVolatility & bands
Updated 8 weeks ago · None stated GitHub repository of MTF Bollinger Bands Trend Stop

Doji Star - Bearish

by TWODS-CAPITAL
37 stars

This indicator detects and highlights the Bearish Doji Star candlestick reversal pattern directly on the price chart. It checks for an uptrend using simple moving average rules, followed by a long bullish candle and a gapping doji candle. When identified, the

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Doji Star - Bearish

FilledValueGap D003

by ruckard
13 stars

This price-chart strategy opens a position opposite the direction of a newly filled gap, on the idea that price continues the prevailing trend after the gap is filled. Stop loss can be sized from the gap distance and is on by default; take profit, trailing tak

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of FilledValueGap D003

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts overlay indicator designed for session-based market structure analysis. It highlights the Asian range, London and New York killzones, and key daily and weekly price levels. The indicator evaluates higher timefr

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

Custom MACD

by g-moe
3 stars

This indicator plots a MACD line, a signal line, and a histogram in a separate pane. It calculates the oscillator as the difference between a fast and a slow moving average of a chosen source, then smooths that result for the signal. Each average can be an SMA

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Custom MACD

SAIYAN OCC Strategy R5.41

by IAMATOMIC001
3 stars

SAIYAN OCC Strategy is a price-chart strategy that builds a short moving average of open and close prices using TEMA, Hull, or ALMA and colours bars by trend. It can take long, short, or both directions, optionally from Heikin Ashi closes or a multiplied alter

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of SAIYAN OCC Strategy R5.41
2 stars

This overlay indicator marks ICT-style Unicorn setups on the price chart using fair value gaps and breaker blocks. Swing length and FVG sensitivity control how those zones are found, and an optional retracement can be required before a setup is confirmed. It c

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Unicorn | Flux Charts

Draw - Plot Shape

by Web3Degenerate
2 stars

This educational indicator demonstrates how to use the plotshape function to display visual markers on the chart. It evaluates whether the current close is above the previous bar's high (higher close) or below it (lower close). Green upward triangles and HC la

Indicator v5 Breakout
Updated 2 years ago · None stated GitHub repository of Draw - Plot Shape

Poi-Scalp v2

by majixai
1 stars

A strategy that scores market conditions with many weighted components: head and shoulders and double top or bottom pivots, a regression channel with an R-squared filter, polynomial slope, a cosh-based term, skew, divergence, volume flow, VWAP and an ADX plus

Strategy v5 ScalpingSupport & resistance
Updated 2 days ago · None stated GitHub repository of Poi-Scalp v2

0-1 Reversal Signals

by morindok
1 stars

0-1 Reversal Signals tracks consecutive sequences of bullish or bearish candlestick closes to highlight potential trend reversals. It counts consecutive green (1) or red (0) candles and generates visual Buy or Sell shape signals directly on the price chart whe

Indicator v5 Candlestick patternsTrend
Updated 7 weeks ago · None stated GitHub repository of 0-1 Reversal Signals

A Pine Script v5 indicator in a separate pane that plots a Hurst spectral oscillator: the hl2 price is passed through bandpass filters for cycles from 1 day up to 18 years and the cycle waves are drawn together. Bandwidth is set per cycle, with narrower defaul

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator A1.1
330 stars

This indicator plots a TTM Squeeze momentum oscillator and a MACD line in a separate pane. It builds the squeeze oscillator from a linear regression of price against a high-low and simple moving average midpoint, and colors the area by slope and sign. Circles

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of TTM Squeeze + MACD line [Alorse]

MathComplexEvaluate

by ricardosantos79
261 stars

MathComplexEvaluate is a Pine Script v5 utility library designed to evaluate string-based mathematical expressions containing complex numbers. It parses tokens into reverse Polish notation using external helper libraries and computes arithmetic operations such

Library v5
Updated 4 years ago · None stated GitHub repository of MathComplexEvaluate
257 stars

This overlay strategy marks short-term turning points on the price chart and enters SPY option-style trades from them. It plots simple moving averages of highs and lows, draws up and down reversal arrows, and colors bars when a short-term extreme coincides wit

Strategy v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of SPY Options Trading - Alert

Archens Shares

by hasnocool
106 stars

Archens Shares is an intraday breakout strategy designed for session-based trading. It tracks the highest high and lowest low from a 30-minute timeframe during a specified session window, defaulting to 09:45 to 10:15. A long position is entered when the closin

Strategy v5 BreakoutSessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Archens Shares

MTF OHLC stats

by TamaraKGreen
46 stars

This indicator plots previous open, high, low and close levels from a selected timeframe on the price chart. It requests those values with a configurable bar offset and marks a new higher-timeframe session. Users can show only the latest levels, extend the lin

Indicator v5 Support & resistanceScreeners & dashboards Repaints
Updated 8 weeks ago · None stated GitHub repository of MTF OHLC stats

Doji Star - Bullish

by TWODS-CAPITAL
37 stars

This indicator marks a bullish Doji Star on the price chart. It looks for a downtrend, a long black candle, and a following doji whose body sits below the prior candle body. Trend detection can use a 50-period SMA, both 50- and 200-period SMAs, or no filter. A

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Doji Star - Bullish

FilledValueGap E002

by ruckard
13 stars

FilledValueGap E002 is a trading strategy that enters positions opposite to the direction of a filled value gap, operating on the premise that the prevailing trend will resume after gap completion. It utilizes Curie closing moving averages as trend filters to

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

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts charting tool designed to identify session-based setups and market structure shifts. It determines directional bias using a higher-timeframe exponential moving average and highlights key trading windows includi

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

Daily Levels

by g-moe
3 stars

Daily Levels plots horizontal price offset lines based on the current day's open and previous day's close. Users can define two custom price offsets to project key reference levels above opening and closing values. The indicator renders directly on the price c

Indicator v5 Support & resistanceSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Daily Levels

Setup-1

by IAMATOMIC001
3 stars

This indicator plots multiple technical analysis components directly on the price chart, including a Nadaraya-Watson envelope, pivot-based trendlines, and a kernel regression oscillator. It also renders visual overlay panels for the Relative Strength Index and

Indicator v5 TrendOscillators & momentum Repaints
Updated 12 months ago · None stated GitHub repository of Setup-1

This indicator detects multi-timeframe Liquidity Engulfing Candles directly on the price chart. It evaluates bullish and bearish engulfing patterns augmented by optional stop hunt wick filters and close breakout conditions across H1, H4, and current timeframes

Indicator v5 Candlestick patternsSMC / ICT / price action Repaints
Updated 2 months ago · None stated GitHub repository of Liquidity Engulfing & Displacement [MsF]

NASDAQ 100 Peak Hours Strategy

by wynnforthework
2 stars

This Pine Script strategy trades the NASDAQ 100 index during peak hours using EMA crossovers, RSI, and VWAP filters. Long entries occur when close exceeds the 9-period EMA which is above the 21-period EMA, with RSI above 50, price above VWAP, EMAs aligned, and

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of NASDAQ 100 Peak Hours Strategy

Draw Tables

by Web3Degenerate
2 stars

This indicator draws a table on the price chart displaying current open, high, low, and close values. The table is positioned at the top right of the chart. Table cell colors change to green when close exceeds open or red when close is lower, providing a simpl

Indicator v5 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of Draw Tables
1 stars

The 7 Golden MA Detrended Layers indicator calculates seven simple moving averages with period lengths scaled according to powers of the golden ratio (Phi). It subtracts each moving average from the source price to construct seven detrended price oscillator la

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of 7 Golden MA Detrended Layers
1 stars

A diagnostic indicator that marks, on the detection candle, each building block of a combo chain: fair value gap setups, a matrix pattern and a unified combo, separately for bullish and bearish sides. A chain fires when the current and previous candle each car

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Combo Chain Constituents v1

A Pine Script v5 indicator in a separate pane that plots Hurst spectral cycle waves. A selectable source, hl2 by default, is fetched through a security call with lookahead on, then passed through bandpass filters for cycles from 1 day to 18 years. Each cycle h

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator A1.1 (2024)
1 stars

A separate-pane indicator that plots a WaveTrend oscillator and its four-bar signal average around a zero line, then detects regular bullish and bearish divergence between price and oscillator pivots, labelling them on the pane. Lengths are fixed in the code,

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 23 Wave
330 stars

A momentum strategy combining the TTM Squeeze oscillator with an RSI filter. It calculates linear regression momentum relative to Bollinger Bands and Keltner Channels alongside an RSI oscillator. Long signals trigger when momentum rises from below zero while R

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of TTM Squeeze [Alorse]

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