Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 57)

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

Zen OOH OOL v3

by Zen-Tim
29 stars

This indicator identifies whether the opening bar of a new trading day opens at its high (Open = High) or low (Open = Low) within a customizable tick tolerance. It marks matching sessions directly on the price chart using directional arrows, text labels, and t

Indicator v5 Sessions & timeCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen OOH OOL v3

Volume Bar Colors

by benso87
24 stars

This indicator highlights price candles based on unusual volume expansion and directional volume imbalance. It estimates buying and selling volume from the close position relative to the bar range. When total volume exceeds a multiple of its moving average, th

Indicator v5 VolumeCandlestick patterns
Updated 4 years ago · MPL-2.0 GitHub repository of Volume Bar Colors

Diverlong A002

by ruckard
13 stars

Diverlong A002 is an automated trading strategy designed for cryptocurrency pairs on intraday timeframes. It detects classic bullish and bearish divergences by comparing price changes against transitions in the Squeeze Momentum Indicator. Positions are exited

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong A002
9 stars

Identifies support and resistance liquidity zones from pivot highs and lows and detects liquidity sweep events on the price chart. A sweep is registered when price wicks beyond a tracked zone but closes back inside it. Optional filters include an exponential m

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Liquidity Sweep Detector [DefinedEdge]

WR-SR + SMC Strategy

by alboogycOdR
6 stars

This overlay strategy looks for wick rejections near support and resistance levels and scores them with smart-money confluence. It can plot fair value gaps, order blocks, change-of-character and break-of-structure labels, higher-timeframe structure lines, and

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of WR-SR + SMC Strategy

Ichimoku Cloud STEPFUN

by eltonaguiar
4 stars

This Ichimoku Cloud strategy plots the cloud and price action on the chart for trend analysis. It generates long signals when price is above the cloud with a Tenkan-Kijun bullish crossover and bullish cloud, optionally confirmed by Chikou span. Short signals f

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Ichimoku Cloud STEPFUN
4 stars

This script calculates real-time technical indicators and displays them in a customizable on-chart table dashboard. It measures the Relative Strength Index (RSI), Average True Range (ATR), Simple Moving Average (SMA), volume ratios, daily price changes, trend

Indicator v5 Screeners & dashboards
Updated 11 months ago · Custom licence GitHub repository of Table Dashboard Snippet [Lab]

REG-TREND

by gocaman
3 stars

The REG-TREND indicator plots linear regression trend lines calculated from the selected source over a user-defined length. It determines channel boundaries and deviation to detect trend breaks, marking them with dotted lines in the chosen color. Fibonacci ret

Indicator v5 TrendSupport & resistance
Updated 2 days ago · None stated GitHub repository of REG-TREND

jash_GGMA_Granville

by jash-git
3 stars

This overlay indicator plots five exponential moving averages with Fibonacci lengths of 3, 13, 34, 55 and 144 on the price chart. Fast lines are red and orange, slower lines blue and purple, and the 144-period line is a black filter. It marks reset events when

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of jash_GGMA_Granville

CPL

by g-moe
3 stars

Plots an external symbol's closing price as a horizontal dotted line extended to the right of the latest bar. By default, it requests the price of the ETHUSDTPERP contract using a configurable exchange prefix. It can also display a label showing the chart's ro

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of CPL

ALGOX

by IAMATOMIC001
3 stars

ALGOX is a multi-indicator trend-following strategy plotted directly on the main chart. It generates trade entries based on configurable setups, moving average trends, and higher-timeframe inputs. Users can apply sideways market filters using customizable RSI

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of ALGOX

TWAP VWAP EMA MACD

by jawauntb
3 stars

The TWAP VWAP EMA MACD indicator calculates two exponential moving averages: one based on the time-weighted average price (TWAP) and another on the volume-weighted average price (VWAP). It subtracts the VWAP EMA from the TWAP EMA to form the MACD line and appl

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of TWAP VWAP EMA MACD

Oscillator

by TamTH-Dev
2 stars

Oscillator combines WaveTrend calculations, Money Flow Oscillator (MFO), custom VWAP tracking, and volume breakout analysis into a single separate-pane indicator. It calculates oscillator wave values along with moving average smoothing to highlight overbought

Indicator v5 Oscillators & momentumVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of Oscillator

超级趋势RSI

by wynnforthework
2 stars

This strategy applies a Supertrend calculation directly to Relative Strength Index values rather than raw price, plotting the result in a separate pane. Traders can enable optional RSI smoothing via a Hull Moving Average and overlay a secondary moving average

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 超级趋势RSI

RSI Superstack

by Web3Degenerate
2 stars

RSI Superstack plots the relative strength index from three user-selected timeframes in a separate pane. Each series uses the same RSI length and turns purple when it reaches the overbought or oversold threshold. A red background marks when all three readings

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

This multi-model strategy combines kinematic price modeling, Bayesian inference forecasts, volume profile consolidation zones, and automated pattern recognition directly on the price chart. It evaluates market trajectory using weighted kinematic regression, un

Strategy v5 AI / machine learningSupport & resistance
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13 Extended

SR Batch

by 7b809
1 stars

An overlay indicator that draws support and resistance boxes from pivot lows and highs, accepted only when a simple up and down volume delta passes a filter. Box height uses ATR scaled by a width input. It marks when a level holds or breaks, and builds strike

Indicator v5 Support & resistanceVolume
Updated 2 weeks ago · None stated GitHub repository of SR Batch
1 stars

This strategy serves as a test corpus script demonstrating the use of Pine Script map data structures for state management alongside exponential moving averages. It tracks closing prices and EMA gaps in a key-value map during initial bars, then triggers long e

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Map Basic State
1 stars

This indicator finds past stretches of price history that resemble the most recent bars and uses what followed them to sketch a forecast. It compares a pattern of up and down candles of set length against up to 5000 bars of history, with optional trend matchin

Indicator v5 Candlestick patterns Repaints
Updated 6 months ago · None stated GitHub repository of Candlestick Matching Forecast

SMI Auto MTF

by Focal-QuantAI
1 stars

An indicator in a separate pane that plots the Stochastic Momentum Index with a signal line and a histogram. Its lookback, smoothing and signal periods are chosen automatically from the chart timeframe, for example shorter values on 15 minutes and longer on we

Indicator v5 Oscillators & momentum
Updated 6 months ago · None stated GitHub repository of SMI Auto MTF

Stochastic RSI Crossover

by Basant1Saini
1 stars

This strategy calculates Stochastic RSI crossovers occurring in extreme overbought or oversold zones, filtered by an optional Exponential Moving Average trend filter. Long positions enter when the %K line crosses above %D from below the oversold threshold whil

Strategy v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of Stochastic RSI Crossover
1 stars

VABOAlgo is a Pine Script v5 strategy that detects breakouts from a value area. It uses VWAP as a POC proxy and ATR to calculate VAH and VAL, requiring volume above average for confirmation and prior bar consolidation within the VA. Long entries trigger on bre

Strategy v5 BreakoutVolume
Updated 8 months ago · None stated GitHub repository of VABOAlgo (Value Area Breakout)
1 stars

High-Frequency Swing Reversal is a Pine Script v5 strategy that computes a reversal score from Bollinger Bands distance, RSI exhaustion, and candlestick rejection patterns such as hammers and stars. It plots VWAP, Bollinger Bands, and EMA20 on the price chart.

Strategy v5 Oscillators & momentumVolatility & bands
Updated 9 months ago · None stated GitHub repository of High-Frequency Swing Reversal

V5 Combination by YZZ

by webcrack4
1 stars

This indicator script combines Volume Profile or Market Profile (Time Price Opportunity) calculations with a MACD oscillator overlay directly on the price chart. It measures volume or time distribution across configurable ranges such as visible range, anchored

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of V5 Combination by YZZ
1 stars

An experimental pane indicator that simulates a DCA account and a long account inside a date window, using a five-period Hull moving average to decide entries and exits. The long account buys when the average turns up or price is above the DCA cost, adds when

Indicator v5 Moving averages
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 05 Assemble X
1 stars

Expected Price with BTC Pair calculates a theoretical price by multiplying the selected price source of the current chart symbol by the price source of a specified benchmark symbol, defaulting to Bitcoin (BTCUSD). It requests security data for the reference sy

Indicator v5
Updated 1 year ago · None stated GitHub repository of Expected Price with BTC Pair

Documentation Indicator

by fiji-solutions
1 stars

Documentation Indicator is a chart overlay that stores three user-selected time and price points in a custom Triangle type and draws a purple triangle between them. The user confirms each point on the chart through paired time and price inputs. A function crea

Indicator v5
Updated 2 years ago · None stated GitHub repository of Documentation Indicator

MTM Metric [SMA]

by JohnsonHsiao
1 stars

This indicator calculates momentum metrics by measuring the differences between three simple moving averages of closing prices. It computes a short-term bias by subtracting a medium-period SMA from a fast-period SMA, and a long-term bias by subtracting a long-

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of MTM Metric [SMA]

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
330 stars

HA UnivLong&Short Futures calculates Heikin Ashi candles and builds a channel using simple moving averages of Heikin Ashi highs and lows. It enters long positions when the upper channel line crosses above the lower channel line and opens short positions on the

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of HA UnivLong&Short Futures

Function - Maximum Profit

by ricardosantos79
261 stars

This indicator calculates a maximum-profit value over a chosen lookback by summing positive bar-to-bar changes in a source. It plots the result for close and for inverted close in a separate pane, then overlays a fast cumulative version and an alternate summed

Indicator v5
Updated 4 years ago · None stated GitHub repository of Function - Maximum Profit
257 stars

This strategy overlay calculates custom pivot high and low levels, averaged price sources, and Ichimoku Cloud components (Tenkan-sen, Kijun-sen, Senkou Span A/B). It also requests lower low price data from a 360-minute timeframe with lookahead enabled, introdu

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Futures - No Repaint ES 1.0

ABCD Strategy

by hasnocool
106 stars

Identifies harmonic ABCD chart patterns using pivot highs and pivot lows over a configurable lookback length. The strategy evaluates price retracement and extension ratios across four consecutive alternating pivot points to trigger long or short positions. It

Strategy v5 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of ABCD Strategy

Single-color candles

by be-thomas
65 stars

This indicator plots candlestick bars in a separate pane based on the current chart's open, high, low, and close values. Derived from the TradingView Pine Script v5 documentation, it demonstrates the usage of the plotcandle function to render price candles usi

Indicator v5 Candlestick patterns
Updated 6 days ago · GPL-3.0 GitHub repository of Single-color candles

Chaikin Money Flow

by TWODS-CAPITAL
37 stars

The Chaikin Money Flow indicator measures the volume of money flow over a specified lookback period. It calculates the Accumulation Distribution value for each bar based on the relationship between closing, high, and low prices, then divides cumulative money f

Indicator v5 VolumeOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Chaikin Money Flow

Zen Open CSC Bars

by Zen-Tim
29 stars

This indicator marks consecutive same-direction candles at the start of each daily session. It counts the first user-set bars after a new day and labels a bullish or bearish CSC when every bar closes in that direction. Settings toggle bar colours, bull and bea

Indicator v5 Candlestick patternsSessions & time Repaints
Updated 2 weeks ago · MIT GitHub repository of Zen Open CSC Bars

Diverlong B002

by ruckard
13 stars

This strategy enters when Squeeze Momentum color-section changes diverge from price, comparing the latest change with a prior one and confirming the divergence across two pairs. A smaller squeeze value with a higher price opens a short, while a larger squeeze

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong B002

SMC Trade with Dhruv

by MeridianAlgo
9 stars

This indicator maps Smart Money Concepts directly onto the price chart. It identifies internal and swing market structure, highlighting break of structure and change of character events alongside strong and weak swing highs and lows. It also plots internal and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 4 months ago · MIT GitHub repository of SMC Trade with Dhruv

This indicator overlays four customizable moving averages alongside a Keltner Channel directly on the price chart. Users can individually configure the type (SMA, EMA, or WMA) and period length for each moving average, as well as the basis MA type for the Kelt

Indicator v5 Moving averagesVolatility & bands
Updated 4 months ago · None stated GitHub repository of Moving Average & Keltner Channel
6 stars

This hybrid trading strategy combines wick rejection support and resistance levels with Smart Money Concepts. It calculates entry confidence scores based on multi-timeframe structure, Fair Value Gap taps, Order Block alignment, and recent Change of Character o

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of WR-SR + SMC Strategy ENHANCED

MACD_Crossover_STEPFUN

by eltonaguiar
4 stars

This strategy enters long when the MACD line crosses above its signal line and short when it crosses below. Optional filters require the histogram to exceed a threshold, price to sit on the matching side of a simple moving average, and a simplified three-bar d

Strategy v5 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of MACD_Crossover_STEPFUN

Volatility Band Indicator

by mitchell-917
4 stars

The Volatility Band Indicator calculates volatility bands around a customizable moving average basis line directly on the price chart. Users can select between SMA, EMA, RMA, or WMA basis types, alongside adjustable length and standard deviation multiplier set

Indicator v5 Volatility & bandsMoving averages
Updated 11 months ago · Custom licence GitHub repository of Volatility Band Indicator

TrendStop+boll

by gocaman
3 stars

The TrendStop+boll indicator combines a trend trailing level system with configurable Bollinger Bands directly on the price chart. It evaluates Directional Movement (+DI/-DI) and MACD, locking in an EMA or VWAP benchmark level whenever momentum and directional

Indicator v5 TrendVolatility & bands
Updated 2 days ago · None stated GitHub repository of TrendStop+boll

Jash_test

by jash-git
3 stars

This indicator plots five exponential moving averages with Fibonacci lengths on the price chart. Lengths 3 and 13 form a fast group, 34 and 55 a slow group, and 144 a trend filter. It counts how many of those averages the current and previous candle bodies cro

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash_test

CSW Auto Fib

by g-moe
3 stars

CSW Auto Fib draws Fibonacci retracement and extension levels on the price chart from the high and low of a selected time period. It tracks that period's extremes and plots horizontal lines at user-defined ratios, with optional labels and colors. Period choice

Indicator v5 Support & resistance Repaints
Updated 5 months ago · None stated GitHub repository of CSW Auto Fib

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