Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 49)

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

Watermark

by suyons
7 stars

Watermark is a chart overlay that prints custom title and subtitle text, the symbol with its timeframe, and the current date and time in a chosen timezone. It maps hourly periods to readable labels and appends chart type names such as Renko, Kagi, or Point and

Indicator v5
Updated 4 months ago · None stated GitHub repository of Watermark
7 stars

This long-only strategy identifies pullback opportunities within a broader trend. It enters a long position when the closing price trades above a long-term exponential moving average while falling below a short-term exponential moving average. Once in a trade,

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Pullback Strategy for Stocks

MyLabUtils

by mitchell-917
4 stars

MyLabUtils is an open-source utility library for Pine Script v5 that provides reusable functions for custom indicator and strategy development. It includes an example calculation for a normalized Relative Strength Index, which scales standard values relative t

Library v5
Updated 11 months ago · Custom licence GitHub repository of MyLabUtils

UMURLU-5-8-13-X

by Kalumur
4 stars

UMURLU-5-8-13-X overlays three exponential moving averages (5, 8, and 13 EMAs) alongside dual Bollinger Bands with narrow and wide standard deviation multipliers directly on the price chart. It generates visual signal labels on the chart when the 5-period EMA

Indicator v5 Moving averagesVolatility & bands
Updated 2 years ago · None stated GitHub repository of UMURLU-5-8-13-X
4 stars

The SnagProfit Trending 1H indicator calculates EMA crossovers using periods 5, 10 and 20 on the close price to identify bullish and bearish trend conditions. It draws a table panel on the chart that labels long trend status as OK CALL or NO CALL. The indicato

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of SnagProfit Trending 1H

This indicator evaluates multiple technical trading strategies and strategy combinations across various timeframes to identify the top-performing setup for Turkish stocks and other assets. Depending on whether the active chart is intraday or higher timeframe,

Indicator v5 Screeners & dashboardsTrend
Updated 2 days ago · None stated GitHub repository of Otomatik En İyi Strateji - BIST

Jash Test

by jash-git
3 stars

This indicator plots five exponential moving averages of Fibonacci lengths on the price chart: 3 and 13 as fast lines, 34 and 55 as slow lines, and 144 as a filter. They are drawn in red, orange, blue, purple, and black. The visible code also counts how many o

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

This indicator estimates buying and selling volume from each bar's range and candle body, then plots both in a separate pane. It splits the bar's volume using the upper wick, lower wick, and body size, assigning more of the volume to the close direction. Buy v

Indicator v5 Volume
Updated 5 months ago · None stated GitHub repository of Buy & Sell Volume

This indicator is a debugging example that overlays a scaled close-to-SMA ratio on the price chart. It divides close by a simple moving average, takes the natural log, and multiplies by 100. A triangle appears below the bar when that scaled value exceeds the t

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of Simple Test Indicator for Debugging
3 stars

This indicator plots a composite momentum oscillator in a separate pane, featuring a hyper wave calculation and an integrated smart money flow oscillator. It detects both bullish and bearish divergences using an adjustable sensitivity threshold. Additional vis

Indicator v5 Oscillators & momentumDivergence
Updated 12 months ago · None stated GitHub repository of Lux Algo - Oscillator Matrix
3 stars

Identifies continuation trade setups based on Beat the Market Maker (BTMM) second-leg patterns directly on the price chart. It defines trading session phases across Asian, London, and New York sessions, filters impulse legs using fast and slow exponential movi

Indicator v5 SMC / ICT / price actionSessions & time
Updated 1 year ago · None stated GitHub repository of BTMM Second Leg Confirmation
3 stars

This Pine Script v5 indicator detects spinning top candlestick patterns by comparing the real body size to user-defined min and max thresholds as percentages of the candle's range. It signals bullish spinning tops with a white arrow below the bar and bearish o

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Spinning Top (Candlestick Pattern)
3 stars

This strategy is written for NVIDIA stock and overlays the price chart. It opens a long when price crosses above an exponential moving average, the rate of change is positive, and the average true range exceeds the previous daily ATR. It closes that long when

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of NVDA Buy/Sell Strategy

Currency Strength Chart

by itmakesyousick
3 stars

The Currency Strength Chart calculates and plots relative currency strength values for major forex currencies in a separate pane. Calculations can be based on raw price action, RSI, CCI, or Stochastic oscillators, smoothed with various moving average types. Us

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

This strategy overlays XAUUSD and combines stochastic, RSI, and three EMAs with an ATR-based risk model. Confirm entries can require an M15 overbought or oversold trigger plus a rejection wick, and they stay near Fibonacci or EMA zones without chasing far from

Strategy v5 Oscillators & momentumMoving averages

Previous Candle Theory

by wynnforthework
2 stars

This strategy enters trades based on consecutive candle directions relative to a chosen moving average filter. It triggers a long entry when both the current and previous candles close bullish above the moving average, and a short entry when both candles close

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Previous Candle Theory

Quick Stats

by etnt
2 stars

Quick Stats displays key trading metrics directly on the price chart overlay. It calculates Mark Minervini's Trend Template rules by scoring moving average alignments (50, 150, and 200 SMAs), 200 SMA slope, and 52-week high/low proximities. Additionally, it co

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Quick Stats

MomentumSignals

by Electrified-Trading
2 stars

MomentumSignals is a Pine Script utility library designed to detect changes in momentum across technical series such as moving averages and oscillator histograms. It offers helper functions that quantize directional changes, detect reversal signals, and comput

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

Moving Average Color Filter

by Web3Degenerate
2 stars

This indicator calculates an Exponential Moving Average (EMA) and plots it directly on the main price chart. It dynamically changes the color of the EMA line based on the relationship between the current closing price and the moving average value. The line tur

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Color Filter

HTF Candles & Pivots

by itmakesyousick
2 stars

Plots higher-timeframe candlestick overlays and pivot points directly on the price chart. It draws HTF candle bodies and wicks using boxes and lines across custom or auto-selected higher timeframes. The indicator can also compute and display traditional pivot

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

An indicator that detects market structure and draws Fibonacci retracements only after an impulse breaks structure and a pullback pivot forms. Settings control pivot lengths, minimum displacement in ATR, an invalidation buffer, maximum leg age and an optional

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of Confirmed Fib (BOS + Pullback)

Silver Setup Indicator

by GreyssonEnterprises
1 stars

An indicator that flags paint bars, meaning candles whose low is above the high from two bars earlier or whose high is below the low from two bars earlier. Signals are limited to up to three user-defined sessions on weekdays, with a daily close check at 1 PM P

Indicator v5 Sessions & timeSupport & resistance
Updated 3 months ago · MIT GitHub repository of Silver Setup Indicator

Symbiotic Flow Cycle Dashboard

by tthanhvu002sgu
1 stars

Combines three normalised measures into a dashboard drawn over the price chart. A smart-money catalyst score flags candles whose body-weighted volume has an unusually high Z-score and keeps a decaying memory of them. A retail validation index divides average v

Indicator v5 VolumeScreeners & dashboards
Updated 3 months ago · None stated GitHub repository of Symbiotic Flow Cycle Dashboard
1 stars

This overlay indicator calculates intraday standard deviation sigma bands using live implied volatility from VIX or a manual percentage input. Designed for index options credit spread placement, it projects 1s, 2s, and 3s expected move boundaries anchored to e

Indicator v5 Volatility & bandsSupport & resistance
Updated 4 months ago · None stated GitHub repository of 3s Credit Spread [DTO]

TSL

by riegodavid-git
1 stars

A strategy that tests trailing stop methods on a single mock trade. It opens one long or short position at a chosen start time and then trails a stop behind price. The trail can use ATR with a multiplier or a percentage, anchored to swing lows and highs, close

Strategy v5 Volatility & bands
Updated 4 months ago · None stated GitHub repository of TSL

RS Rating vs KLCI

by kevinesk
1 stars

This indicator computes relative strength by subtracting KLCI index returns from stock returns over a user-defined lookback period. It plots the resulting RS percentage in a separate pane using green for positive values and red for negative values. The default

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of RS Rating vs KLCI
1 stars

Corpus Array Basic State is a strategy designed to demonstrate state tracking using Pine Script arrays. It calculates a 20-period exponential moving average (EMA) and populates an array with closing prices during the initial bars. The strategy enters a long po

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

Talons VWAP + Volume

by muammeryldrm42
1 stars

A strategy that trades crosses of price through VWAP when volume is higher than its 20-bar average by a set multiple. A cross up with a volume spike opens a long and a cross down opens a short, one position at a time. The stop is an ATR multiple from entry and

Strategy v5 VolumeMean reversion
Updated 5 months ago · None stated GitHub repository of Talons VWAP + Volume

Hammers and Stochastic Strategy

by gabriel-klettur
1 stars

Hammers and Stochastic Strategy overlays signals on the price chart by combining candlestick pattern detection with the Stochastic oscillator. It identifies standard hammer and inverted hammer candles and validates them with Stochastic oversold and overbought

Strategy v5 Candlestick patternsOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Hammers and Stochastic Strategy

Chandelier Exit

by Basant1Saini
1 stars

This strategy calculates ATR-based Chandelier Exit bands anchored to highest and lowest price extremes, plotting trailing stop levels directly on the price chart. It enters long or short positions when price crosses opposite bands, subject to an optional 200-p

Strategy v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Chandelier Exit

Matrix Scalper Algo

by Tradehook-org
1 stars

A Pine v5 indicator that combines a higher-timeframe trend with a short-term entry on the price chart. The trend is a fast EMA above or below a slow EMA on a chosen higher timeframe, shown as a background color. An entry marks when price crosses a 9-period EMA

Indicator v5 ScalpingTrend Repaints
Updated 8 months ago · None stated GitHub repository of Matrix Scalper Algo

SPX Gamma (DTE:14)

by Juice-zhi
1 stars

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

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPX Gamma (DTE:14)

Order Blocks

by Ahmed1926
1 stars

An overlay indicator that draws bullish and bearish order block boxes using a candle range setting, with breaker source prices selectable. Optional extras include previous day high and low lines, break of structure lines, highlighted breaker candles and retest

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 9 months ago · None stated GitHub repository of Order Blocks
1 stars

This Pine Script indicator calculates and plots support and resistance levels from a selected higher timeframe. It identifies peaks and troughs on the higher timeframe and assigns strength to each level based on a weighted combination of touches, bounces, and

Indicator v5 Support & resistanceVolume
Updated 9 months ago · None stated GitHub repository of OA Destek & Direnç Gücü

Franken-Strength

by anil-sn
1 stars

An oscillator in a separate pane that blends a TMO-style momentum count with a scaled RSI. The TMO part compares the close with a run of earlier opens, smooths the result with selectable EMA, SMA or RMA stages, and plots a main line, a signal line and a colour

Indicator v5 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of Franken-Strength

TD Sequential 9/13

by zhuzp98
1 stars

This indicator tracks DeMark's TD Sequential 9 and 13 setup and countdown conditions directly on the price chart. It compares the current close price to the close four bars prior to determine setup counts, switching direction when price crosses. When setup or

Indicator v5 Oscillators & momentumSupport & resistance
Updated 1 year ago · None stated GitHub repository of TD Sequential 9/13

Hello World

by fiji-solutions
1 stars

This indicator plots a background color fill on the price chart to highlight a specific time session. It checks if the current time falls within the user-defined session range and colors the background red when active. The main setting lets users customize the

Indicator v5 Sessions & time
Updated 2 years ago · None stated GitHub repository of Hello World

Efficiency Ratio

by JohnsonHsiao
1 stars

Efficiency Ratio measures market efficiency and trend strength over a configurable rolling window by dividing net price displacement by the sum of absolute bar-by-bar price changes. It plots the calculated ratio as an oscillator in a separate pane alongside ho

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Efficiency Ratio

V Bottom/Top Pattern

by rajatjpatel
1 stars

A strategy that looks for V-shaped reversals using deviation-based pivots from an imported library. A deviation multiplier and depth set how large a move counts as a pivot. After a pivot, the script checks for a first breakout and then a confirmation breakout,

Strategy v5 BreakoutSupport & resistance
Updated 4 years ago · None stated GitHub repository of V Bottom/Top Pattern
575 stars

ICT Mitigation Block Scanner is an overlay indicator that screens a pasted list of symbols for ICT mitigation blocks or retracement conditions. It lists long and short hits in a configurable table and can draw a zig zag with colored boxes on the price chart. U

Indicator v5 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Mitigation Block Scanner
330 stars

This strategy plots a Supertrend line from ATR length and factor, plus a single EMA, on the price chart. It enters long when Supertrend turns bullish or while the trend is bullish and price crosses back above the EMA below the last entry price. Short entries m

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Supertrend + EMA rebound [Alorse]
261 stars

This indicator defines a function that computes a weighted mean of sample values using a matching weight array. It returns zero when the arrays differ in length or are empty, otherwise it divides the sum of each value times its weight by the sum of the weights

Indicator v5
Updated 4 years ago · None stated GitHub repository of Function - Array Average Weighted
257 stars

This strategy is designed for 1-minute S&P 500 futures trading using multi-timeframe data and Fibonacci-weighted standard deviation bands around volume-weighted moving averages. It requests data from multiple higher timeframes without lookahead to prevent repa

Strategy v5 Volatility & bandsMoving averages
Updated 7 weeks ago · None stated GitHub repository of ES - Futures 1M No Repaint Fixed

STRG-Kijun

by harryguiacorn
220 stars

STRG-Kijun is an Ichimoku-based trend-following strategy that generates trading signals when the Kijun-sen (base line) changes slope direction. It plots the standard Ichimoku cloud, baseline, lagging span, and directional signal arrows directly on the price ch

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of STRG-Kijun

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