Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 34)

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

XAUUSD Strategy V4.17 is a Pine Script strategy that plots buy and sell signals on the gold price chart using Stochastic oscillator, RSI, EMA trend filters, Fibonacci zones, and ATR-based risk management. It supports confirm-only, confirm+scalp, or scalp-only

Strategy v5 Oscillators & momentumMoving averages

Advance SMC

by middlechild0
2 stars

Plots Smart Money Concepts (SMC) elements directly on the price chart, including fractal-based market structures such as Break of Structure (BOS) and Change of Character (ChoCH). It tracks dynamic support and resistance levels, detects bullish and bearish Fair

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Advance SMC

CM Ult MacD MTF

by avatar-lavventura
2 stars

This indicator plots a multi-timeframe MACD oscillator using customizable fast length, slow length, source, and signal smoothing. It displays the MACD line, signal line, and histogram in a separate pane, with options for trend-based coloring of lines, highligh

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of CM Ult MacD MTF

This indicator compares US sector ETFs with technology and utilities using price ratios that can be log-transformed. It smooths those ratios with a simple moving average and measures fast and mid-length percentage change to classify financials versus technolog

Indicator v5 Oscillators & momentumMoving averages
Updated 10 months ago · MIT GitHub repository of Sector RS & Intermarket Regime Dashboard

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1
2 stars

This indicator overlays trend and momentum analysis directly onto the price chart by combining a customizable moving average trend filter with dual QQE MOD calculations. It determines trend direction using selectable moving average types, including EMA, ALMA,

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 超级趋势 + QQE 集成指标

Failed Breakdown

by ashwagamma
2 stars

Failed Breakdown identifies and tracks key session support levels—including overnight lows, daily lows, and afternoon lows—and detects potential failed breakdowns against them. The indicator monitors price penetration to classify breakdowns into soft, medium,

Indicator v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of Failed Breakdown

This indicator plots a short and a long simple moving average on the price chart and marks buy and sell labels when they cross, but only inside a user-set clock window. The short and long periods and the start and end times, entered as HHMM integers, control t

Indicator v5 Moving averagesSessions & time

Inverse Choppiness Index

by ryangaraygay
2 stars

This indicator calculates the Choppiness Index to gauge market consolidation versus trending conditions. When the Choppiness Index indicates high choppiness above a threshold of 50 during a defined trading session, the script plots a transparent rectangle over

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Inverse Choppiness Index

Breakout Strategy

by Web3Degenerate
2 stars

This strategy identifies breakouts above or below a higher-timeframe reference level (daily by default) and executes trades with automated position sizing based on risk percentage. Entries occur when the close crosses the reference high or low for the first ti

Strategy v5 BreakoutSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Breakout Strategy

VIX 10SMA

by klevler
2 stars

This indicator plots candles for a selected symbol, defaulting to CBOE:VIX, in a separate pane together with a simple moving average of close and a line at 1.2 times that average. It colors the background when the symbol high is more than 20 percent above the

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · MIT GitHub repository of VIX 10SMA

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots overlays higher timeframe candle bodies and wicks directly onto the primary price chart alongside calculated pivot point levels. It visualizes open, high, low, and close levels for selected timeframes like hourly, daily, or weekly bars usi

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

Zig Zag Ratio Simplified plots ZigZag trend lines connecting swing highs and lows on the price chart. It calculates ratio relationships between market swings, displaying ratio labels, high and low price tags, and an optional status helper table. Main settings

Indicator v5 Support & resistanceTrend Repaints
Updated 3 years ago · None stated GitHub repository of Zig Zag Ratio Simplified

[CBB] 2023 System

by codybbrown
2 stars

This overlay indicator calculates the Commodity Channel Index from a selected source and detects crossings above an upper threshold and below a lower threshold, storing the high, low, and midpoint of those bars. It also builds two Bollinger Band sets with inde

Indicator v5 Oscillators & momentumVolatility & bands
Updated 3 years ago · None stated GitHub repository of [CBB] 2023 System

Chandelier Exit + MACD [UT]

by theupslidedown
2 stars

This indicator draws a Chandelier Exit on the price chart. It sets a long stop under the highest price and a short stop above the lowest price, each offset by a multiple of ATR, then trails the active stop as price moves. Direction turns long or short when pri

Indicator v5 TrendVolatility & bands Repaints
Updated 3 years ago · None stated GitHub repository of Chandelier Exit + MACD [UT]

Order Level Search

by DaniilOkrug
2 stars

Calculates and plots horizontal support and resistance levels by identifying recurring price clusters within a set historical lookback period. The indicator scans past highs and lows, grouping touches that fall within a specified tick deviation. Levels meeting

Indicator v5 Support & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Order Level Search

ZeroDTE Wave v1

by xynkro
1 stars

An overlay that marks reversal entries and exits for same-day index option trades on five-minute bars. Entries need a stochastic reversal cross, an EMA trend filter, a cooldown and a time window, and must pass a confluence score, a VIX stand-aside gate, an opt

Indicator v5 Mean reversionSessions & time
Updated 2 days ago · None stated GitHub repository of ZeroDTE Wave v1

Tsh Arrow

by teshmi9z-beep
1 stars

An overlay that draws a SuperTrend-style trend line built from a volume-weighted moving average, selectable from SMA, EMA, WMA, RMA or VWMA types, with a fixed ATR factor. A k-nearest neighbours routine compares recent prices with the smoothed trend line to pr

Indicator v5 TrendAI / machine learning
Updated 2 days ago · MIT GitHub repository of Tsh Arrow

GridWB4

by cckmchiu-gapps
1 stars

GridWB4 plots a customizable price-and-time grid directly on the chart using two user-defined anchor coordinates (top-right and bottom-left). It divides the selected time and price range into up to seven side-by-side grid units with borders and diagonal slope

Indicator v5 Support & resistance
Updated 8 days ago · None stated GitHub repository of GridWB4
1 stars

An overlay indicator that rebuilds opening range levels for one chosen historical date. After the selected number of opening candles from a set market open time, it draws the range high, low and average, then first, second and third resistance and support line

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of Dynamic OR Historical Levels
1 stars

A Pine v5 indicator in a separate pane that labels the market state using volatility and trend alignment. It plots ATR as a percentage of price, Bollinger Band width with its 50-bar average, and a squeeze and expansion flag. A 10, 20 and 50 EMA alignment marks

Indicator v5 Volatility & bandsTrend
Updated 7 weeks ago · None stated GitHub repository of Volatility Regime Detector
1 stars

An indicator in a separate pane that separates realised variance from jump-robust bipower variation over a rolling window, and shows the share of recent volatility attributed to jumps. It adds a Barndorff-Nielsen and Shephard style significance test, bar-by-ba

Indicator v5 Volatility & bands
Updated 7 weeks ago · MPL-2.0 GitHub repository of JRD v2 Jump Risk Differential
1 stars

Overlay indicator for XAUUSD gold that draws predicted support and resistance levels at 08:00 and 19:00 SGT on the price chart along with buy and sell take-profit levels spaced by ATR multiples. It generates RSI reversal signals as triangles when the indicator

Indicator v5 Support & resistanceOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Predicted Signals + RSI trigger

GrimmPaint 2.0 Alerts

by GreyssonEnterprises
1 stars

An indicator that marks gap-style candles where the low is above the high from two bars earlier (bullish) or the high is below the low from two bars earlier (bearish). It then tracks re-entry into that candle's range during up to three user-set time windows on

Indicator v5 Sessions & timeSupport & resistance
Updated 3 months ago · MIT GitHub repository of GrimmPaint 2.0 Alerts

A/D Context v20.8

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane using Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It detects divergences between price and flow pivots and draws a line for the active divergence zone that fades on

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

Reynolds Flow - Energy River

by tthanhvu002sgu
1 stars

Applies a fluid-dynamics analogy to price in a separate pane. A raw Reynolds-style number divides candle body size, signed by price against a moving average, by ATR. It is normalised and ranked by percentile to classify flow as laminar, turbulent, viscous or s

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Reynolds Flow - Energy River

Fractal Sweep Strategy

by abhinaynatraj
1 stars

A strategy port of the Fractal Sweep CISD indicator. It detects a sweep of a prior candle's extreme, a return and a CISD confirmation, then enters with a stop at the sweep extreme or CISD level and a take profit at a set R:R multiple. Shallow sweep and closed-

Strategy v5 SMC / ICT / price actionBreakout
Updated 3 months ago · None stated GitHub repository of Fractal Sweep Strategy

BB Squeeze + Breakout

by kevinesk
1 stars

This indicator measures Bollinger Band width as a percentage of the middle band and plots it in a separate pane. It marks a squeeze when that width equals its lowest value over 126 bars and also flags bars where the Bollinger Bands sit inside Keltner Channels

Indicator v5 Volatility & bands
Updated 4 months ago · None stated GitHub repository of BB Squeeze + Breakout

Talons Inducement

by muammeryldrm42
1 stars

A strategy that looks for an inducement sweep: within the last three bars price wicks beyond the latest swing high or low found with a pivot lookback, then closes back inside. A long needs a bullish candle closing above the prior three highs, a short the mirro

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

First Hour Range

by onlyspx
1 stars

This indicator records the high and low of the first hour of the US cash session, from 9:30 to 10:30 on the chart clock, then draws horizontal lines for both. It also draws dashed lines at one and a half times and dotted lines at two times the range, above the

Indicator v5 Sessions & timeSupport & resistance
Updated 6 months ago · None stated GitHub repository of First Hour Range

RSI Indicator

by Sandesh30-cloud
1 stars

A very small Pine v5 indicator in a separate pane that plots a 14-period Relative Strength Index of the close as a purple line, with horizontal reference lines at 70 and 30. The period is fixed in the code and there are no settings, signals, alerts or smoothin

Indicator v5 Oscillators & momentum
Updated 6 months ago · None stated GitHub repository of RSI Indicator

Detects swing highs and swing lows with a pivot lookback of 21 bars by default, then labels candlestick patterns that form at those turning points, such as hammer, inverted hammer, hanging man, shooting star and engulfing candles. Labels carry short descriptio

Indicator v5 Candlestick patternsSupport & resistance
Updated 6 months ago · None stated GitHub repository of Swing Highs/Lows & Candle Patterns

Linear Moments

by Teerth1
1 stars

Calculates L-moments of a rolling window of log returns or the raw source: the mean, L-scale, L-skewness and L-kurtosis. A selector chooses which moment is plotted, and the lookback sets the window size. For kurtosis it draws a reference level for a chosen the

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

This strategy trades moving-average crossovers only when the higher timeframe agrees. It requests the higher-timeframe close and a trend moving average, then goes long when that trend is bullish and the fast average crosses above the slow average, and short wh

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of MTF - Multi-Time Frame Strategy

ML Price Predictor (KNN)

by haydarkadioglu
1 stars

This overlay indicator compares the current bar with historical patterns using a k-nearest neighbors search. It measures RSI, RSI slope, volume relative to a 20-bar average, EMA trend strength, and price position within a range, each scaled by a user weight. F

Indicator v5 AI / machine learningOscillators & momentum
Updated 8 months ago · None stated GitHub repository of ML Price Predictor (KNN)
1 stars

This indicator detects swing highs and lows using pivot points on the chart. It calculates Fibonacci retracement levels for each swing and optionally enables a trading strategy. The strategy sets stop loss and take profit using ATR multipliers. Main settings a

Indicator v5 Support & resistanceTrend
Updated 8 months ago · None stated GitHub repository of AutoFibAlgo Automatic Fibonacci

MNQ Gamma (30DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MNQ (Micro Nasdaq-100 futures, scaled from QQQ options) expiring in thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated

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

An overlay indicator that shades the Asia, London and New York sessions and classifies days against the seek and destroy profile. If London takes both sides of the Asian range, it labels a potential day and can show a warning table for the New York session. Af

Indicator v5 Sessions & timeSMC / ICT / price action
Updated 9 months ago · None stated GitHub repository of ICT Seek & Destroy Profile

Draws vertical separator lines on the price chart where higher-timeframe periods begin, such as each day, week or month. Up to four separators can be enabled, each with its own timeframe, lookback count, colour, line width and style. A reference setting choose

Indicator v5 Sessions & time
Updated 9 months ago · MPL-2.0 GitHub repository of Multi-Timeframe Period Separators

TimeFrameUtils

by Yavuz365
1 stars

TimeFrameUtils is a Pine Script utility library providing functions for multi-timeframe data analysis. It includes helpers to convert timeframe strings into minutes and check whether a given timeframe is higher than the chart's current resolution. The library

Library v5
Updated 9 months ago · MIT GitHub repository of TimeFrameUtils
1 stars

Combined Indicators v5 Fixed merges multiple technical tools into a single price chart overlay. It identifies Smart Money Concepts structure such as Break of Structure, Change of Character, Order Blocks, Fair Value Gaps, and equal highs or lows. Additionally,

Indicator v5 SMC / ICT / price actionOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combined Indicators v5 Fixed
1 stars

The Hybrid Overbought/Oversold Detector combines several classic technical indicators, such as Bollinger Bands %B, CCI, CMF, and CMO, into a consolidated oscillator displayed in a separate pane. It calculates aggregate momentum and volume conditions to identif

Indicator v5 Oscillators & momentumVolatility & bands
Updated 10 months ago · None stated GitHub repository of Hybrid Overbought/Oversold Detector

MTF Trend Dashboard

by surajmateti
1 stars

This indicator tracks and compares trend direction across the current chart timeframe and a customizable higher timeframe. It calculates fast and slow exponential moving averages on both timeframes, classifying conditions as bullish, bearish, or flat based on

Indicator v5 TrendMoving averages
Updated 11 months ago · None stated GitHub repository of MTF Trend Dashboard
1 stars

This indicator monitors and displays signals across up to five selectable symbols using an on-chart table. It evaluates price relative to the midpoints of highest highs and lowest lows over three lengths derived from a configurable base length. Bullish signals

Indicator v5 Screeners & dashboardsTrend
Updated 1 year ago · MIT GitHub repository of Kurutoga Screener Template

Trading Sessions

by yagyesh-bobde
1 stars

This indicator highlights three configurable trading sessions on the price chart. It tests whether each bar falls inside a session window using that session's own time zone, then paints a translucent background: blue for the first session, yellow for the secon

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

TOTAL MTPI STRAT M_K

by Mikelkulla
1 stars

TOTAL MTPI STRAT M_K is a trend-following crypto market direction strategy that overlays multiple technical indicators on the price chart. It combines custom weighted moving averages, dynamic EMA ribbons, RMTA, and Kijun Sen baselines to evaluate overall marke

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI STRAT M_K

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