Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 40)

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

MA Crossover Table

by suyons
7 stars

MA Crossover Table is a multi-timeframe indicator that displays trend states in a table overlaid on the price chart. It computes SMA crossovers for lengths 10, 20 and 60 on timeframes 1, 5, 15 and 60. Bullish conditions trigger when successive SMAs are in uptr

Indicator v5 Moving averagesTrend
Updated 4 months ago · None stated GitHub repository of MA Crossover Table

This long-only strategy executes trades based on Ichimoku Kinko Hyo Tenkan-Sen and Kijun-Sen crossovers. It opens a long position when the Tenkan-Sen moves above the Kijun-Sen and closes the position when the Tenkan-Sen falls below the Kijun-Sen. Main settings

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Ichimoku Kinko Hyo TK Cross Strategy

Time Interval Volume Sum

by JackZhao516
7 stars

This indicator sums bar volume between a user-chosen start and end time. It highlights that interval on the price chart with a background color and plots the running total on the status line. On the last bar it draws a label above the midpoint of the interval

Indicator v5 Volume
Updated 3 years ago · MIT GitHub repository of Time Interval Volume Sum

RSI

by trsdn
6 stars

This indicator calculates the Relative Strength Index along with a 200-period simple moving average. It plots the RSI oscillator line alongside horizontal reference levels for overbought and oversold thresholds in a separate pane below the main price chart. Co

Indicator v5 Oscillators & momentumMoving averages
Updated 7 days ago · MIT GitHub repository of RSI

SuperTrend Follow

by latentwill
4 stars

The SuperTrend Follow strategy determines trend direction using a simple ATR value derived from the moving average of high-low ranges. It plots on the price chart and enters long positions when price exceeds the ATR value or short when price falls below. The s

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of SuperTrend Follow
4 stars

The Keltner Channel Strategy is a breakout system plotted directly on the main price chart. It calculates upper and lower channel bands around an exponential or simple moving average using ATR, True Range, or bar range multiplied by a specified factor. A long

Strategy v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of Keltner Channel Strategy

MA Crossover Strategy [Lab]

by mitchell-917
4 stars

This strategy plots fast and slow moving averages on the price chart and trades their crossovers. It enters long when the fast average crosses above the slow average and short when it crosses below. An optional higher-timeframe moving average can block trades

Strategy v5 TrendMoving averages
Updated 11 months ago · Custom licence GitHub repository of MA Crossover Strategy [Lab]

M+AT+BOLL+T3

by Kalumur
4 stars

This multi-indicator toolkit and scanner overlays Tillson T3 Moving Averages, MavilimW weighted moving average combinations, Bollinger Bands, and AlphaTrend calculations directly on the price chart. It includes color-coded trend direction signals and alerts wh

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of M+AT+BOLL+T3

My Custom Strategy 1

by might-tree
4 stars

This long-only strategy plots a 20-period exponential moving average of the low, a 20-period simple moving average of the low, and the close in a separate pane. It enters long when the high breaks the prior 25-bar highest close and the close is above both the

Strategy v5 Moving averagesBreakout Repaints
Updated 3 years ago · None stated GitHub repository of My Custom Strategy 1

Snagprofit HL

by dearvn
4 stars

Snagprofit HL is an overlay indicator that tracks recent price extremes. It stores the highest high and lowest low over two lookback windows, defaulting to 8 and 21 bars, when price matches those extremes. It plots the longer window high and low as black lines

Indicator v5 Support & resistance
Updated 4 years ago · None stated GitHub repository of Snagprofit HL

Dipmix

by gocaman
3 stars

Dipmix is a separate-pane momentum and scanning indicator designed to identify market bottoms and oversold conditions. It calculates a WaveTrend oscillator using EMA-smoothed price channels, alongside an integrated Awesome Oscillator and Accelerator Oscillator

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Dipmix

Auto S/R v2

by g-moe
3 stars

Auto S/R v2 plots automatic support and resistance on the price chart. It finds pivot highs and pivot lows with a fixed strength of five bars, then stores those prices as horizontal key levels. A proximity check compares each new level with the average candle

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of Auto S/R v2
3 stars

This Pine Script v5 indicator provides a collection of mathematical utility functions including safe division, percentage change, normalization, array average and standard deviation calculations. The functions are wrapped with debugging capabilities that suppo

Indicator v5
Updated 7 months ago · None stated GitHub repository of Math Utilities with Debugging
3 stars

This indicator plots four exponential moving averages on the price chart and compares their order. It marks a fast-over-medium crossover only when the fast average is on the same side of the trend average, and it draws buy or sell labels when all four averages

Indicator v5 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Stella's Multi-EMA Crossover

Elite Algo Modded

by IAMATOMIC001
3 stars

This overlay indicator plots optional buy and sell signals on the price chart, with a selectable strategy mode, sensitivity, and an automatic sensitivity option. Filters can limit signals during consolidation, to smart signals, or to high-volume bars, and cand

Indicator v5 Volatility & bandsTrend
Updated 12 months ago · None stated GitHub repository of Elite Algo Modded

BTMM Master Dashboard

by jcortes254
3 stars

The BTMM Master Dashboard indicator plots tables, boxes, and labels on the price chart for multi-timeframe analysis. It calculates 5, 13, 50, and 200 period EMAs along with session-based market maker phases including accumulation, manipulation, distribution, a

Indicator v5 Screeners & dashboardsSessions & time
Updated 1 year ago · None stated GitHub repository of BTMM Master Dashboard

This indicator calculates and plots a custom Parabolic Stop and Reverse (PSAR) trailing level directly on the price chart. It tracks trend direction by updating acceleration factors as new extreme price highs or lows are reached. Bullish trends are displayed w

Indicator v5 Trend
Updated 2 years ago · None stated GitHub repository of Parabolic Stop and Reverse (Trend Following)

Hyper Flow Indicator

by jawauntb
3 stars

This indicator calculates a composite RSI oscillator paired with STARC volatility bands in a separate pane. It evaluates momentum by combining RSI differentials with smoothed RSI readings, while also referencing higher-timeframe data, moving averages, and esti

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Hyper Flow Indicator

Currency Strength Chart

by itmakesyousick
3 stars

This indicator plots relative strength for major forex currencies in a separate pane. It calculates each currency with RSI, CCI, or stochastics over a chosen resolution, using automatic, custom, or lookback period modes. Users can show or hide individual curre

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
2 stars

Hulk Grid Algorithm V2 is a grid trading strategy designed for price charts. It establishes ten distinct grid levels around a user-defined mid price, spaced apart by a fixed dollar grid step. The strategy places long limit orders across these levels with scale

Strategy v5 Support & resistanceMean reversion Repaints
Updated 1 year ago · None stated GitHub repository of Hulk Grid Algorithm V2 - The Quant Science

DailyLevels

by Electrified-Trading
2 stars

DailyLevels library supplies functions to fetch open, high, low and close values from daily bars using a daysPrior parameter. It supports daily and intraday charts while respecting session boundaries to prevent lookahead bias. The library tracks session start

Library v5 Support & resistanceSessions & time
Updated 1 year ago · MPL-2.0 GitHub repository of DailyLevels

PIN BAR

by ryangaraygay
2 stars

The PIN BAR indicator identifies strong and weak pin bar candlestick patterns, including hammers and shooting stars, directly on the price chart. It evaluates pattern validity using major and minor wick-to-bar ratios, ATR volatility filters, volume thresholds,

Indicator v5 Candlestick patterns
Updated 1 year ago · MIT GitHub repository of PIN BAR
2 stars

This strategy enters long when price closes above the prior channel high and a longer EMA filter, the bar is bullish, volume rises versus the previous bar, and average volume and turnover clear set thresholds. It exits the long when price closes below a shorte

Strategy v5 BreakoutMoving averages
Updated 2 years ago · None stated GitHub repository of DegenerateChain Channel Breakout

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator plots higher-timeframe candles and pivot point levels directly on the main price chart. It visualizes multi-timeframe price action through custom candle bodies, wicks, and central pivot range zones. As an analytical overlay, it provides visual r

Indicator v5 Support & resistanceCandlestick patterns
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

ZigZag_Punches_OH_OL

by WISEPLAT
2 stars

This indicator calculates pivot highs and lows using a custom depth and deviation threshold to draw zigzag swing lines directly on the price chart. At each swing reversal, it plots labels displaying the reversal price, price change in absolute or percentage te

Indicator v5 Support & resistanceVolume
Updated 3 years ago · None stated GitHub repository of ZigZag_Punches_OH_OL
1 stars

This reference script demonstrates multiple usage examples of Pine Script's request.security function. It plots higher-timeframe data directly on the price chart, including the daily close, weekly high and low levels, daily 20-period EMA, and the previous day'

Indicator v5 Support & resistanceMoving averages Repaints
Updated 7 days ago · None stated GitHub repository of request.security Örnekleri

An overlay indicator that stores the first and second candle after a configurable market open time each day and shows them in a fourteen-column table. For each day it lists the first candle high, low and average, the resistance and support derived from them, a

Indicator v5 Sessions & timeScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Opening Range Historical Table

Key Levels IDWM

by kasutu
1 stars

Draws open, previous high, previous low and previous midpoint lines for several periods on the price chart: intraday, daily, weekly, monthly, quarterly and yearly, plus the Monday range and midpoint. Each group can be enabled separately, with options for mergi

Indicator v5 Support & resistanceSessions & time Repaints
Updated 2 weeks ago · None stated GitHub repository of Key Levels IDWM
1 stars

The XAUUSD Scalping Confluence Engine is a separate-pane indicator that calculates a composite trading score based on multiple technical factors. It evaluates a four-period exponential moving average stack, SuperTrend trend direction, Relative Strength Index,

Indicator v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of XAUUSD Scalping Confluence Engine
1 stars

An indicator in a separate pane that measures the shape of recent log returns over a rolling window using skewness and excess kurtosis. It converts them into a Cornish-Fisher value-at-risk estimate compared with the Gaussian version, a comparison of left and r

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of STRO v2 Skew/Tail Risk & CF-VaR

Polish Setup Indicator

by GreyssonEnterprises
1 stars

Plots a smoothed moving average stack alongside detected W and M patterns, RSI momentum filtering, and Fibonacci-style extension targets. The indicator evaluates trend alignment across fast, medium, and slow SMMAs, scans recent price bars for double top or bot

Indicator v5 Moving averagesOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Polish Setup Indicator

Liquidation HeatMap

by VVASILEVSS
1 stars

A Pine v5 overlay that draws estimated liquidity zones as colored boxes on the price chart. It finds pivot highs and lows over the last 500 bars, sizes each box with a multiple of ATR that depends on the timeframe, and colors it by volume between a minimum and

Indicator v5 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Liquidation HeatMap

EMM Strategy V2 - Pine Engine

by tthanhvu002sgu
1 stars

A strategy that trades price crossings of an exponential moving median line on the price chart. It buys when close crosses above the line and sells when it crosses below, closing the opposite position on the same cross. An optional higher-timeframe filter, def

Strategy v5 Moving averagesTrend
Updated 3 months ago · None stated GitHub repository of EMM Strategy V2 - Pine Engine

KLSE Quality Overlay

by kevinesk
1 stars

The 8_KLSE_Quality_Overlay is a Pine Script v5 indicator that overlays quality grades on the price chart for KLSE stocks. It combines user inputs from KC Chong 8-Criteria, Cold Eye 8-Criteria, Tong Kooi Ong tiers, and Tradeview MONEY equation to assign grades

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 4 months ago · None stated GitHub repository of KLSE Quality Overlay
1 stars

This overlay strategy finds swing highs and lows, then marks an Optimal Trade Entry band between the 0.62 and 0.79 retracements of the latest impulse. A long is allowed only inside the bullish band and above a trend EMA; a short is allowed only inside the bear

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Talons OTE (Optimal Trade Entry)

Smash Levels

by onlyspx
1 stars

This indicator draws horizontal levels on the price chart from text the user pastes in, with separate boxes for daily levels, weekly levels and VIX levels. Each line is labelled and coloured green when the close is above it and red when below. On index charts

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

Computes a z-score of price against a selectable moving average (SMA, EMA, WMA or VWMA) and compares it with thresholds that can adapt to the volatility regime. Inputs set the lookback, volatility lookback, base, minimum and maximum thresholds, and a signal mo

Indicator v5 Mean reversionVolatility & bands
Updated 6 months ago · None stated GitHub repository of Z-Score Dynamic Bands

V15 Zone Trader

by snoozie-v
1 stars

An indicator that takes a four-hour EMA trend with a small deadzone and looks for one-hour entries in the same direction, either a fast and slow EMA crossover or a pullback, with optional volume confirmation. Stops and targets are ATR multiples with one, two a

Indicator v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of V15 Zone Trader
1 stars

This strategy looks for mean-reversion entries when RSI crosses back through the oversold or overbought levels, or recovers from more extreme RSI readings. Optional divergence confirmation can require a price and RSI mismatch before entry. It opens one long or

Strategy v5 Mean reversionOscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Extremes - Mean Reversion

Support & Resistance Levels

by haydarkadioglu
1 stars

This indicator automatically detects support and resistance levels using pivot point analysis on historical price data. It identifies potential resistance at pivot highs and support at pivot lows, storing up to the maximum number of unique levels (default 3 ea

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Support & Resistance Levels

QQQ Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for QQQ (the Nasdaq-100 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 a

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

SMT Divergence

by Ahmed1926
1 stars

An indicator in a separate pane that looks for smart money technique divergence between the chart symbol and a second symbol, which defaults to gold. It finds fractal pivot highs and lows on both, compares the latest two on each, and flags a bullish or bearish

Indicator v5 DivergenceSMC / ICT / price action
Updated 9 months ago · None stated GitHub repository of SMT Divergence
1 stars

Reports at which times of the trading session the daily high and low most often occur, shown as percentage columns in a separate pane. It reads intraday bars, so it must be run on a 15, 30 or 60 minute chart that matches the market's session start. Settings ch

Indicator v5 Sessions & time
Updated 9 months ago · MPL-2.0 GitHub repository of Tops & Bottoms - Time of Day

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