Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 69)

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

MathConstantsScientific

by ricardosantos79
261 stars

This Pine Script v5 library exports named SI scientific prefix factors as constant functions. Each function returns a power of ten, from Yotta through Yocto, covering large prefixes such as Giga and Mega and small prefixes such as Milli, Micro, and Nano. It ca

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

This overlay indicator looks for regular price divergences against a set of oscillators, using pivot highs and lows. It compares those pivots with RSI, MACD and its histogram, stochastic, CCI, momentum, OBV, a directional oscillator, volume-weighted MACD, Chai

Indicator v5 DivergenceOscillators & momentum Repaints
Updated 7 weeks ago · None stated GitHub repository of Snag - Best Futures V3

This strategy executes breakout trades based on historical high and low entry bands and manages risk using adaptive ATR trailing stop-loss levels. It enters long positions when the close breaks above the lookback band and short positions when it breaks below.

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR trailing SL tight to slack [Takazudo]
46 stars

This indicator plots the New York 5-minute and 15-minute Opening Ranges (ORB) directly on the main price chart. It projects opening range boxes along with midlines and median extensions to identify intraday key levels. Additionally, it can draw custom lower ti

Indicator v5 Support & resistanceSessions & time Repaints
Updated 8 weeks ago · None stated GitHub repository of NY Opening Range (Enhanced with LTF)

Engulfing - Bearish

by TWODS-CAPITAL
37 stars

This indicator identifies and labels bearish engulfing candlestick patterns directly on the price chart. It checks for a small bullish candle followed by a large bearish candle that engulfs the previous body. Pattern detection can be filtered using moving aver

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Engulfing - Bearish

This strategy trades long and short on the price chart using a multi-timeframe TradingLatino setup. It requires EMA 10 to cross or sit above or below EMA 55 on the one-hour, four-hour, and daily charts, together with a positive ADX slope, a directional monitor

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino A010
6 stars

Apex Protocol - The SMC Engine is a comprehensive Smart Money Concepts indicator that overlays key market structure levels directly on the main price chart. It calculates internal and external market structures (BOS and MSS), Order Blocks, Fair Value Gaps (FVG

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

DTEK Candles

by g-moe
3 stars

This indicator calculates dual trend filters by combining a custom SuperTrend with a Commodity Channel Index ATR trailing stop. The SuperTrend component utilizes customizable moving average types, including Hull, Exponential, and Simple Moving Averages. When p

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of DTEK Candles

Xpert Algo

by IAMATOMIC001
3 stars

Xpert Algo is a multi-feature technical indicator that plots trend-following and contrarian trade signals on the price chart. It calculates adaptive entry signals, trend clouds, reversal dots, and market structure swing points. The indicator features dynamic t

Indicator v5 TrendSupport & resistance
Updated 12 months ago · None stated GitHub repository of Xpert Algo

Order-Block Detector

by alvinng214
2 stars

Order-Block Detector identifies bullish and bearish order blocks based on candle direction changes and draws them on the price chart. It also detects fair value gaps (FVGs) and generates signals for potential entries when these levels are respected. The script

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Order-Block Detector

Wave Trend Overbought Oversold

by wynnforthework
2 stars

This indicator plots the WaveTrend Oscillator in a separate pane. It computes an EMA of normalized price deviations from the median price divided by standard deviation, then applies an SMA to generate the oscillator line. Signals trigger on overbought conditio

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Wave Trend Overbought Oversold

HMD ATR Trailing Stop Tool

by Web3Degenerate
2 stars

The HMD ATR Trailing Stop Tool calculates and plots a dynamic trailing stop line directly on the price chart. Users select a Long or Short direction, an anchor start time, structure lookback bars, and Average True Range parameters. For long positions, the stop

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of HMD ATR Trailing Stop Tool

This indicator detects higher-timeframe order blocks and fractals to generate scored reversal signals directly on the price chart. It evaluates candidate setups using a multi-factor scoring system incorporating RSI momentum, trend EMAs, midpoint distance, and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

Fable Bear HTF v1.4

by nishpa800
1 stars

A bearish-side detection indicator for higher timeframe charts that places numbered signals on the price chart. Its engines cover relative volume tiers, displacement by a standard deviation multiplier, a VWMA with ATR Supertrend latch, pocket pivots, fair valu

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

A Pine Script v5 indicator in a separate pane, the fifth revision of a Hurst spectral oscillator. The hl2 price passes through bandpass filters for cycles from 1 day to 18 years, and the resulting waves are drawn with an optional composite line. Bandwidth and

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

MathConstantsUniversal

by ricardosantos79
261 stars

This Pine Script library provides exported functions for standard physical and universal mathematical constants. It exports high-precision numerical values including the speed of light, gravitational constant, Planck constant, magnetic permeability, and electr

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

An overlay indicator that combines an ATR-based SuperTrend trailing stop with an integrated RSI-derived midline calculation on the price chart. The SuperTrend uses an ATR period and factor multiplier to plot dynamic green or red trend lines based on price dire

Indicator v5 TrendVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of SuperTrend ATR + RSI

This strategy plots automated Fibonacci bands paired with exponential moving averages on the price chart across strong, regular, and sideways trend modes. It triggers entry orders upon price interactions with configured Fibonacci thresholds and bullish signals

Strategy v5 Support & resistanceMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Auto Fib Golden Pocket Band - Autofib Moving Average
46 stars

This overlay indicator maps Asia, London, and New York session ranges on the price chart and compares later price action with the Asia range. It draws optional session boxes, a grid of Asia-range multiples from the New York open, and statistical extension and

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of NY vs Asia Statistical Levels

Engulfing - Bullish

by TWODS-CAPITAL
37 stars

This indicator marks a bullish engulfing candlestick on the price chart. It requires a white long-body candle whose body covers the previous black small-body candle, and it can require a downtrend defined by price below a 50-period SMA or by the 50-period SMA

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Engulfing - Bullish

This strategy enters long or short when eight conditions align over the last two bars. It requires EMA 10 and EMA 55 alignment on the one-hour, four-hour and daily charts, a positive ADX slope, matching monitor direction, and price relative to a 400-bar point

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino B002

AuthLib

by alboogycOdR
6 stars

AuthLib is a Pine Script utility library providing access control and state management structures for technical indicators. It checks callers against a hardcoded array of authorized TradingView usernames before executing operations. The library exports user-de

Library v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of AuthLib

This indicator plots custom dual moving average crossovers directly on the price chart to signal potential Call (long) and Put (short) entries. Users can choose from SMA, EMA, WMA, VWMA, or HMA types for both moving averages. Upon a confirmed crossover, the sc

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Dual MA Crossover Call Put Targets
3 stars

This indicator plots trading signals and overlays directly on the price chart. It generates directional buy and sell signals filtered by configurable sensitivity, signal tuning, volume, and trend clouds. The script visualizes reversal dots, market structure sw

Indicator v5 TrendSupport & resistance
Updated 12 months ago · None stated GitHub repository of ZZ Algo | Signals & Overlays
2 stars

This library plots order blocks directly on the price chart. It draws lines connecting distal and proximal points of demand order blocks with a middle 50 percent level line and colored zone fills between them. Breaker blocks appear when demand blocks are mitig

Library v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of OrderBlockDrawing_TradingFinder

Weird Renko Strat

by wynnforthework
2 stars

Weird Renko Strat requests a traditional Renko series for the chart symbol and compares the latest Renko close with the prior close. In the default mode it enters long when that close rises and short when it falls, then closes the opposing position when the di

Strategy v5 Trend
Updated 1 year ago · None stated GitHub repository of Weird Renko Strat

HMD Bollinger Band Volatility

by Web3Degenerate
2 stars

This indicator measures volatility changes by tracking the expansion and contraction of Bollinger Bands over time. It calculates standard Bollinger Bands, measures the percentage difference in band width relative to a user-defined lookback period, and identifi

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of HMD Bollinger Band Volatility
1 stars

Plots a dynamic level at the midpoint of the 50-bar high-low range and prints BUY or SELL markers on the price chart. It compares the recent summed distance between price and that level with earlier windows stepped back through history, and counts how often pr

Indicator v5 Mean reversionOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Auto Symmetric Reversal and Area

Fable Bear LTF v1

by nishpa800
1 stars

The first release of a bearish-side detection indicator for lower timeframe charts. It draws numbered signals on the price chart from relative volume tiers, a standard deviation displacement test, a VWMA with ATR Supertrend latch, pocket pivots and fair value

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

A Pine Script v5 indicator in a separate pane, the sixth 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 waves along with an optional composite line. Every cycle has its ow

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

An indicator component that computes a volume weighted average price with a standard deviation band, restarting at the start of each session by default, and plots the line and the band edges with a fill. The code can also anchor on week, month, quarter, year,

Indicator v5 VolumeSupport & resistance
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 43 VWAP

MathExtension

by ricardosantos79
261 stars

MathExtension is a Pine Script v5 library of exported math helpers and does not plot or trade. It supplies base-2 log, floating-point remainder, fractional part, a digit-scaling integral helper, an atan2 approximation in radians, Euclidean hypotenuse, and a ne

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

Try Trading Future

by dearvn
257 stars

This futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh

Strategy v5 SMC / ICT / price actionMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Try Trading Future
106 stars

Automatic Grid Bot Strategy simulates a grid trading system directly on the main price chart. It sets upper and lower price range boundaries and splits the defined range into grid levels to trade long, short, or both directions simultaneously. Users can config

Strategy v5 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Automatic Grid Bot Strategy

Oscillator Suite

by TamaraKGreen
46 stars

Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an

Indicator v5 Oscillators & momentumDivergence
Updated 8 weeks ago · None stated GitHub repository of Oscillator Suite

Envelope

by TWODS-CAPITAL
37 stars

This indicator plots a percentage envelope around a moving average of the selected source on the price chart. It computes a simple or exponential moving average as the basis, then places upper and lower bands a fixed percentage above and below that line. The l

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · MIT GitHub repository of Envelope

This strategy trades long and short using TradingLatino rules as ABCBitcoin interprets them. Entries need EMA 10 crossing or aligned with EMA 55 on the one-hour, four-hour, and daily charts, agreeing ADX slope and directional monitor, and price on the matching

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino C003

AuthLib

by alboogycOdR
6 stars

AuthLib is a Pine Script v5 library that checks a caller username against a fixed list and, when authorized, prepares drawings for six killzone sessions. It stores boxes, labels, trend lines and price labels in a DrawingData type. For each window it tracks the

Library v5 Sessions & timeSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of AuthLib

DX SPX VLT

by g-moe
3 stars

DX SPX VLT is an overlay indicator that evaluates market trends by combining moving average slope analysis, Aroon filters, and DTEK Supertrend components. It plots colored background highlights to represent overall trend direction, displays a moving average li

Indicator v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of DX SPX VLT
2 stars

This Pine Script v5 library provides a drawing function that renders overlapping supply and demand order blocks directly on the price chart. It calculates proximal, distal, and midpoint mitigation price boundaries when an origin trigger condition is met across

Library v5
Updated 2 months ago · None stated GitHub repository of OrderBlockOverlappingDrawing

Xiao Martin

by wynnforthework
2 stars

Xiao Martin is a Martingale DCA strategy that buys long positions as price drops. It enters an initial long trade and adds subsequent orders whenever price decreases by a user-defined percentage from the last entry price, subject to a cool-down period and bar

Strategy v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of Xiao Martin

HMD MACD

by Web3Degenerate
2 stars

HMD MACD plots a moving-average convergence divergence oscillator in a separate pane. It subtracts a slow moving average from a fast moving average of the chosen source, then smooths that difference into a signal line. Users can select SMA or EMA for both line

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of HMD MACD
1 stars

This indicator computes the average height of green and red candles inside a user-selected time range. Inputs define start and end timestamps that filter candle data in real time. When the range is active the script accumulates heights for green candles (where

Indicator v5 Support & resistanceCandlestick patterns
Updated 7 weeks ago · None stated GitHub repository of Average Green/Red Candle Heights

Fable Bear LTF v1.1

by nishpa800
1 stars

A bearish-side detection indicator for lower timeframe charts that draws numbered signals on the price chart. It uses relative volume tiers, standard deviation displacement with a nine multiplier default, a VWMA with ATR Supertrend latch, pocket pivots and fai

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

Hurst Through Marker

by mikeyhu70
1 stars

A Pine Script v5 indicator in a separate pane that marks cycle troughs, which its title spells as throughs, using Hurst bandpass filters. The hl2 price is filtered for cycles from 1 day to 18 years and labels and lines are drawn where cycle lows form. Bandwidt

Indicator v5 Oscillators & momentumSupport & resistance Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Through Marker
1 stars

An overlay indicator that detects confirmed pivot highs and pivot lows using separate left and right bar counts for each, ten by default. A pivot is only known after the right-hand bars have printed, so it appears with a delay. The visible code defines the det

Indicator v5 Support & resistance
Updated 1 year ago · None stated GitHub repository of Pivot Points High Low
261 stars

This Pine Script v5 library exports absolute risk statistics for a float sample. It calculates the standard deviation of positive observations, the standard deviation of negative observations, and downside deviation of values below a caller-supplied minimum ac

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

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