Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 45)

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

RSI Strategy

by suyons
7 stars

Calculates relative strength index values across up to four configurable timeframes to compare short-term and long-term momentum. Generates long and short entry signals when lower-timeframe RSI crosses key thresholds, conditioned on higher-timeframe RSI levels

Strategy v5 Oscillators & momentumTrend Repaints
Updated 4 months ago · None stated GitHub repository of RSI Strategy

This strategy calculates the full Ichimoku Kinko Hyo indicator system, plotting the Tenkan-sen, Kijun-sen, Senkou Spans, Chikou Span, and Kumo Cloud directly on the price chart. It enters long positions when the Tenkan-sen is above the Kijun-sen while price tr

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

This indicator detects the bullish Upside Tasuki Gap candlestick pattern on the price chart. It looks for a long green candle, a smaller gapped green candle, and a red candle that closes inside the gap without filling it, while an optional trend filter require

Indicator v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of Upside Tasuki Gap - Bullish

NYSA-Trend Kanali

by Kalumur
4 stars

NYSA-Trend Kanali combines Parabolic SAR, higher-timeframe exponential moving averages, and weekly MACD signals on the price chart. It calculates Parabolic SAR to highlight trend shifts with visual buy and sell labels, plots weekly 8-period and 13-period EMAs,

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of NYSA-Trend Kanali
4 stars

This indicator draws an on-screen dashboard table tracking market structure and technical metrics across higher timeframes such as 2-hour and 4-hour intervals. It uses higher-timeframe data to evaluate swing highs, swing lows, RSI levels, support and resistanc

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 4 years ago · None stated GitHub repository of SnagProfit Logic 2H 4H

Fisher Transform

by gocaman
3 stars

This indicator calculates and plots the Fisher Transform oscillator alongside its trigger line in a separate pane to highlight extreme price moves and potential reversals. It identifies bullish signals when the Fisher line crosses above its trigger line from o

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

jash GGMA Granville

by jash-git
3 stars

This indicator implements a modified Guppy Multiple Moving Average system based on Fibonacci periods (3, 13, 34, 55, and 144 EMAs) combined with Granville rules. It detects reset crossover signals when the 3 EMA crosses the 55 EMA with price confirmation, as w

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

This indicator detects price movements over a configurable number of lookback bars based on percentage or price distance thresholds. It plots buy and sell signals directly on the price chart and can invert signals for counter-trend entries. Users can filter si

Indicator v5 Oscillators & momentumBreakout
Updated 5 months ago · None stated GitHub repository of Bars%Move Indicator
3 stars

ICT + Kill Zone + Silver Bullet is an overlay indicator that highlights key Inner Circle Trader (ICT) session timeframes on the price chart. It draws colored background boxes and labels for trading sessions including Asia, London, NY AM, NY Lunch, and NY PM. U

Indicator v5 Sessions & timeSMC / ICT / price action
Updated 12 months ago · None stated GitHub repository of ICT + Kill Zone + Silver Bullet

BTMM OTE Zones

by jcortes254
3 stars

BTMM OTE Zones automatically identifies swing points to project key Fibonacci retracement levels and Optimal Trade Entry (OTE) areas such as 61.8%, 70.5%, and 78.6%. It plots these levels along with Premium and Discount valuation zones directly on the main pri

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM OTE Zones

RSI Lib

by augustoerni
3 stars

This library exports a function that calculates the Relative Strength Index from the close price. It measures bar-to-bar change, separates gains and losses, smooths both with a running moving average, and returns the standard 100-scale RSI. Callers pass the lo

Library v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI Lib
3 stars

The Long Term Alpha Indicator computes a weighted alpha from price change (close minus average of high low close) multiplied by volume and smoothed via simple moving average. It produces EMAs of this weighted alpha at fixed lengths of 110 30 and 8. Each EMA is

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Long Term Alpha Indicator

Currency Strength Chart

by itmakesyousick
3 stars

This indicator plots the comparative relative strength of major currencies in a separate pane below the price chart. It calculates strength metrics based on raw price or momentum oscillators including RSI, CCI, and Stochastics, smoothed using various moving av

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

The Grid Bot Direction Plugin Supertrend Pivot indicator calculates dynamic market trend direction for automated grid trading. It computes a smoothed center level derived from pivot highs and lows, combining it with ATR-based bands to generate a trailing stop

Indicator v5 TrendSupport & resistance Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Direction Plugin Supertrend Pivot psyll
2 stars

This strategy plots a custom SuperTrend Polyfactor Oscillator in a separate pane using ATR, adjustable factors, and normalization options on the chosen indicator source. It generates long, short, or both direction signals based on the oscillator values with mu

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Multi-Step FlexiSuperTrend - Strategy
2 stars

Plots timeframe-adaptive moving averages and technical overlays directly on the price chart. It displays standard daily moving averages, weekly trends, or intraday averages depending on the active timeframe. The 200-period simple moving average dynamically shi

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Key Moving Averages

LabelHelper

by Electrified-Trading
2 stars

This library provides utility functions for managing labels on a TradingView chart. It allows creating labels at the last bar with specified levels, text, colors, and sizes. The refreshXPos function updates the x position of existing labels with optional bar o

Library v5 Support & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of LabelHelper

Z-Score Highlighter

by ryangaraygay
2 stars

Calculates the Z-score of closing prices over a specified moving average period and standard deviation length. It identifies potential statistical outliers by checking if the Z-score breaches positive or negative threshold levels during a user-configurable tra

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · MIT GitHub repository of Z-Score Highlighter

MACD Cross Strategy

by Web3Degenerate
2 stars

This strategy generates buy and sell signals on the price chart using MACD crossovers. It applies an EMA 200 filter requiring price to trade above or below the EMA. Only the first MACD crossover is used after the filter condition is met. Stop loss is calculate

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD Cross Strategy

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and pivot levels on the price chart. It draws HTF candle bodies and optional wicks or hollow fills, plus vertical time-division lines. Labels can show the timeframe, an average, the weekday, and a TD sequential

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

This overlay indicator scans swing pivots and draws classic and harmonic chart patterns on the price chart. It can mark head and shoulders, wedges, double and triple tops and bottoms, cup and handle, triangles, pennants, flags, broadening formations, Gartley,

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Ultimate Pattern Engine
1 stars

A long-only strategy built on a fast and a slow EMA crossover, defaulting to 12 and 26. It buys a fixed cash amount when the fast EMA crosses above the slow EMA and closes when it crosses below, holding at most one position. A start date input limits when trad

Strategy v5 Moving averagesTrend
Updated 8 days ago · None stated GitHub repository of CDC Backtest MACD Fix Amount

Reload Ranger Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that trades reversal setups inside a Fibonacci retracement zone taken from a higher timeframe, combining W and M pattern matching with Williams %R, MACD, RSI and OBV filters. Risk per trade starts at a base percentage with an increment and a

Strategy v5 Support & resistanceOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Reload Ranger Strategy

Neural Probability Channel

by tthanhvu002sgu
1 stars

Draws a volatility channel around a kernel regression baseline on the price chart. The baseline is a weighted average of recent hlc3 prices using a rational quadratic kernel, with bandwidth and alpha settings controlling smoothness. Channel width comes from th

Indicator v5 Mean reversionVolatility & bands
Updated 3 months ago · None stated GitHub repository of Neural Probability Channel
1 stars

This indicator marks price imbalances on the chart as boxes. It can show fair value gaps, opening gaps, and volume imbalances, each with separate bullish and bearish colors. Optional minimum-width filters accept points, a percentage, or ATR, and each type can

Indicator v5 SMC / ICT / price actionVolume
Updated 4 months ago · None stated GitHub repository of Imbalance Detector [LuxAlgo]

A strategy shown in a separate pane that trades divergences between price and cumulative volume delta. A confirmed bullish divergence opens a long and a bearish one opens a short, with direction selectable, and entries can be limited by divergence strength: fi

Strategy v5 DivergenceVolume
Updated 4 months ago · None stated GitHub repository of Cumulative Volume Delta Divergence + ATR Trailing Stop

KLSE VCP Stage v2

by kevinesk
1 stars

This indicator classifies market structure into volatility contraction pattern (VCP) stages on the main price chart. It evaluates a Mark Minervini Trend Template score alongside Bollinger Band width percentiles and volume metrics to determine stages such as Co

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of KLSE VCP Stage v2
1 stars

This strategy calculates a rolling price-change momentum score using a custom iterative loop function combined with exponential moving averages. It measures net price movement across six bars alongside a 9-period and 21-period EMA crossover. Long positions are

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of Block Function Loop Score

Talons Tiered Exit (Memecoin)

by muammeryldrm42
1 stars

This strategy identifies long entry opportunities using a fast and slow EMA crossover, primarily designed for high-volatility tokens. It manages trades using a tiered scaling-out system that closes specified percentages of the position at three configurable pr

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Talons Tiered Exit (Memecoin)

Sweep Institutional

by dtheran1
1 stars

Detects liquidity sweeps, also called swing failure patterns, on the price chart. Swing highs and lows are found with a 20-bar lookback on each side. A bullish sweep is flagged when price trades below a swing low but closes back above it, and a bearish sweep i

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

Strong Trending - Momentum Rider is a trend-following strategy designed for intraday and swing trading. It evaluates market strength using a composite momentum score based on exponential moving averages, the Directional Movement Index (DMI/ADX), candle body ra

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Strong Trending - Momentum Rider

SPX Gamma (0DTE)

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 the same day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline fr

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

An overlay indicator that finds equal highs and equal lows between two consecutive candles. It compares the gap between their highs, or lows, with the combined range of the two bars and flags the pair when that gap falls under a precision value. A lower precis

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 9 months ago · None stated GitHub repository of Equal Highs and Equal Lows
1 stars

This strategy trades Williams %R crossing into extreme zones. It enters long when the oscillator drops below the oversold level after being above it, and short when it rises above the overbought level after being below it. Each entry carries an ATR-based stop

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of Williams %R Strategy

Spot Net Strategy

by zhuzp98
1 stars

Spot Net Strategy is a Pine Script v5 overlay strategy aimed at cryptocurrencies. It sizes each order from account equity times an equity-usage percentage, divided by price. It opens a long when close equals 0.998 and a short when close equals 1.004, then clos

Strategy v5
Updated 1 year ago · None stated GitHub repository of Spot Net Strategy

Hello World

by fiji-solutions
1 stars

This educational indicator demonstrates built-in Pine Script string manipulation functions. On the latest bar, it generates text labels directly on the price chart displaying formatted closing prices. In a separate indicator pane, it plots constant numerical v

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

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