Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 68)

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

MathConstants

by ricardosantos79
261 stars

This Pine Script v5 library exports frequently used mathematical constants as functions that return fixed numeric values. It includes e, pi, natural and base-10 logarithms of e, 2, 10 and pi, square roots of e, 2, 3 and pi, and related products and inverses su

Library v5
Updated 4 years ago · None stated GitHub repository of MathConstants
106 stars

Calculates up to four customizable Supertrend indicators using Average True Range (ATR) and user-selected price sources. It generates long and short trade signals when designated Supertrend instances switch direction, provided other configured Supertrend trend

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR GOD Strategy by TradeSmart

NQ Stats - ALN Profiler

by TamaraKGreen
46 stars

Plots trading session ranges for New York, London, and Asia directly on the price chart. The indicator draws customizable boxes highlighting the high and low of each session, with options for dotted borders, background transparency, and identifying labels. It

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of NQ Stats - ALN Profiler

Dragonfly Doji - Bullish

by TWODS-CAPITAL
37 stars

This overlay indicator marks a bullish dragonfly doji on the price chart. It treats a candle as a doji when the range is positive and the body is no larger than five percent of the range, then requires the upper shadow to be no larger than the body. On a match

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Dragonfly Doji - Bullish

Lastguru KNN A002

by ruckard
13 stars

This strategy applies k-nearest neighbors machine learning to fast and slow moving average crossovers to filter entry signals. It overlays directly on the price chart and incorporates built-in Zignaly alert triggers for automated execution. Traders can configu

Strategy v5 AI / machine learningMoving averages
Updated 1 year ago · None stated GitHub repository of Lastguru KNN A002
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine
3 stars

Calculates buy and sell volume pressure alongside the Awesome Oscillator to scan for market divergence opportunities. It initiates long and short strategy entries when divergence signals meet conditions, optionally filtered by New York trading session hours an

Strategy v5 DivergenceVolume
Updated 5 months ago · None stated GitHub repository of Divergence Scanner

Super Algo Setup [Aura]

by IAMATOMIC001
3 stars

This overlay indicator combines SuperTrend, RSI, MACD, and an EMA to mark labeled tops and bottoms on the price chart. Optional filters hide repeating signals and keep only relevant exits, and a Krypton fear-and-greed filter can limit bottoms and tops to overs

Indicator v5 Oscillators & momentumMoving averages
Updated 12 months ago · None stated GitHub repository of Super Algo Setup [Aura]

MTF FVG

by alvinng214
2 stars

MTF FVG indicator detects fair value gaps across multiple user-selected timeframes and plots them as colored boxes directly on the price chart. Bullish FVGs form when recent lows exceed prior highs while bearish FVGs form when recent highs fall below prior low

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of MTF FVG

Q-Trend Strategy

by wynnforthework
2 stars

The Q-Trend Strategy is a trend-following overlay strategy that identifies directional bias using dynamic price channels combined with an ATR volatility buffer. It calculates highest highs and lowest lows over a chosen trend period to establish a baseline midp

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Q-Trend Strategy

Generating Alerts

by Web3Degenerate
2 stars

This Pine Script indicator generates alerts based on bar close conditions. It defines hc as close greater than high[1] and lc as close less than low[1], then computes RSI with length 14. The script calls alert() with dynamic messages that include close price a

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

Atomic Tick Predictor — Statistical Next-Candle Engine estimates the likelihood of the next candle direction by combining a K-Nearest Neighbors algorithm with live tick updates. It tracks up and down ticks, tick volume, and price pressure within the active bar

Indicator v5 AI / machine learningVolume Repaints

Fable Bear HTF v1

by nishpa800
1 stars

The first release of a bearish-side detection indicator for higher timeframe charts. It draws numbered signals on the price chart from relative volume tiers, displacement using a nine standard deviation default multiplier, a VWMA with ATR Supertrend latch, poc

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Fable Bear HTF v1

A Pine Script v5 indicator in a separate pane, the second revision of a Hurst spectral oscillator. It passes the hl2 price through bandpass filters for cycles from 1 day upward and draws the cycle waves with a composite line. A single bandwidth value applies t

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator V2

MathConstantsAtomic

by ricardosantos79
261 stars

This Pine Script library provides a collection of atomic and nuclear physical constants based on CODATA reference values. It exports functions returning fundamental physical measurements, including the fine-structure constant, Rydberg constant, Bohr radius, Ha

Library v5
Updated 4 years ago · None stated GitHub repository of MathConstantsAtomic
257 stars

This indicator builds a footprint of estimated buy and sell volume across price rows and plots it in a separate pane. It fills rows from bar low to high, stores volume per row, and draws buy and sell volume boxes, volume-profile boxes, row labels, and cumulati

Indicator v5 Volume Repaints
Updated 7 weeks ago · None stated GitHub repository of Footprint Delta Lite

ATR Mean Reversion

by hasnocool
106 stars

This strategy identifies mean reversion opportunities using ATR bands on the price chart. It enters long positions when price touches the lower band (open minus ATR) with no open position and within the set time filter. Positions exit on the upper band breach,

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Mean Reversion
46 stars

This indicator tracks regular trading hours for Nasdaq futures on the price chart. It stores the current session open, high, and low and keeps yesterday's RTH high and low. It can draw those levels as lines with labels shifted a chosen number of bars to the ri

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of NQ Stats - RTH Breaks w/stats

Ease of Movement

by TWODS-CAPITAL
37 stars

Ease of Movement is a technical oscillator that measures the relationship between price changes and volume. It calculates the distance moved by the price range midpoint relative to volume, smoothed by a Simple Moving Average. The indicator plots in a separate

Indicator v5 VolumeOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Ease of Movement
13 stars

This strategy uses the Noro Trend Ribbon to determine trend direction and open long or short positions. It defines a corridor from recent high and low prices and enters positions when price crosses the corridor boundaries, sized as a percentage of capital. Fas

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of R010 R Noro Trend Ribbon
6 stars

Apex Protocol v3.0 plots smart-money structure on the price chart. It marks break of structure and market structure shifts, order blocks, fair value gaps with optional midlines, automatic Fibonacci levels, and higher-high, lower-high, higher-low, and lower-low

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine

DMI ADX Signals

by g-moe
3 stars

This indicator combines the Directional Movement Index (DMI) and the Stochastic oscillator to plot directional trade signals directly on the price chart. It offers two distinct signal logic modes: one based on DI line crossovers confirmed by Stochastic levels,

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of DMI ADX Signals

This indicator projects dynamic price target levels directly on the chart based on configurable signal conditions such as crossovers and crossunders between two sources. Users can select from a wide range of built-in technical indicators, including Supertrend,

Indicator v5 SMC / ICT / price actionSupport & resistance

MTF FVG x2 [MK]

by alvinng214
2 stars

This indicator identifies and visualizes multi-timeframe Fair Value Gaps (FVGs) directly on the price chart. It projects imbalances across multiple configurable timeframes, ranging from intraday intervals to monthly periods, with options to overlay zones or pr

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of MTF FVG x2 [MK]

Quatro SMA

by wynnforthework
2 stars

The Quatro SMA strategy identifies trend direction using four Simple Moving Averages combined with a volume confirmation filter. Long entries trigger when three fast SMAs align sequentially above a 200-period SMA while current bar volume exceeds 2.5 times its

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Quatro SMA

Getting User Input

by Web3Degenerate
2 stars

The script Getting User Input is a Pine Script v5 indicator that demonstrates various user input settings. It provides boolean toggles for on/off states, color pickers, integer and float numeric controls, symbol choices, price levels, price sources, timestamp

Indicator v5 Sessions & time
Updated 2 years ago · None stated GitHub repository of Getting User Input

Fable Bear HTF v1.2

by nishpa800
1 stars

A bearish-side detection indicator for higher timeframe charts that marks numbered signals on the price chart. It combines relative volume tiers, displacement based on a standard deviation multiplier, a VWMA with ATR Supertrend latch, pocket pivots and fair va

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Fable Bear HTF v1.2

A Pine Script v5 indicator in a separate pane, the third revision of a Hurst spectral oscillator. The hl2 price is run through bandpass filters for cycles from 1 day to 18 years and the waves are plotted with an optional composite. Bandwidth and period are set

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator V3

MathConstantsElectromagnetic

by ricardosantos79
261 stars

MathConstantsElectromagnetic is a Pine Script library that provides a collection of predefined electromagnetic constants based on 2007 CODATA reference values. It exports functions for physical parameters including elementary electron charge, magnetic flux qua

Library v5
Updated 4 years ago · None stated GitHub repository of MathConstantsElectromagnetic

Sideway Zones Live

by dearvn
257 stars

Sideway Zones Live is an overlay indicator that estimates inner and outer sideways bands from recent highs and lows with a rational quadratic kernel. It tracks swing pivots over a loopback period and counts bars that remain between the outer high and low. Afte

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Sideway Zones Live

ATR RSI Strategy v2

by hasnocool
106 stars

This strategy combines Average True Range (ATR) and the Relative Strength Index (RSI) to generate volatility-filtered momentum trades on the price chart. It checks whether a normalized ATR moving average falls within user-defined bounds and requires current AT

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR RSI Strategy v2

NQ Stats Helper

by TamaraKGreen
46 stars

NQ Stats Helper is an overlay indicator that plots custom trading session ranges, session high and low boundaries, and 50% equilibrium levels directly on the price chart. It visualizes major sessions like New York, London, and Asia with colored range boxes and

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of NQ Stats Helper

Elders Force Index

by TWODS-CAPITAL
37 stars

This indicator calculates the Elders Force Index as an exponential moving average of the close-to-close price change multiplied by volume. It plots that oscillator in a separate pane and draws a horizontal zero line. The only input is the EMA length, which def

Indicator v5 Oscillators & momentumVolume
Updated 3 years ago · MIT GitHub repository of Elders Force Index

RSIScreener A003

by ruckard
13 stars

RSIScreener A003 is an indicator that plots RSI oscillator values on the price chart for multiple monitored symbols. It calculates RSI with user-defined length and source, along with customizable overbought and oversold levels. The script can enforce a higher

Indicator v5 Oscillators & momentumSupport & resistance
Updated 1 year ago · None stated GitHub repository of RSIScreener A003

Apex Protocol v3.3

by alboogycOdR
6 stars

Apex Protocol v3.3 is a Smart Money Concepts trading indicator that plots order blocks, fair value gaps, BOS and MSS markers, auto Fibonacci levels, area of interest zones and external internal structures on the price chart. It supports multiple killzone sessi

Indicator v5 SMC / ICT / price actionScalping Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.3

This indicator plots entry signals directly on the price chart by combining Directional Movement Index (DMI) and Moving Average Convergence Divergence (MACD) indicators. It offers two distinct signal logic modes that trigger when DMI and MACD confirm each othe

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of DMI ADX Signals with MACD Signals

VitAlgo

by IAMATOMIC001
3 stars

VitAlgo is an overlay technical indicator suite that provides signal generation and visual trend tracking tools directly on the main price chart. It integrates multiple analysis modules, including customizable Sensitivity-based signal modes, Smart Trail, Rever

Indicator v5 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of VitAlgo

One Setup for Life ICT

by alvinng214
2 stars

This indicator plots horizontal lines, boxes and text labels on the price chart to mark key trading sessions. It displays daily session ranges, Silver Bullet, LN, NY, PM, London, Prev AM, Lunch and PM sessions using New York timezone calculations. The script c

Indicator v5 Sessions & timeSupport & resistance
Updated 2 months ago · None stated GitHub repository of One Setup for Life ICT
2 stars

The SVIX Bollinger Bands Strategy V2 uses Heikin-Ashi price calculations to plot customized Bollinger Bands and Keltner Channels directly on the price chart. It triggers a long entry when the Heikin-Ashi close crosses above the lower Bollinger Band. The strate

Strategy v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of SVIX Bollinger Bands Strategy V2

Hammers & Shooting Stars

by Web3Degenerate
2 stars

This overlay indicator marks hammer and shooting star candles on the price chart. It places a Fibonacci level inside each candle and treats a hammer as a body sitting above the upper level and a shooting star as a body sitting below the lower level. Optional f

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Hammers & Shooting Stars
1 stars

Draws a moving price level that bounces between the highest high and lowest low of a rolling window, 50 bars by default, with the range midline and a mirrored close line on the price chart. Buy and sell labels appear when price crosses the mirrored line or the

Indicator v5 Mean reversionOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Auto Mirror Reversal Signals

Fable Bear HTF v1.3

by nishpa800
1 stars

A bearish-side detection indicator for higher timeframe charts that draws numbered signals on the price chart. It uses relative volume tiers, a standard deviation displacement test, a VWMA with ATR Supertrend latch, pocket pivots and fair value gap engines. A

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Fable Bear HTF v1.3

A Pine Script v5 indicator in a separate pane, the fourth revision of a Hurst spectral oscillator. It filters the hl2 price with bandpass filters for cycles from 1 day to 18 years and plots the cycle waves, with an optional composite line. Each cycle has its o

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator V4
1 stars

A separate-pane indicator that builds On Balance Volume and subtracts its 20-period EMA to form an oscillator, drawn as a coloured line and area around a zero line. It detects regular bullish and bearish divergence between price pivots and the oscillator, labe

Indicator v5 VolumeDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 41 OBV

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