Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 73)

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

1 stars

This early indicator uses the Goertzel algorithm to estimate a dominant cycle from the chosen price source, then projects the cycle forward for a set number of periods. Projected prices and dates are shown in a dashboard table on the price chart. The cycle len

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Price and Date Forecast V1

MathTrigonometry

by ricardosantos79
261 stars

This Pine Script v5 library exports trigonometric helpers and draws nothing on the chart. It provides a normalized sinc function plus cotangent, cosecant, and secant, with matching inverse functions arc cotangent, arc secant, and arc cosecant. Hyperbolic sine,

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

BankNifty Bearish Intraday is an intraday short strategy designed for the Bank Nifty index. It evaluates multiple momentum and trend indicators across multiple timeframes, including MACD downticks on 5-minute, 15-minute, and 60-minute resolutions, an RSI below

Strategy v5 Oscillators & momentumTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BankNifty Bearish Intraday
46 stars

This indicator tracks and projects session-based price retracement levels directly onto the main price chart. Users can configure up to five distinct time sessions alongside specific evaluation windows to measure price retracement targets calculated from open

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of Time Based Retracement - Stats

Harami Cross - Bearish

by TWODS-CAPITAL
37 stars

This indicator identifies the bearish Harami Cross candlestick pattern on the price chart. The pattern consists of a long bullish candle followed by a Doji whose entire high-to-low range is contained within the real body of the preceding candle. Trend directio

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Harami Cross - Bearish
13 stars

Ruckard Kayseri A003 is a trend-following trading strategy based on moving average crossovers using a primary smoothed moving average and a fast moving average. It features built-in date filtering and integrated Zignaly webhook alert message formatting for aut

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Kayseri A003

This strategy calculates trend direction across three user-defined higher timeframes using dual Simple Moving Averages, filtered by On-Balance Volume and Commodity Channel Index conditions alongside fractal pivot swings. Entries trigger when multi-timeframe tr

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Fractals with Pivot Trendlines Strategy
2 stars

This indicator identifies and visualizes swing liquidity levels directly on the main price chart. It detects pivot highs and lows, filtering them according to normalized volume strength relative to recent standard deviation. Active liquidity levels are drawn a

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Liquidity Zones [BigBeluga]

Volume (RVOL)

by Web3Degenerate
2 stars

This indicator calculates relative volume (RVOL) by dividing current bar volume by its simple moving average. It plots standard volume columns in a separate pane along with the volume moving average and an RVOL trigger threshold line. Volume columns are highli

Indicator v5 Volume
Updated 2 years ago · None stated GitHub repository of Volume (RVOL)

Cylinder

by morindok
1 stars

The Cylinder indicator projects a geometric 3D cylinder shape directly onto the price chart using Pine Script polylines. The user defines two anchor points on the chart via interactive price and time selection inputs. The script calculates relative time and pr

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Cylinder

First Bar Fable v5

by nishpa800
1 stars

A larger release of a composite detection indicator with many toggleable numbered signals drawn on the price chart. They cover relative volume setups with displacement and a pullback-and-jump pattern, plus named patterns such as Typhoon, Musashi, Whale, Dynami

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of First Bar Fable v5
1 stars

This indicator combines three dominant cycle lengths, pivot highs and lows, and candlestick pattern matching to project future turning prices and dates. Bollinger Band, Keltner Channel and volatility lengths are also available as inputs. Projected values appea

Indicator v5 Support & resistance Repaints
Updated 6 months ago · None stated GitHub repository of Price and Date Forecast V3

MLActivationFunctions

by ricardosantos79
261 stars

MLActivationFunctions is a Pine Script v5 library that provides standard activation functions and their derivatives for neural network models built directly in Pine Script. It exports mathematical functions including binary step, linear, sigmoid, hyperbolic ta

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of MLActivationFunctions

Bar Color

by hasnocool
106 stars

Bar Color is a simple candle-based reversal strategy displayed directly on the price chart. It checks the relationship between the bar close and open prices. On a bullish candle, it triggers a long entry and exits any active short position. On a bearish candle

Strategy v5 Candlestick patterns
Updated 2 years ago · GPL-3.0 GitHub repository of Bar Color
46 stars

This overlay indicator tracks up to four independent session levels on the price chart. For each level it records the high and low of a chosen range window, then draws an optional box for that range and a horizontal retracement line at a user-set percentage of

Indicator v5 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of Time-based Range Retracement - Stats

Historical Volatility

by TWODS-CAPITAL
37 stars

This indicator calculates historical volatility as the standard deviation of logarithmic close-to-close returns over a user-set length. It annualizes that value with 365 days and a period factor of one on intraday or one-day charts, otherwise seven, then multi

Indicator v5 Volatility & bands
Updated 3 years ago · MIT GitHub repository of Historical Volatility
13 stars

Ruckard Kayseri B003 is a trend-following strategy designed to generate trade entries based on the interaction between a fast moving average and a main smoothed moving average. It incorporates customizable position management features, including fixed percenta

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Kayseri B003

CRT State Engine

by alboogycOdR
6 stars

CRT State Engine plots time-based CRT models, session state ranges, and institutional market structure on the main price chart. It detects liquidity sweeps, order blocks, Fair Value Gaps, and volume profile imbalances across specified New York time sessions. T

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

FX Market Sessions highlights distinct trading sessions, such as London, New York, and previous day ranges, directly on the main chart using colored boxes and labels. It tracks session highs, lows, and pip spans, with configurable options for opening ranges, F

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of FX Market Sessions
2 stars

This indicator detects order blocks and breaker blocks on the price chart using swing highs and lows with a configurable lookback length. Bullish order blocks appear as blue boxes and lines while bearish ones use orange coloring. Breaker blocks trigger red and

Indicator v5 SMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Order Blocks & Breaker Blocks

VWAP and VWMA

by Web3Degenerate
2 stars

This indicator plots either a Volume Weighted Average Price (VWAP) or a Volume Weighted Moving Average (VWMA) directly on the price chart, coloring the line based on whether the close is above or below it. It generates trading signals by combining the trend fi

Indicator v5 Moving averagesCandlestick patterns
Updated 2 years ago · None stated GitHub repository of VWAP and VWMA
1 stars

This indicator plots detrended candlesticks in a separate pane relative to a chosen baseline to highlight market cycles around a zero line. Users can switch the baseline mode between a moving average and high/low extremes. In moving average mode, it subtracts

Indicator v5 Moving averagesOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Detrended Candles (Switchable)

First Bar Fable v6

by nishpa800
1 stars

The v6 release of a composite detection indicator that draws many toggleable, numbered signals on the price chart. Signals cover relative volume setups with displacement, pullback-and-jump patterns and named formations such as Typhoon, Musashi, Whale, Dynamite

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of First Bar Fable v6
1 stars

This debug build combines three dominant cycle lengths, pivot highs and lows, and candlestick pattern matching to project future turning prices and dates. Bollinger Band, Keltner Channel and volatility lengths are also available as inputs. Projected values app

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Price and Date Forecast V3 Debug

MLLossFunctions

by ricardosantos79
261 stars

MLLossFunctions is a Pine Script v5 library that exports loss-function methods for machine learning calculations. It computes mean squared error as the average of squared differences between expected and predicted float arrays. It also computes binary cross-en

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of MLLossFunctions

This strategy evaluates trades using an SMA baseline, Hull Moving Average trend filter, and ATR volatility conditions. It triggers long entries when price exceeds the baseline by an ATR qualifier distance while trading above the HMA trend bias, with an optiona

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Baseline Cross Qualifier Volatility Strategy with HMA Trend Bias

VP History Widget

by TamaraKGreen
46 stars

This indicator plots historical session volume profiles directly on the price chart as offset visual widgets. It aggregates volume or open interest across user-defined sessions such as daily, weekly, or monthly periods using lower-timeframe data. The script se

Indicator v5 VolumeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of VP History Widget

Hull Moving Average

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the standard Hull Moving Average (HMA) directly on the main price chart. The HMA aims to reduce lag while preserving smoothing by combining weighted moving averages over half-length and full-length periods, followed by a fin

Indicator v5 Moving averagesTrend
Updated 3 years ago · MIT GitHub repository of Hull Moving Average
13 stars

This strategy enters long when WaveTrend reads the market as oversold and short when it reads the market as overbought. It draws on the price chart and uses a reverse strategy type with optional start and stop dates. Stop loss is enabled by default and can fol

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of Ruckard LazyBear WaveTrend A002

CRT State Engine

by alboogycOdR
6 stars

CRT State Engine is an overlay indicator that maps New York-timed CRT models, unmitigated order blocks, market structure, liquidity pools, and volume profile on the price chart. It can draw session boxes for Asia, London, London lunch, and New York and optiona

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

Gary - Levels

by g-moe
3 stars

Gary - Levels is a TradingView Pine Script v5 indicator that overlays multiple session-based VWAP calculations and high/low lines directly on the price chart. It plots an RTH VWAP line for the regular trading hours session (default 0930-1600 ET) and a full-ses

Indicator v5 Moving averagesSupport & resistance
Updated 5 months ago · None stated GitHub repository of Gary - Levels
2 stars

Order Blocks & Imbalance MTF detects bullish demand and bearish supply order blocks driven by Fair Value Gaps (FVG). The indicator calculates gap sizes using an ATR multiplier threshold across configurable timeframes via higher-timeframe data requests. When va

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Order Blocks & Imbalance MTF

Zen Library Patterns

by Web3Degenerate
2 stars

This indicator imports the Zen Library and uses it to detect several candlestick reversal patterns on the price chart. It identifies bullish and bearish engulfing candles, hammers, stars, and dojis, then plots corresponding shape markers with labels. The libra

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Zen Library Patterns
1 stars

This indicator projects time-based cycles and detrended price oscillators in a separate pane starting from a user-defined date range. It calculates the bar count of an initial reference period, then recursively multiplies segment lengths using a Fibonacci rati

Indicator v5 Oscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Detrended Fibo Time {Morindok}

Heavy Combo Toggles v2

by nishpa800
1 stars

An indicator that groups fifteen heavy combo detections into three master plots on the price chart: bullish, bearish and neutral. Each master plot is an OR across five combos, namely Heavy Yin-Yang, Heavy Nagasaki, Heavy Nagasaki Volume, Heavy Trident and Neut

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Heavy Combo Toggles v2
1 stars

This indicator combines three dominant cycle lengths, pivot highs and lows, and candlestick pattern matching to project future turning prices and dates. Bollinger Band, Keltner Channel and volatility lengths are also available as inputs. Projected values appea

Indicator v5 Support & resistance Repaints
Updated 6 months ago · None stated GitHub repository of Price and Date Forecast V4
261 stars

The Multiple Regression Polynomial Forecast indicator calculates linear and polynomial regression forecasts using array data sampled from price series. It plots projected regression channel lines directly on the price chart to visualize trend direction and pot

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Multiple Regression Polynomial Forecast

BB and KC Strategy

by hasnocool
106 stars

This strategy identifies breakout momentum by combining Bollinger Bands and Keltner Channels with volume confirmation. It opens long positions when the upper Keltner Channel crosses above the upper Bollinger Band and volume exceeds its moving average. Converse

Strategy v5 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BB and KC Strategy

Weekly IB

by TamaraKGreen
46 stars

Weekly IB is an overlay indicator that tracks and visualizes the weekly initial balance levels on the main price chart. It features customizable day-of-week labels, daily session boundary highlights, configurable timezones, and optional Fibonacci retracement l

Indicator v5 Support & resistanceSessions & time
Updated 8 weeks ago · None stated GitHub repository of Weekly IB

Ichimoku Cloud

by TWODS-CAPITAL
37 stars

This indicator plots the classic Ichimoku Cloud on the price chart. It calculates the conversion line and base line as midpoints of the highest and lowest prices over their lengths, then averages those lines for Leading Span A and uses a longer midpoint for Le

Indicator v5 TrendSupport & resistance
Updated 3 years ago · MIT GitHub repository of Ichimoku Cloud
13 stars

This strategy draws on the price chart and trades long, short, or both using simple moving averages of an ohlc4 source together with ADX and directional-index key levels. It can display a high and low closing moving-average ribbon and limit activity with optio

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard Lunatic A003

CRT State Engine

by alboogycOdR
6 stars

CRT State Engine draws an institutional candle-range state model on the price chart. It tracks New York session models, market structure, unmitigated order blocks, liquidity pools, and optional volume profile and multi-pair correlation. Change-in-state detecti

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

Gary Oscillator plots a volume-weighted moving average of a price-volume ratio in a separate pane. It multiplies volume by the difference between close and open divided by their sum, scales that value by one hundred, and smooths it with a fourteen-period VWMA.

Indicator v5 Oscillators & momentumVolume
Updated 5 months ago · None stated GitHub repository of Gary - Oscillator
1 stars

A strategy that builds an opening range from 09:30 to 09:45 New York time and enters long or short on the first close beyond it each day. The position is split across three take profit targets set as risk multiples, with adjustable percentages. The stop sits a

Strategy v5 Sessions & timeBreakout
Updated 8 days ago · GPL-3.0 GitHub repository of 15-Min ORB Strategy for NQ TP3 Runner
1 stars

This indicator plots three detrended price series and their moving averages in a separate pane. It converts a user-selected start and end time into a bar length, then builds simple moving averages of close at that length and at 1.618 and 0.618 multiples. Each

Indicator v5 Moving averages
Updated 7 weeks ago · None stated GitHub repository of Detrended Price + Detrended MAs

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