Pine Library · 7,612 open-source scripts

Free TradingView Indicators (page 122)

Open-source Pine Script indicators that draw on your TradingView chart or in their own pane. Copy one and paste it into the Pine Editor.

Pine scripts7,612
Code shown here3,783open licence
Updated in a year5,283
No repaint flag6,673

Indicators: All

P_syn_types_udt_methods

by GammaExpansion
1 stars

This test script demonstrates and validates Pine Script v6 user-defined types and custom methods. It constructs a custom Bar object storing price data, bar index, and metadata, then applies custom methods to evaluate the price span and bullish state. In a sepa

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_syn_types_udt_methods

Session Liquidity

by rosijay17-cmd
1 stars

An overlay indicator that draws horizontal lines at the high and low of up to three user-defined daily time spans, such as Asia, London and New York. Each session has its own time range, day-start timezone, line colour, style, width and optional text label, an

Indicator v5 Sessions & timeSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Session Liquidity

DEPV2 DEBUG S9

by YuceSezar89
1 stars

DEPV2 DEBUG S9 is a multi-symbol indicator for 20 major cryptocurrencies traded on Binance futures. It generates trading signals by combining four method classes: trend based on price levels, momentum using rate of change, volatility based on expansion or nois

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S9

Dragon Strength Pro

by morindok
1 stars

Dragon Strength Pro is an overlay indicator that stores recent pivot highs and pivot lows confirmed by left and right bar lengths, keeping up to fifty of each. It averages the slope from those pivots to the current close and scores upward impact from lows and

Indicator v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Dragon Strength Pro
1 stars

A price-chart indicator by BigBeluga, based on the HalfTrend logic from everget, that draws a HalfTrend line with ATR channel bands and prints long and short signals on trend flips. Each signal draws entry, stop loss and three take-profit levels, with the stop

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of HalfTrend Long/Short Signal Engine
1 stars

Overlay indicator of single-bar detections drawn on the price chart. It covers relative volume tiers named SAAB, Kratos, Grand Slam and MOAB, regular-at-time volume tiers, an all-time high volume marker, momentum LONG and SHORT tiers, high-volume ranks from 15

Indicator v5 VolumeOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Heavy Weapons Single v3

Supply and Demand MTF

by mikeyhu70
1 stars

Finds supply and demand zones from strong momentum candles and draws them as boxes on the price chart, with an option to pull zones from additional timeframes. Settings control momentum body multiple, momentum count and span, how far back zones are searched, w

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of Supply and Demand MTF

VWAP Delta

by ivansoft
1 stars

An indicator in a separate pane that plots how far price is from an anchored volume weighted average price, as a percentage of the VWAP. The VWAP itself is drawn on the price chart. Percentile lines over a chosen number of bars mark the two upper and lower ext

Indicator v6 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of VWAP Delta

Weekdays Gaps

by everget
947 stars

Weekdays Gaps highlights background chart areas where calendar weekday gaps occur between consecutive bars. It compares the day of the week of the current bar with that of the preceding bar to detect non-sequential calendar transitions, such as missing data or

Indicator v4 Sessions & time
Updated 12 days ago · GPL-3.0 GitHub repository of Weekdays Gaps

CFMS-tracker

by Allen1212
303 stars

CFMS-tracker is an overlay indicator that marks historical ARK Invest sell events for the CFMS ticker as red labels above price bars. The visible script places two Sell X1 labels on 16 and 17 January 2020 using bar timestamps. A single ETF setting exists but o

Indicator v4
Updated 2 years ago · None stated GitHub repository of CFMS-tracker
99 stars

Ehlers Automatic Gain Control (AGC) detrends raw price data using a roofing filter—combining a two-pole high-pass filter and a Super Smoother—to generate a zero-mean oscillating signal. It then applies an automatic gain control algorithm that tracks exponentia

Indicator v6 Oscillators & momentumVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Automatic Gain Control (AGC)
65 stars

This indicator demonstrates inspecting internal variables from within loop structures, originally authored for TradingView documentation. It calculates a cumulative balance of true range changes by iterating through past bars up to a user-defined lookback peri

Indicator v4 Volatility & bands
Updated 6 days ago · GPL-3.0 GitHub repository of Debugging from inside for loops

This indicator detects and draws the first Fair Value Gap (FVG) that forms in each hourly session based on a selected lower timeframe, with specialized handling for Regular Trading Hours (RTH) confluence windows. It draws FVG range boxes, midpoint lines, hourl

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

OHLC Average (OHLC4)

by mihakralj
47 stars

This indicator plots the arithmetic mean of each bar's open, high, low, and close on the price chart. A function multiplies the four prices by 0.25 and returns one value, which the script plots as a yellow line of width two. There are no user inputs, so the fo

Indicator v6
Updated 8 months ago · MIT GitHub repository of OHLC Average (OHLC4)

Keltner Channels

by TWODS-CAPITAL
37 stars

This indicator plots Keltner Channels on the price chart. It builds a basis from an exponential or simple moving average of a chosen source, then places upper and lower bands a multiplier away from that basis. Band width uses average true range, true range, or

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · MIT GitHub repository of Keltner Channels

The Regime Transition Engine categorizes the market into seven distinct regime states, including compression, expansion, trend, and exhaustion. It calculates volatility percentiles, efficiency ratios, choppiness, and linear regression slopes to measure market

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Regime Transition Engine [WavesUnchained]

CRT State Engine

by alboogycOdR
6 stars

CRT State Engine is an overlay indicator that maps New York time-based CRT models at 9PM, 1AM, 5AM, and 9AM. It tracks market structure, liquidity sweeps, change-in-state delivery, and unmitigated order blocks that stay drawn until mitigated. Optional modules

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine
3 stars

This indicator identifies and plots bullish and bearish Fair Value Gaps (FVGs) directly on the price chart using box drawings. It detects three-bar price imbalances, adjusting sensitivity via user settings. The script can dynamically minimize box boundaries as

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of GARY Fair-Value GAPS

MTF Order Block Finder

by alvinng214
2 stars

MTF Order Block Finder is a price-chart indicator that marks institutional order blocks from a selected higher timeframe. A bullish block is the last down candle before a run of up candles, and a bearish block is the last up candle before a run of down candles

Indicator v4 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of MTF Order Block Finder

Reverse Wave Trend %J

by mushroom-men-Trading
2 stars

Calculates the Wave Trend %J oscillator and works backwards through its equations to project the required price levels needed to reach target oscillator values. It approximates the Channel Index required for specified overbought or oversold conditions and proj

Indicator v6 Oscillators & momentumSupport & resistance
Updated 9 months ago · None stated GitHub repository of Reverse Wave Trend %J

PSMC - Bitcoin Gaps

by Web3Degenerate
2 stars

This overlay indicator reads daily open, high, low, and close from a reference symbol that defaults to BTC1!. It measures the percentage gap between the daily open and the previous daily close. A gap at or beyond the minimum percentage stores a bullish level a

Indicator v4 Support & resistance
Updated 2 years ago · None stated GitHub repository of PSMC - Bitcoin Gaps

P_syn_var_varip

by GammaExpansion
1 stars

This test indicator calculates and plots execution state variables across price bars to verify Pine Script v6 runtime behavior. It tracks bar execution counts using persistent variables, tracks intrabar tick execution with persistent intrabar variables, stores

Indicator v6 Repaints
Updated 7 days ago · MIT GitHub repository of P_syn_var_varip

DEPV2 Debug Siga

by YuceSezar89
1 stars

DEPV2 is a multi-symbol crypto indicator that generates trading signals across 20 Binance assets including BTC, ETH, and SOL. It analyzes four method classes—trend, momentum, volatility, and volume—using modes such as simultaneous confirmation requiring at lea

Indicator v6 Screeners & dashboardsOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug Siga
1 stars

Dual MA Detrended Price calculates two detrended price series by subtracting simple moving averages from a chosen price source. It derives the moving average lengths by applying Golden Ratio multipliers of 1.618 and 0.618 to a configurable base length setting.

Indicator v5 Oscillators & momentumMoving averages
Updated 7 weeks ago · None stated GitHub repository of Dual MA Detrended Price
1 stars

A trend indicator on the price chart that prints BUY and SELL labels on confirmed bar closes, each meant to exit one side and enter the other. It combines a Supertrend line, fast and slow EMAs and a ZLEMA, and requires ADX, DMI spread and RSI conditions plus a

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of Hermes Prime v1 - Confirmed Flip

Supply and Demand MTF

by mikeyhu70
1 stars

Finds supply and demand zones from strong momentum candles and draws them as boxes on the price chart, with an option to pull zones from additional timeframes. Settings control momentum body multiple, momentum count and span, how far back zones are searched, w

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of Supply and Demand MTF

Zig Zag

by ivansoft
1 stars

Draws a zig zag line on the price chart connecting swing pivots using an imported Zig Zag library. A new reversal is accepted when price moves by a set percentage, 5 by default, and pivots use a leg count of 10. Labels can show the reversal price, cumulative v

Indicator v6 Support & resistanceTrend
Updated 1 year ago · None stated GitHub repository of Zig Zag
947 stars

The script calculates and plots the year-to-date percentage return based on the difference between the current close and the year's open. This plot appears in a separate pane with a black line, colored green for positive returns and red for negative ones. Hori

Indicator v4 Support & resistance
Updated 12 days ago · GPL-3.0 GitHub repository of Year-to-Date (YTD) % Return

CGEN-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell labels on the CGEN price chart. It places dated labels above or below bars, marking sells in red and buys in green, and shows how many ARK ETFs traded the stock on the same day. An ETF input switches b

Indicator v4
Updated 2 years ago · None stated GitHub repository of CGEN-tracker
99 stars

This indicator calculates John Ehlers' Center of Gravity from a chosen price source over a configurable length. It weights each price by its position in the window, divides the weighted sum by the sum of prices, and shifts the result so the window midpoint sit

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Center of Gravity (CG)
65 stars

This indicator walks a lookback loop and compares the current true range with each earlier true range. It adds the sign of each difference into a running balance and plots that balance in a separate pane with a zero line. On every bar it also builds a left-ali

Indicator v4 Volatility & bands
Updated 6 days ago · GPL-3.0 GitHub repository of Debugging from inside for loops
47 stars

This indicator calculates the one-sample t-statistic comparing the rolling mean of a selected price or return series against a hypothesized population mean. It uses an O(1) circular buffer with running sums and Bessel's correction to compute sample variance ef

Indicator v6
Updated 8 months ago · MIT GitHub repository of One-Sample t-Test (ZTEST)

Relative Leg Efficiency (RLE) measures price efficiency across pivot-to-pivot movement legs. Plotted in a separate pane with chart pivot overlays, it calculates path distance, execution duration, and counter-pressure to produce efficiency scores. Traders can a

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Relative Leg Efficiency (RLE) - Panel + Chart [WavesUnchained]

CRT State Engine

by alboogycOdR
6 stars

Implements an institutional Candle Range Theory (CRT) framework aligned to New York market time windows at 1 AM, 5 AM, and 9 AM. It calculates Draw on Liquidity (DOL) levels using pivot points, manages session state machine boxes, and generates entry signals w

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine

GG - Levels

by g-moe
3 stars

This indicator tracks and visualizes key intraday session levels directly on the price chart. It calculates open, high, low, and close values for Regular Trading Hours (RTH), the Overnight Session (ON), and the Initial Balance (IB) period. It draws horizontal

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of GG - Levels

This indicator detects bullish and bearish fair value gaps on a user-selected timeframe and draws them as boxes on the price chart. Body sensitivity sets the minimum candle body size relative to the average before a gap is accepted. Mitigation can require a fu

Indicator v6 SMC / ICT / price actionScreeners & dashboards Repaints

Rogers-Satchell Volatility (RSV)

by mushroom-men-Trading
2 stars

The Rogers-Satchell Volatility (RSV) indicator measures historical market volatility using open, high, low, and close price values, allowing accurate estimates even in the presence of price drift. It computes the Rogers-Satchell variance per bar, smooths it us

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Rogers-Satchell Volatility (RSV)

PSMC - Drawing Variable Values

by Web3Degenerate
2 stars

This indicator calculates the gap between the 100-period and 50-period exponential moving averages and converts that difference into ticks. It draws the result as text in a green label placed below the current bar on the price chart. Each new bar replaces the

Indicator v4 Moving averages
Updated 2 years ago · None stated GitHub repository of PSMC - Drawing Variable Values

P_ver_bool_na

by GammaExpansion
1 stars

This script defines a Pine Script v6 indicator that assigns na to a boolean variable and plots either 1 or 0 depending on its value in a separate pane. The plot always returns 0 because the boolean is initialized to na. No input settings modify the behavior. T

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_ver_bool_na

DEPV2 Debug SIGD

by YuceSezar89
1 stars

DEPV2 Debug SIGD evaluates multi-symbol and multi-method signal confluence across up to twenty cryptocurrency symbols. It processes four distinct market dimensions—trend, momentum, volatility, and volume—to derive confirmation signals under simultaneous or seq

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug SIGD

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