Pine Library · 4,642 open-source scripts

Free Pine Script v5 Scripts (page 36)

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,642
Code shown here2,377open licence
Updated in a year2,643
No repaint flag4,050

Pine Script v5: Indicators, Strategies and Libraries

4 stars

This indicator detects a bullish long lower shadow when the lower wick exceeds 75 percent of the candle range. It plots an LLS label below the bar, tints the background blue, and fires an alert titled new pattern detected. The only input changes the bullish la

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Long Lower Shadow - Bullish
4 stars

This indicator plots multiple custom moving averages on the price chart. It draws EMA lines of periods 9, 14, 34 and 55 using daily resolution alongside WMA lines of periods 9, 15 and 18 using weekly resolution. Users adjust the source (default close), length

Indicator v5 Moving averages
Updated 2 years ago · None stated GitHub repository of Hareketli Ortalamalar
4 stars

This indicator calculates rolling quartiles and interquartile ranges (IQR) across a customizable lookback window, plotting a statistical box plot offset to the right of the chart. It identifies the 25th, 50th (median), and 75th percentiles along with standard

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 years ago · None stated GitHub repository of Quartiles with Box Plot [KL]

Intraday Gap Detector

by might-tree
4 stars

This indicator calculates the percentage price gap between the current bar open and the previous bar close on the price chart. When the absolute gap exceeds a hardcoded threshold of 0.2 percent within the past 30 days, it draws an extended horizontal line at t

Indicator v5 Support & resistanceBreakout
Updated 3 years ago · None stated GitHub repository of Intraday Gap Detector

Dip Bulucu-2

by gocaman
3 stars

Dip Bulucu-2 combines a WaveTrend oscillator and Williams Vix Fix to identify potential market bottoms and trend reversals. It calculates Williams Vix Fix based on standard deviation Bollinger Bands and percentile ranges, highlighting exhaustion bars in red hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated 3 days ago · None stated GitHub repository of Dip Bulucu-2

Alert System with Trading Dashboard calculates two exponential moving averages on the chart while tracking fast and slow EMA crossover states across four configurable timeframes. It displays a visual table on the price chart showing the directional bias for ea

Indicator v5 Screeners & dashboardsMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Alert System with Trading Dashboard
3 stars

This indicator demonstrates debugging visualization patterns for Pine Script. It plots value tracking with mean, min, and max reference lines, condition markers using shapes and arrows, historical comparisons with standard deviation bands, multi-series overlay

Indicator v5 Moving averagesVolatility & bands
Updated 7 months ago · None stated GitHub repository of Debugging Visualization Patterns

Stella's Bollinger Squeeze

by stella-entry
3 stars

Stella's Bollinger Squeeze plots Bollinger Bands and compares them with a Keltner Channel on the price chart. It marks a squeeze when the Bollinger Bands sit inside the Keltner Channel and a gray background when they sit outside. After the squeeze ends, it mar

Indicator v5 Volatility & bandsBreakout
Updated 8 months ago · MIT GitHub repository of Stella's Bollinger Squeeze

2:1 Strategy with Signals

by IAMATOMIC001
3 stars

This indicator identifies key market structure and pivot points directly on the price chart. It calculates Higher Highs, Lower Highs, Higher Lows, and Lower Lows using configurable left and right pivot evaluation lengths. Users can toggle pivot labels, customi

Indicator v5 Support & resistanceSessions & time Repaints
Updated 1 year ago · None stated GitHub repository of 2:1 Strategy with Signals

BTMM HTF Bias System

by jcortes254
3 stars

BTMM HTF Bias System analyzes trend alignment and higher-timeframe directional bias using exponential moving averages across multiple timeframes, such as 1-hour, 4-hour, daily, and weekly charts. Based on Steve Mauro's Beat The Market Maker methodology, it cal

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BTMM HTF Bias System

Morning Star Pattern

by augustoerni
3 stars

This indicator identifies and highlights the three-candle bullish Morning Star reversal pattern directly on the price chart. It checks for a long bearish candle followed by a small-bodied candle or doji, and finishes with a strong bullish candle closing above

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Morning Star Pattern

DX Strat

by jawauntb
3 stars

DX Strat is an intraday directional trading strategy that combines a composite RSI momentum calculation, moving averages, Keltner Channels, and VWAP to execute trades. It initiates long positions when composite momentum RSI crosses above 77 and short positions

Strategy v5 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of DX Strat

Currency Strength Chart

by itmakesyousick
3 stars

Calculates and displays the relative currency strength of major currencies, including EUR, USD, JPY, GBP, CHF, AUD, and CAD. It plots strength lines and optional histograms in a separate pane to highlight directional momentum across Forex pairs. Users can adju

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

Ver16-19 RCI Panel

by Pesci1134
2 stars

This indicator calculates the Rank Correlation Index over a customizable period and plots the oscillator in a separate pane. It identifies overbought and oversold market conditions relative to user-defined thresholds. Bullish signals occur when the oscillator

Indicator v5 Oscillators & momentumMean reversion
Updated 2 weeks ago · None stated GitHub repository of Ver16-19 RCI Panel

Volatility Stop

by avatar-lavventura
2 stars

The Volatility Stop indicator calculates a dynamic trailing stop line based on the Average True Range. It tracks ongoing price extremes and adjusts the stop level using a specified ATR multiplier and lookback length. The script evaluates trend direction change

Indicator v5 Volatility & bandsTrend
Updated 8 months ago · None stated GitHub repository of Volatility Stop

This strategy generates long entry signals by combining a Donchian Channel breakout with a moving average trend filter, volume confirmation, and a macro volatility regime gate based on CBOE VIX and VIX3M ratios. It enters long positions when prices break above

Strategy v5 TrendBreakout
Updated 10 months ago · MIT GitHub repository of Trend-Breakout System mit VIX Heatmap Gate

FRAMA & CPMA Strategy [CSM]

by wynnforthework
2 stars

The FRAMA & CPMA Strategy overlay script combines a Fractal Adaptive Moving Average (FRAMA) and a custom CPMA indicator imported from an external library. It generates long and short trading signals when price crosses above or below either moving average line.

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of FRAMA & CPMA Strategy [CSM]

Averages

by Electrified-Trading
2 stars

Averages is a Pine Script utility library designed for computing custom averages directly from float arrays. It provides exportable functions to calculate triangular weighted averages, standard weighted averages using an auxiliary weight array, and combined tr

Library v5
Updated 1 year ago · MPL-2.0 GitHub repository of Averages

Session Color

by ashwagamma
2 stars

This indicator paints the price-chart background for three clock windows using a timezone chosen as GMT+1 or GMT+2 from the hour gap between Los Angeles and GMT. Bars from 00:00 to 15:30 use the pre-market color, 15:30 to 22:00 stay transparent, and 22:00 to 2

Indicator v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Session Color

RSI with Signals

by etabebe1
2 stars

This indicator calculates the Relative Strength Index (RSI) over a user-defined lookback period and plots it in a separate pane. It marks horizontal lines for overbought and oversold thresholds. A bullish buy signal is triggered when the RSI crosses above the

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI with Signals

MA Based Trend

by ryangaraygay
2 stars

The script calculates three moving averages with configurable types, lengths, and price sources. It evaluates trend alignment by comparing the relative order of fast, medium, and slow averages across four market states. In a separate pane, it plots color-coded

Indicator v5 TrendMoving averages
Updated 1 year ago · MIT GitHub repository of MA Based Trend

Custom Functions

by Web3Degenerate
2 stars

This educational script demonstrates how to define and execute custom user-defined functions in Pine Script v5. It illustrates three distinct function structures: single-line functions, multi-line functions incorporating global variables, and multi-result func

Indicator v5
Updated 2 years ago · None stated GitHub repository of Custom Functions
2 stars

This indicator plots several moving averages on the price chart to help identify trends and support or resistance. It displays an exponential moving average with a period of 21 and simple moving averages with periods of 30, 40, and 50. The lines are colored gr

Indicator v5 Moving averages
Updated 2 years ago · MIT GitHub repository of Weekly MA's [JR-Academy]

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator draws higher-timeframe candles on the price chart and overlays pivot levels. Users choose the timeframe, candle thickness, wick display, fill for negative candles, and whether history is shifted forward. Labels can show the timeframe, an average

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Zigzag Lines

by WISEPLAT
2 stars

This indicator plots ZigZag lines over the price chart to help identify swing highs and lows based on localized extreme points. Users can select between bar closing prices or high/low extremes as the calculation source and adjust the detection period. Settings

Indicator v5 Support & resistance Repaints
Updated 3 years ago · None stated GitHub repository of Zigzag Lines

Custom Ichimoku Alerts [UT]

by theupslidedown
2 stars

This custom Ichimoku indicator plots Tenkan-Sen, Kijun-Sen, Chikou-Span, Senkou-Span A, Senkou-Span B and the cloud fill on the price chart. It generates bullish signals when Tenkan crosses Kijun upward, Chikou is positive, price is above the cloud, and option

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Custom Ichimoku Alerts [UT]

Order strgy SA SOT

by DaniilOkrug
2 stars

This strategy identifies SA signals for long entries and SOT signals for short entries. It places pending orders with stop loss and take profit. The take profit distance equals tp_count multiplied by the distance from entry to stop loss. The difference input s

Strategy v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Order strgy SA SOT

XAUUSD Hour Range Reference

by teshmi9z-beep
1 stars

An intraday indicator designed for gold that takes the high and low of one chosen hourly candle, set by an hour input, and extends them across the rest of the day as reference lines. A background tint and triangle markers show when price closes above the high

Indicator v5 Sessions & timeSupport & resistance
Updated 3 days ago · MIT GitHub repository of XAUUSD Hour Range Reference

Main - 1

by 7b809
1 stars

A small overlay indicator that turns two linked external plots into labelled buy and sell markers. Each of two source inputs is connected to another indicator's plot, and a non-zero value draws a green buy label or a red sell label showing price and an Indian-

Indicator v5 Screeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Main - 1
1 stars

An indicator in a separate pane that simulates trades from a chosen signal source (MACD with RSI, breakout, mean reversion or an external series), each with an ATR stop, an R-multiple target and a time exit. It collects the results over a window and converts t

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of KLDS v2 Kelly Position Sizer

TP 8 Lines

by XingHan98
1 stars

This TradingView indicator draws daily support and resistance lines for gold (XAU/USD) at 08:00 Singapore time on weekdays, based on the price action of the 5-minute candle closing at 08:00. It also plots three ATR-based take-profit levels per side, computed a

Indicator v5 Support & resistanceVolatility & bands
Updated 3 months ago · None stated GitHub repository of TP 8 Lines

Manchu Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that shades a trading session window on the chart, defaulting to a morning session in the Chicago time zone with weekday toggles. Inputs show an RSI of length 40, a short channel length, a risk-to-reward ratio, fixed dollar risk, leverage an

Strategy v5 Sessions & timeOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Manchu Strategy
1 stars

A Pine v5 indicator in a separate pane that works from Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It finds divergences between price and flow pivots, detects the chart timeframe automatically with a man

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.8 Auto TF

The Fractal Cone

by tthanhvu002sgu
1 stars

Projects an adaptive probability cone ahead of price on the chart. It measures kurtosis of price changes over a slow lookback to label the instrument growth-like or value-like, then chooses between fast and slow settings in parallel. A Hurst estimate from frac

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of The Fractal Cone

Fractal Sweep v2

by abhinaynatraj
1 stars

A second version of the Fractal Sweep CISD indicator with more trade management options. Besides detecting a sweep, return and CISD, it lets the user pick the entry point (market or limit at cascade retracement levels), the target reference, and a take profit

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Fractal Sweep v2
1 stars

An overlay that draws a session-anchored VWAP with optional standard-deviation bands and reads price above or below it as a bullish or bearish bias. When VWAP is sloping and a candle pulls back near it and closes in the trend direction on a confirmed bar, it m

Indicator v5 VolumeMean reversion
Updated 4 months ago · None stated GitHub repository of VWAP + Volume Levels
1 stars

This indicator assists intraday breakout execution on KLSE stocks. It plots VWAP, EMA 9, EMA 21 on the price chart along with an opening range from the first 30 minutes of the session and a buy zone band above the daily pivot price. Settings control the pivot

Indicator v5 Moving averagesSupport & resistance
Updated 4 months ago · None stated GitHub repository of KLSE Intraday Execution Helper

Talons Liquidity Grab + BOS

by muammeryldrm42
1 stars

A strategy that combines a liquidity grab with a break of structure. It tracks the latest pivot high and low, then enters long when the previous bar swept below the swing low and closed back above it and the current close breaks the swing high. Shorts mirror t

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Talons Liquidity Grab + BOS

PPP Levels

by onlyspx
1 stars

This indicator draws horizontal price levels from data the user pastes into two text boxes. The first takes a price and a description for key levels, with points of control shown in a different colour. The second takes a description with an ES level and an NQ

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of PPP Levels

Simple Moving Average

by Sandesh30-cloud
1 stars

A minimal Pine v5 indicator that plots a 20-period simple moving average of the close as a blue line on the price chart. The period is fixed in the code, so there are no inputs, alerts or signals. It is a basic learning example showing how a moving average is

Indicator v5 Moving averages
Updated 6 months ago · None stated GitHub repository of Simple Moving Average

Moments Functions

by Teerth1
1 stars

Plots rolling statistical moments of returns or a chosen source: mean, variance, skewness and excess kurtosis, selected from a dropdown. Options add standard deviation bands around the mean, show standard deviation in place of variance, and display critical va

Indicator v5 Volatility & bands
Updated 6 months ago · None stated GitHub repository of Moments Functions
1 stars

An indicator that reads trend from a fast and slow EMA on four-hour data and requires a minimum percentage separation between them. Entries also need volume above its moving average by a multiple, an RSI check and on-balance volume above its EMA. A cooldown li

Indicator v5 TrendVolume
Updated 7 months ago · None stated GitHub repository of V13 Trend Momentum Rider

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