Synced with GitHub · updated yesterday

Free TradingView Pine Scripts

10,850 free, open-source indicators, strategies and libraries for TradingView. Copy any script and paste it into the Pine Editor to use it on your chart.

New scripts by RSS
10,850 scripts

Multi-Order Breakout Strategy

by wynnforthework
2 stars

This breakout strategy enters long positions when the price moves above the upper Bollinger Band, Parabolic SAR, and a 100-period exponential moving average, provided ATR confirms elevated volatility. It allows opening multiple scaled entries up to a user-defi

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multi-Order Breakout Strategy

Draw - Lines

by Web3Degenerate
2 stars

This educational Pine Script indicator demonstrates how to draw and manage custom line objects directly on the price chart. It calculates line endpoints by connecting specified historical low prices and bar indices or timestamps to current bar highs. The scrip

Indicator v5 Support & resistance
Updated 2 years ago · None stated GitHub repository of Draw - Lines

Z-Score Lab

by jayadevrana
1 stars

Z-Score Lab plots the simple moving average of close and bands at one and two standard deviations on the price chart, and computes the current z-score of price versus that mean. On the last bar it stores a rolling sample of z-scores and shows a histogram table

Indicator v6 Volatility & bandsMean reversion
Updated 3 days ago · MPL-2.0 GitHub repository of Z-Score Lab

BFI Reversal

by skipp-dev
1 stars

BFI Reversal is a price-chart indicator that marks reversal and continuation setups from pivot structure, clustered zones, and scored flow. It offers balanced or aggressive early-reversal modes and a continuation-breakout mode, with asset profiles for auto, st

Indicator v6 Support & resistanceVolume
Updated 3 days ago · None stated GitHub repository of BFI Reversal

Mantle Keltner Regime

by pineforge-4pass
1 stars

A long-only strategy built on Keltner Channels. It enters long when price crosses above the upper band while the channel centre is above a longer trend EMA. It exits when price closes below the channel centre, or when price falls a chosen fraction of the chann

Strategy v6 Volatility & bandsBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of Mantle Keltner Regime

P_err_use_before_def

by GammaExpansion
1 stars

This Pine Script indicator is a minimal test fixture designed for parser and compiler verification. It attempts to call a custom function to multiply the closing price by two prior to its definition block, subsequently plotting the output value in a separate i

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_err_use_before_def
1 stars

A strategy built on the opening range. It waits for price to break above or below the range, return to the broken level, and then cross back through it in the same direction, at which point it enters. The range duration, buffer percentage, touch or close trigg

Strategy v6 BreakoutSessions & time Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of ORB Break-Return-Cross Strategy

DEPV2 DEBUG S20

by YuceSezar89
1 stars

This indicator watches up to twenty user-chosen symbols and scores each one with four signal classes: trend, momentum, volatility, and volume. Signal mode can use a single class, require several classes to agree, require them in a set order inside a bar window

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

Williams Fractals

by morindok
1 stars

Williams Fractals marks swing highs and swing lows on the price chart using Bill Williams fractal rules. A high or low is confirmed when neighbouring bars over a chosen number of periods sit beyond it, with extra checks that allow a few equal highs or lows bes

Indicator v6 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Williams Fractals
1 stars

A squeeze and momentum oscillator in a separate pane. It compares an EMA-based volatility band with an ATR channel to detect squeezes and plots a smoothed momentum histogram colored by strength and direction. Regular and hidden divergence between price and mom

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Adaptive Squeeze Momentum Pro

Lemon Strategy

by GreyssonEnterprises
1 stars

A Pine v4 strategy version of a W and M pattern approach. It looks for reversal shapes in price, OBV and Williams %R, with optional MFI, RSI and directional movement, using a shared maximum width and offset, plus an optional Fibonacci retracement zone over a 2

Strategy v4 DivergenceOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Lemon Strategy
1 stars

A Pine Script v5 indicator in a separate pane, an alternative build of the fifth Hurst peak marker revision. It applies bandpass filters to the hl2 price for cycles from 1 day to 18 years and labels cycle peaks with lines. Bandwidth and period can be set per c

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Peak Marker V5 Alt

Combination by yzz

by webcrack4
1 stars

This indicator scans price action and multiple technical oscillators to detect regular and hidden divergences, displaying them directly on the price chart. It checks up to ten indicators including RSI, MACD, Stochastic, CCI, Momentum, OBV, VWmacd, Chaikin Mone

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combination by yzz

On Balance Volume

by ivansoft
1 stars

Plots on balance volume in a separate pane: a running total that adds volume on bars where the close rises and subtracts it where the close falls. An optional smoothing line can be added with SMA, EMA, SMMA, WMA or VWMA, or SMA with Bollinger Bands whose width

Indicator v6 Volume
Updated 1 year ago · None stated GitHub repository of On Balance Volume

A Pine v4 strategy using a 12/26 MACD, a 14-period RSI and rolling highs and lows over very short lookbacks of two and twenty bars. Inputs set take-profit and stop-loss percentages for longs and shorts of two and ten percent, and up to four adds. Counters of n

Strategy v4 Oscillators & momentumBreakout Repaints
Updated 4 years ago · None stated GitHub repository of MACD Please 4 (Short Lookbacks)
948 stars

This indicator checks whether the current chart uses Kagi chart formatting. It analyzes price bar structural characteristics by counting bars where open or close equals the high, low, and adjacent open/close levels across the history. An informational label di

Indicator v4 Candlestick patterns
Updated 11 days ago · GPL-3.0 GitHub repository of Kagi Chart Identifier
330 stars

This indicator plots a Supertrend built from ATR bands on the price chart. It raises a lower band and lowers an upper band from the selected source, then flips trend when the close crosses the opposite band. Green and red broken lines mark the active trend, wi

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend From Scratch [Alorse]

ATAI-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell trade records for ATAI directly onto the price chart. It plots visual labels on specific timestamps indicating when ARK ETFs purchased or sold shares, along with multiplier counts showing transaction f

Indicator v4
Updated 2 years ago · None stated GitHub repository of ATAI-tracker

MathComplexArray

by ricardosantos79
261 stars

MathComplexArray is a Pine Script v5 utility library that provides array functions for managing complex numbers. It represents complex arrays as flat float arrays storing interleaved real and imaginary components. The library includes functions to instantiate

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

Snag - VWAP

by dearvn
257 stars

This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - VWAP

Order Blocks - Simple

by TradersPost
218 stars

Order Blocks - Simple calculates pivot highs and lows to identify potential smart money concepts order block zones directly on the main price chart. When price breaks structure relative to past pivot points, the indicator draws colored box zones around the hig

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Order Blocks - Simple

Time Series Decomposition and Forecasting is an experimental overlay indicator that decomposes historical price action into trend, centered moving average, and seasonality components using array calculations. It calculates multiplicative seasonal indexes and f

Indicator v4 Trend
Updated 1 year ago · None stated GitHub repository of Time Series Decomposition and Forecasting

Anand's Strategy

by hasnocool
106 stars

Anand's Strategy is a multi-timeframe breakout strategy that determines overall bias using daily candle data and triggers entries on 15-minute breakouts. It calculates higher-timeframe trend direction by comparing previous daily closes against daily high and l

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Anand's Strategy
99 stars

Chebyshev Type I Filter (CHEBY1) calculates a second-order Chebyshev Type I lowpass digital filter directly on the price chart. It provides noise reduction and trend smoothing with steep roll-off characteristics governed by controlled ripple in the passband. T

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chebyshev Type I Filter (CHEBY1)

Allow Entry In Demo

by be-thomas
65 stars

This Pine Script v4 strategy demonstrates the strategy.risk.allow_entry_in function for conditional entry control. It draws entries on the price chart by opening long positions when position size is less than or equal to zero and short positions when position

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Allow Entry In Demo
47 stars

This indicator calculates a 2-pole Infinite Impulse Response highpass filter to isolate higher-frequency components or remove trends from a given price source. It computes an internal highpass value based on a configurable length parameter and plots the result

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Highpass Filter (2-Pole)
46 stars

Leptokurtic Directional Bias is an overlay indicator that measures kurtosis on a chosen source and marks directional bias on the price chart. The source can be a moving average, ATR, volume, close, or a Bollinger-band trend stop. Bias mode switches among RSI m

Indicator v5 Volatility & bandsMean reversion
Updated 7 weeks ago · None stated GitHub repository of Leptokurtic Directional Bias

Doji

by TWODS-CAPITAL
37 stars

This indicator marks standard doji candles on the price chart. It treats a bar as a doji when the range is positive, the body is no larger than five percent of the range, and the upper and lower shadows are nearly equal. Dragonfly and gravestone variants are e

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Doji
16 stars

Implements an adaptive trend-following and range-trading strategy that switches behavior based on ADX regime detection. When ADX exceeds the threshold, it executes Donchian breakouts with fractional pyramiding and Chandelier trailing stops. In low ADX environm

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 41: Sector-Adaptive

FilledValueGap C002

by ruckard
13 stars

The FilledValueGap C002 strategy opens positions in the opposite direction of filled value gaps, assuming price action will resume the underlying trend after a gap fills. It includes customizable take profit, stop loss based on gap distance or percentage, trai

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FilledValueGap C002

This indicator analyzes impulse momentum, swing pivot structure, and nearby clustered support and resistance zones to project three forward price paths on the chart. It calculates weighted probabilities for direct continuation, pullback continuation, and struc

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 days ago · MIT GitHub repository of Market Scenario Projector [WavesUnchained]
7 stars

BTC M2 Global Deviation [MIT] measures and visualizes the correlation between global fiat M2 money supply and Bitcoin price. It aggregates M2 economic data across major national central banks, converts all currencies to USD, and normalizes both the global M2 t

Indicator v6 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of BTC M2 Global Deviation [MIT]

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts indicator designed for session-based trading. It determines market direction using a higher timeframe Exponential Moving Average and highlights Asian range boundaries alongside London and New York killzones. Th

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

Calculates a combination of the Relative Strength Index, MACD histogram, and Bollinger Bands contraction to identify long trade entries. The strategy signals a long position on a bullish bar when the MACD histogram turns upward while negative, RSI remains belo

Strategy v4 Oscillators & momentumVolatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of RSI + MACD + BB Long Strategy (Not Good)
4 stars

The RSI Divergence indicator plots the Relative Strength Index in a separate pane with horizontal lines for overbought at 70, mid at 50, and oversold at 30. It detects bullish divergence when price forms a lower low but RSI forms a higher low, marked by a gree

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of RSI Divergence [trugurpala]

Custom Engulfing

by g-moe
3 stars

Custom Engulfing is an overlay indicator that highlights bullish and bearish candle patterns directly on the price chart using background colors. It identifies a bullish signal when a green candle closes above the prior candle's body and its body length exceed

Indicator v5 Candlestick patterns
Updated 5 months ago · None stated GitHub repository of Custom Engulfing

SAB PRO Pivot Master

by IAMATOMIC001
3 stars

SAB PRO Pivot Master is a price-chart overlay that builds an RSX-style oscillator from a chosen source and length, then compares price extremes with that oscillator over a lookback window to mark pivots and bullish or bearish divergence. Overbought and oversol

Indicator v5 Oscillators & momentumVolatility & bands
Updated 12 months ago · None stated GitHub repository of SAB PRO Pivot Master

ICT Setup 01 TFlab

by alvinng214
2 stars

This indicator detects Fair Value Gaps using a multiplier factor and validity period. It identifies liquidity sweeps and hunts within or outside defined zones to generate long and short signals. Signals can be configured to fire after a specified number of hun

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Setup 01 TFlab

Uabmacd

by avatar-lavventura
2 stars

The script plots a WaveTrend oscillator in a separate pane, calculating TCI as an EMA of a normalized price deviation and its 4-bar SMA. It displays overbought and oversold levels with colored circles for WT1-WT2 crossovers and bar coloring on crossover bars.

Indicator v4 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of Uabmacd
2 stars

This overlay indicator tracks confirmed pivot highs and lows and lets those levels drift by a fraction of a 200-period ATR when no new pivot appears. When price crosses the upper level it extends the structure line, resets the opposite count, and prints a numb

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Angle Market Structure [BigBeluga]

Jurik Moving Average (JMA)

by mushroom-men-Trading
2 stars

This indicator calculates and plots the Jurik Moving Average directly on the main price chart. It uses an adaptive smoothing algorithm that dynamically adjusts to market volatility to reduce lag while minimizing overshoot. The script does not generate buy or s

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Jurik Moving Average (JMA)

Draw - Plot Character

by Web3Degenerate
2 stars

This educational Pine Script demonstrates how to plot characters and text annotations directly on the price chart using the built-in plotchar function. It checks bar conditions, such as whether a bar is confirmed or represents the chart's last bar, to trigger

Indicator v5
Updated 2 years ago · None stated GitHub repository of Draw - Plot Character

About the Pine Script Library

The ForexR Pine Script Library collects open-source TradingView indicators, strategies and libraries that are published on GitHub. Every script links to its repository, so you can see the author's latest version, issues and licence. Where the licence allows it, the full code is on the script's page, ready to copy into TradingView's Pine Editor. Stars, updates and licences are synced from GitHub every day, and new scripts are added every week.

Each script is read automatically before it is listed: it must declare an indicator, strategy or library for Pine Script version 4 or later, and copies of the same code are listed only once. The summaries and tags are written automatically from the code and the README. They describe what a script does; they are not a recommendation, and nothing here is tested or endorsed by ForexR.

Indicators and backtests describe the past. Check any strategy in the Strategy Tester and on a demo account before you trade with it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Pine Script Library FAQ

What is Pine Script?

Pine Script is the programming language of TradingView. Indicators, strategies and libraries written in it run directly on TradingView charts: an indicator draws lines, zones or signals, a strategy places simulated trades that the Strategy Tester reports on, and a library holds functions other scripts can import.

How do I add a Pine Script to my TradingView chart?

Open a script here and press Copy script. In TradingView, open the Pine Editor at the bottom of the chart, create a new indicator or strategy, select all of the template text and paste over it. Press Save, then Add to chart. A strategy's trades appear in the Strategy Tester tab.

Are these Pine Scripts free?

Yes. Every script listed here is published on GitHub, so you can read and use it at no cost. ForexR shows the full code only when the author published it under an open licence, such as MIT, GPL or the Mozilla Public License that TradingView adds to new scripts. For other scripts the Copy button reads the file straight from GitHub. Check the licence before reusing code in your own work.

Why are there no Pine Script v3 or older scripts?

Pine Script versions 1 to 3 are years out of date and miss most of the functions current scripts rely on. The library lists scripts written for versions 4, 5 and 6, and you can filter by version. Version 6 is the current one.

What does "Repaints" mean?

A repainting script can change its signals after the fact: on the live bar, or when it reads a higher timeframe before that bar has closed. Its history then looks better than it would have traded in real time. Scripts where the code or the author says so are marked Repaints, and the "Hide repainting" filter leaves them out.

How does ForexR choose which scripts to list?

A crawler searches GitHub every week for Pine Script files, reads each one and keeps scripts written for Pine version 4 or later in repositories with at least one star. Copies of the same code are listed once, under the most-starred repository. Repositories that ship programs, hide downloads behind passwords or show signs of bought stars are left out. Stars, updates and licences are refreshed from GitHub every day, and the summaries are written automatically from each script's code and README.

Trade on TradingView With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers