Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 55)

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

Corpus EMA Cross

by Snappni
1 stars

Corpus EMA Cross is a strategy that plots two exponential moving averages on the price chart. The fast EMA uses a length of 12 and the slow EMA uses 26. It generates long entries on the crossover of the fast line above the slow line and short entries on the cr

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus EMA Cross

JTrader EMA Zone Inversion

by Focal-QuantAI
1 stars

An indicator on the price chart based on EMAs of 33, 50 and 200 bars. It looks for fair value gaps inside a maximum age and signals when a gap is inverted, drawing the inverted gap box. A pivot count filter can restrict signals to single or multiple pivots. Se

Indicator v5 SMC / ICT / price actionTrend
Updated 6 months ago · None stated GitHub repository of JTrader EMA Zone Inversion

Stochastic+SQZMOM_LB_v1

by gabriel-klettur
1 stars

This strategy plots exponential moving averages of 10, 55 and 200 on the price chart and shades the background when a smoothed stochastic is oversold or overbought. It opens long positions when the stochastic K line crosses above D below the oversold level, in

Strategy v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of Stochastic+SQZMOM_LB_v1

Inside Bar Breakout

by Basant1Saini
1 stars

Inside Bar Breakout identifies standard and double inside bar candlestick patterns to trade breakout momentum. It sets trigger levels using reference bar extremes plus an adjustable percentage buffer. Once a pattern forms, the strategy waits up to five bars fo

Strategy v5 Candlestick patternsBreakout
Updated 8 months ago · None stated GitHub repository of Inside Bar Breakout

Thrust Breakout Algorithm

by Tradehook-org
1 stars

A Pine v5 script that looks for a price thrust followed by a pullback entry on the price chart. A thrust is a rate of change beyond a percent threshold. A pullback is price easing back toward a short EMA or by a small tolerance after the thrust bar, and an RSI

Indicator v5 Oscillators & momentumBreakout
Updated 8 months ago · None stated GitHub repository of Thrust Breakout Algorithm

SPY Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from an o

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPY Gamma (1DTE)

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy plots entry and exit signals on the price chart for E-mini S&P futures. It fades price action after the opening range closes during regular trading hours. The strategy declares a fixed position size of one contract with $2.01

Strategy v5 Mean reversionSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
1 stars

This technical indicator plots multiple analytical components directly on the price chart, combining Bollinger Bands, moving averages, relative strength index calculations, and average true range measurements. It generates buy and sell signals based on volatil

Indicator v5 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Ultimate Buy and Sell Indicator
1 stars

An indicator on the price chart that filters price with a range-based line. The smoothed average absolute price change over a sampling period, 100 by default, is multiplied by a range multiplier to give a band size. The filter only moves when price leaves the

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Range Filter Buy and Sell 5min
1 stars

This overlay indicator simulates a date-bounded Bitcoin dollar-cost average and separate long and short value-averaging books. Inside the start and end dates it adds a fixed USDT amount each bar, converts it at the close into BTC, and updates average price and

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 04 Long/Short DCA+VA
1 stars

An indicator that detects classic candlestick patterns and marks them with labels on the price chart. Patterns include engulfing, hammer, shooting star, doji variants, morning and evening stars, harami cross, dark cloud cover and piercing. Each pattern can be

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns

Technical Analysis Namespace

by fiji-solutions
1 stars

This indicator calculates common technical analysis variables including RSI, Stochastic Oscillator, EMA moving average, ATR volatility, and MACD with signal and histogram. It plots the MACD line, signal line, and histogram in a separate pane. The script serves

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of Technical Analysis Namespace

Max Index

by JohnsonHsiao
1 stars

Max Index is an oscillator that measures range expansion and contraction over rolling periods. It calculates a rolling high-low range over a user-defined lookback window, applies double exponential smoothing to that range, computes the ratio between the two sm

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Max Index

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

Function - Linear Regression

by ricardosantos79
261 stars

This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function - Linear Regression

ESU2023 Futures 1M

by dearvn
257 stars

This strategy calculates volume-weighted moving averages and standard deviation Fibonacci channels using price data from multiple timeframes. It overlays these volatility bands directly on the main price chart to identify potential trend levels. Automated trad

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of ESU2023 Futures 1M

8D Run

by hasnocool
106 stars

8D Run is a Pine Script momentum strategy inspired by Linda Bradford Raschke. It tracks consecutive price closes relative to a 5-period Simple Moving Average (SMA). When price remains above the SMA for 8 or more bars and then dips below it, the strategy enters

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 8D Run

Linefill demo

by be-thomas
65 stars

This indicator draws a channel between the most recent confirmed pivot highs and pivot lows on the price chart. It stores the last two pivot high prices and the last two pivot low prices, then, on the last confirmed historical bar, extends a line through each

Indicator v5 Support & resistance
Updated 6 days ago · GPL-3.0 GitHub repository of Linefill demo
37 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average and a multiple of standard deviation. It places a long stop entry when close crosses above the lower band and a short stop entry when close crosses below the upper band. Pendi

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · MIT GitHub repository of Bollinger Bands Strategy directed

Zen Gaps v5.0

by Zen-Tim
29 stars

This indicator draws colored boxes on the price chart to highlight gaps between bars. It detects bullish gaps when the current low exceeds the prior bar's high and bearish gaps when the current high falls below the prior bar's low. Strong gaps receive extra em

Indicator v5 Support & resistanceCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen Gaps v5.0

Template

by benso87
24 stars

This is a template script for a TradingView Pine Script indicator. It provides empty sections for inputs, functions, calculations, plots, and alerts, plus helper functions for moving average types. Users must add their own code to implement logic. No calculati

Indicator v5 Moving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Template

Divergenced K002

by ruckard
13 stars

This strategy enters on divergences between Squeeze Momentum section changes and price, confirming the pattern across two pairs at once. A smaller squeeze with higher price opens a short; a higher squeeze with lower price opens a long. Curie closing moving ave

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced K002

MA ROC Strategy

by suyons
7 stars

MA ROC Strategy calculates five configurable moving averages (SMA, EMA, or WMA) and plots ATR-based Keltner Channels directly on the price chart. It combines moving average crossovers and Rate of Change (ROC) calculations to generate long and short trading sig

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · None stated GitHub repository of MA ROC Strategy
6 stars

This strategy detects key support and resistance zones based on candle wick rejections and liquidity sweeps. It filters trade setups using an exponential moving average and optional higher-timeframe trend confluence, while also permitting high-confidence count

Strategy v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Wick Rejection S/R Strategy v3

Elton's Kimi Claw

by eltonaguiar
4 stars

This indicator calculates a composite volume score using relative volume ratios, short-term volume trends, moving averages, and spike thresholds. It plots buy and sell signals directly on the price chart alongside Average True Range based take-profit and stop-

Indicator v5 VolumeVolatility & bands
Updated 2 days ago · None stated GitHub repository of Elton's Kimi Claw
4 stars

The Smart Money Concepts Analyzer draws key price action zones directly on the main price chart. It identifies bullish and bearish order blocks using historical candle sequences, highlights fair value gaps exceeding a user-defined percentage threshold, labels

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Smart Money Concepts Analyzer [Lab]
3 stars

This indicator plots the Parabolic SAR on the price chart and identifies trend reversals with buy and sell labels. It features multi-symbol screening capability, allowing traders to monitor predefined symbol groups or custom BIST stock lists on a selectable ti

Indicator v5 TrendScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Parabolic SAR Tarama

jash_GGMA_Granville

by jash-git
3 stars

This indicator implements a modified Guppy Multiple Moving Average (GMMA) framework based on Granville's trading rules. It calculates and plots five Fibonacci-based exponential moving averages (3, 13, 34, 55, and 144 EMAs) directly on the price chart. When the

Indicator v5 Moving averagesTrend
Updated 4 weeks ago · None stated GitHub repository of jash_GGMA_Granville
3 stars

Consecutive Candle Levels identifies sequences of consecutive bullish or bearish candles to establish price ranges and project horizontal extension levels directly onto the main price chart. The indicator calculates customizable Fibonacci ratio levels, upper a

Indicator v5 Support & resistanceCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Consecutive Candle Levels

This indicator identifies and plots volumetric order blocks alongside trend strength on the price chart. It highlights recent bullish and bearish order blocks using full candles or custom length coordinates, displaying internal buy and sell activity, mid-lines

Indicator v5 SMC / ICT / price actionVolume

The Stock and NQ Futures Convergence Strategy identifies trading opportunities by comparing the Relative Strength Index of the active chart stock against NQ futures. It enters a long position when NQ RSI rises above the upper threshold while the stock RSI stay

Strategy v5 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Stock and NQ Futures Convergence Strategy

Trend Catcher Strategy

by wynnforthework
2 stars

This strategy identifies trending breakouts by comparing total candle ranges to the overall high-low channel over a set period alongside a Simple Moving Average. Long trades enter when the range efficiency ratio crosses above a threshold while the SMA rises, w

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Catcher Strategy

RSI Divergence

by Web3Degenerate
2 stars

The indicator detects RSI divergences on the price chart. It calculates the RSI using the close prices with a configurable length and identifies potential trend reversals by comparing swings in price and RSI values. Bullish divergence is signaled when price fo

Indicator v5 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of RSI Divergence
1 stars

This overlay strategy combines an AlphaTrend core with kinematic, Bayesian, and mean-reversion models, plus harmonic, classical, and candlestick pattern engines. It plots consolidation zones, volume-profile points of control, pattern lines, and forward forecas

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro Extended
1 stars

An overlay indicator that detects pivot highs and lows on closing prices and draws a created line that extends to the right, plus a short confirmation line. Labels show the level, price and an Indian-time stamp, and each element has its own toggle. Break alert

Indicator v5 Support & resistanceBreakout
Updated 2 weeks ago · None stated GitHub repository of S (Or) R Breakout

V11 Swing Sniper Pro

by kevinesk
1 stars

V11 Swing Sniper Pro is a trend-following and swing timing indicator tailored for equity markets such as the KLSE. It overlays key moving averages directly on the price chart and evaluates setups across three structured tiers: trend quality based on Minervini

Indicator v5 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of V11 Swing Sniper Pro
1 stars

Corpus Exit Qty Percent is a Pine Script strategy that executes trades based on exponential moving average crossovers and manages positions with Average True Range levels. It calculates 12-period and 26-period EMAs along with a 14-period ATR. When the fast EMA

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Exit Qty Percent

NR7 Range Breakout

by Basant1Saini
1 stars

NR7 Range Breakout identifies narrowest range bars over a specified lookback period and trades breakouts beyond their high or low price boundaries. It plots an exponential moving average trend filter alongside visual highlights for range compression and breako

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · None stated GitHub repository of NR7 Range Breakout

SPY Gamma (30DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) expiring in thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPY Gamma (30DTE)

ES Professional Fade

by knectardev
1 stars

This strategy executes gap-fade trades on E-mini S&P 500 futures during Regular Trading Hours. It compares the current market open with the prior session close to identify opening gaps, qualifying entries using minimum gap percentages, index point minimums, an

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

v5 Combination

by webcrack4
1 stars

This indicator calculates several variants of the MACD oscillator, including Traditional, Histogram, Leader, and Source methods, and overlays the oscillator directly on the price chart. It plots shape labels for MACD and signal line crossovers, while rendering

Indicator v5 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of v5 Combination

Simple Market Metrics v5

by turnupdigital
1 stars

An indicator in a separate pane that shows buy and sell signals with optional chop, moving average and time-of-day filters. It adds profit target lines at a tick distance, a profit wave band, background trend colouring and candle colouring. Built-in text descr

Indicator v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of Simple Market Metrics v5

Coin to CNY

by zhuzp98
1 stars

The script converts cryptocurrency prices to Chinese Yuan (CNY) by multiplying the open, high, low, and close prices of the selected coin with the corresponding USDCNY exchange rates. It plots candlestick data in a separate pane for the translated prices. User

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Coin to CNY

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