Synced with GitHub · updated today

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

Inside Bar Breakout

by Basant1Saini
1 stars

Inside Bar Breakout identifies standard and double inside bar candlestick patterns to trade breakout momentum. It sets trigger levels using reference bar extremes plus an adjustable percentage buffer. Once a pattern forms, the strategy waits up to five bars fo

Strategy v5 Candlestick patternsBreakout
Updated 7 months ago · None stated GitHub repository of Inside Bar Breakout

Thrust Breakout Algorithm

by Tradehook-org
1 stars

A Pine v5 script that looks for a price thrust followed by a pullback entry on the price chart. A thrust is a rate of change beyond a percent threshold. A pullback is price easing back toward a short EMA or by a small tolerance after the thrust bar, and an RSI

Indicator v5 Oscillators & momentumBreakout
Updated 8 months ago · None stated GitHub repository of Thrust Breakout Algorithm

SPY Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from an o

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPY Gamma (1DTE)

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy plots entry and exit signals on the price chart for E-mini S&P futures. It fades price action after the opening range closes during regular trading hours. The strategy declares a fixed position size of one contract with $2.01

Strategy v5 Mean reversionSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
1 stars

This technical indicator plots multiple analytical components directly on the price chart, combining Bollinger Bands, moving averages, relative strength index calculations, and average true range measurements. It generates buy and sell signals based on volatil

Indicator v5 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Ultimate Buy and Sell Indicator
1 stars

An indicator on the price chart that filters price with a range-based line. The smoothed average absolute price change over a sampling period, 100 by default, is multiplied by a range multiplier to give a band size. The filter only moves when price leaves the

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Range Filter Buy and Sell 5min
1 stars

This overlay indicator simulates a date-bounded Bitcoin dollar-cost average and separate long and short value-averaging books. Inside the start and end dates it adds a fixed USDT amount each bar, converts it at the close into BTC, and updates average price and

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 04 Long/Short DCA+VA

Bollinger BandWidth

by ivansoft
1 stars

Plots Bollinger BandWidth, the distance between the upper and lower Bollinger Bands relative to the middle band, in a separate pane. Two extra lines track the highest value over a chosen expansion length and the lowest over a contraction length, both 125 bars

Indicator v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Bollinger BandWidth
1 stars

An indicator that detects classic candlestick patterns and marks them with labels on the price chart. Patterns include engulfing, hammer, shooting star, doji variants, morning and evening stars, harami cross, dark cloud cover and piercing. Each pattern can be

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns

Technical Analysis Namespace

by fiji-solutions
1 stars

This indicator calculates common technical analysis variables including RSI, Stochastic Oscillator, EMA moving average, ATR volatility, and MACD with signal and histogram. It plots the MACD line, signal line, and histogram in a separate pane. The script serves

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of Technical Analysis Namespace

Max Index

by JohnsonHsiao
1 stars

Max Index is an oscillator that measures range expansion and contraction over rolling periods. It calculates a rolling high-low range over a user-defined lookback window, applies double exponential smoothing to that range, computes the ratio between the two sm

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Max Index
1 stars

A moving average drawn on the price chart that uses a beta-shaped weighting function, letting the user trade lag against smoothness. Two parameters, one labeled minus lag and one plus lag, reshape the weights across the window, while the length and source are

Indicator v4 Moving averages
Updated 4 years ago · None stated GitHub repository of BWMA Beta Weighted Moving Average
1 stars

A Pine v4 strategy that plots a 26-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of KAVABTC EMA Cross Strategy

Asymmetrical RSI

by everget
947 stars

Asymmetrical RSI is an indicator that computes a custom relative strength index from the rate of change of a user-selected source. It plots the resulting ARSI line in a separate pane with color coding that turns green above the overbought level and red below t

Indicator v4 Oscillators & momentum
Updated 11 days ago · GPL-3.0 GitHub repository of Asymmetrical RSI

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

AIR-tracker

by Allen1212
303 stars

AIR-tracker is an overlay indicator that plots historical buy and sell transactions executed by ARK Invest for the corresponding stock on the price chart. It draws green labels below bars for buy events and red labels above bars for sell events based on hardco

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

Function - Linear Regression

by ricardosantos79
261 stars

This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function - Linear Regression

ESU2023 Futures 1M

by dearvn
257 stars

This strategy calculates volume-weighted moving averages and standard deviation Fibonacci channels using price data from multiple timeframes. It overlays these volatility bands directly on the main price chart to identify potential trend levels. Automated trad

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of ESU2023 Futures 1M

Fair Value Gaps - Basic

by TradersPost
218 stars

This indicator detects bullish and bearish fair value gaps on the price chart and draws a translucent box for each gap. A bullish gap needs the high two bars back below the current low and a bullish middle candle; a bearish gap uses the opposite gap and a bear

Indicator v6 SMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Fair Value Gaps - Basic

LAMA-based Strategy

by capissimo
114 stars

This indicator calculates two Log-Normal Moving Averages (LAMA) based on John Ehlers' adaptive process and generates trend-following signals on the price chart. Entry signals trigger when the fast LAMA crosses the slow LAMA, optionally filtered by ATR volatili

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of LAMA-based Strategy

8D Run

by hasnocool
106 stars

8D Run is a Pine Script momentum strategy inspired by Linda Bradford Raschke. It tracks consecutive price closes relative to a 5-period Simple Moving Average (SMA). When price remains above the SMA for 8 or more bars and then dips below it, the strategy enters

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 8D Run

Bandpass Filter (BPF)

by mihakralj
99 stars

This indicator calculates a bandpass series by cascading a highpass infinite impulse response filter with a lowpass filter. Lower and higher cutoff periods set the pass band, and the source input selects the series being filtered. It plots the source minus the

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bandpass Filter (BPF)

Linefill demo

by be-thomas
65 stars

This indicator draws a channel between the most recent confirmed pivot highs and pivot lows on the price chart. It stores the last two pivot high prices and the last two pivot low prices, then, on the last confirmed historical bar, extends a line through each

Indicator v5 Support & resistance
Updated 5 days ago · GPL-3.0 GitHub repository of Linefill demo
56 stars

This indicator plots an exponential moving average on the price chart. It calculates the EMA from a user-selected source, defaulting to the close, over a length that defaults to 44. An offset setting shifts the plotted line forward or backward by a chosen numb

Indicator v4 Moving averages
Updated 2 months ago · None stated GitHub repository of Moving Average Exponential
55 stars

This indicator overlays on the price chart and provides trend and momentum analysis. It calculates and plots three exponential moving averages with fixed periods of 20, 50, and 200 using yellow, orange, and blue colors respectively. The script also computes th

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · Apache-2.0 GitHub repository of Trend & Momentum Analysis
47 stars

The Donchian Channels indicator plots the middle basis line as the average of the high and low over the user-defined period. It also draws the upper band as the highest high and the lower band as the lowest low across the same period on the price chart. The ma

Indicator v6 Volatility & bandsSupport & resistance
Updated 8 months ago · MIT GitHub repository of Donchian Channels (DCHANNEL)

8020 System Indicator

by TamaraKGreen
46 stars

This overlay indicator draws 80/20 price levels and optional 40-point zone bands on the price chart. It marks repairs, cross sections, and forks with optional letter labels, and can highlight confluence when those marks sit near a level. Separate options shade

Indicator v6 Support & resistanceCandlestick patterns
Updated 7 weeks ago · None stated GitHub repository of 8020 System Indicator
37 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average and a multiple of standard deviation. It places a long stop entry when close crosses above the lower band and a short stop entry when close crosses below the upper band. Pendi

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · MIT GitHub repository of Bollinger Bands Strategy directed

Zen Gaps v5.0

by Zen-Tim
29 stars

This indicator draws colored boxes on the price chart to highlight gaps between bars. It detects bullish gaps when the current low exceeds the prior bar's high and bearish gaps when the current high falls below the prior bar's low. Strong gaps receive extra em

Indicator v5 Support & resistanceCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen Gaps v5.0

Template

by benso87
24 stars

This is a template script for a TradingView Pine Script indicator. It provides empty sections for inputs, functions, calculations, plots, and alerts, plus helper functions for moving average types. Users must add their own code to implement logic. No calculati

Indicator v5 Moving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Template
16 stars

This trend-following strategy plots Donchian channels and execution signals directly on the price chart. It calculates Average True Range volatility to determine position sizing based on a fixed risk percentage of account equity. Long and short entries trigger

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 27: Asymmetric R/R

Divergenced K002

by ruckard
13 stars

This strategy enters on divergences between Squeeze Momentum section changes and price, confirming the pattern across two pairs at once. A smaller squeeze with higher price opens a short; a higher squeeze with lower price opens a long. Curie closing moving ave

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced K002

Calculates directional setup scores by evaluating market structure, Fibonacci retracement location, and momentum response metrics. It analyzes confirmed price pivots, movement efficiency, ATR-adjusted Fibonacci zones, and oscillator divergences across user-sel

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Directional Probability Engine [WavesUnchained]
9 stars

This indicator plots a volume-weighted moving average as a central trend baseline and surrounds it with ATR-based volatility bands. It colors the trend and optional price bars according to whether price is on the bullish or bearish side of those bands. Users c

Indicator v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Volume Weighted Trend [QuantAlgo]

Supertrendx3

by PipC
8 stars

The indicator calculates three distinct Supertrend lines on the main price chart using separate customizable ATR periods and multipliers. Users can switch between standard ATR and SMA-based true range calculations. It can highlight background trend states, dis

Indicator v4 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of Supertrendx3

PaperHands

by lunarticktrading
7 stars

PaperHands is an indicator that plots entry, re-entry, and exit signals for LONG and SHORT positions in a separate pane. It calculates signals using multiple confluence conditions such as real candle color, Heikin-Ashi candle color and flat bottoms or tops, He

Indicator v6 TrendOscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of PaperHands

Volatility Risk Premium

by eddiebelaval
7 stars

Calculates the Volatility Risk Premium (VRP) by comparing implied volatility against realized volatility calculated using Close-to-Close, Parkinson, or Garman-Klass methods. It plots VRP values as a histogram or line in a separate pane with optional Bollinger

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of Volatility Risk Premium

MA ROC Strategy

by suyons
7 stars

MA ROC Strategy calculates five configurable moving averages (SMA, EMA, or WMA) and plots ATR-based Keltner Channels directly on the price chart. It combines moving average crossovers and Rate of Change (ROC) calculations to generate long and short trading sig

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · None stated GitHub repository of MA ROC Strategy
6 stars

Capital41 Williams Flow Simple calculates current and higher-timeframe Williams %R values alongside a volume filter to identify trend regimes and momentum entries. It defines bullish, bearish, or chop market regimes using the higher-timeframe Williams %R. Entr

Indicator v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Williams Flow Simple v2
6 stars

This strategy detects key support and resistance zones based on candle wick rejections and liquidity sweeps. It filters trade setups using an exponential moving average and optional higher-timeframe trend confluence, while also permitting high-confidence count

Strategy v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Wick Rejection S/R Strategy v3

This overlay diagnostic builds three total-volume profiles from a fixed 15-minute source over a user-defined swing range. Fine, base, and coarse grids use row sizes near the base tick setting and assign each bar's volume by high-low tick overlap. Local density

Indicator v6 Volume
Updated 3 days ago · MPL-2.0 GitHub repository of VP RSD Multi-Resolution Consensus Diagnostic
5 stars

This indicator computes and plots a harmonic moving average alongside optional central tendency measures directly on the price chart. It calculates the harmonic mean, geometric mean, simple arithmetic mean, median, and midrange over a user-defined lookback win

Indicator v4 Moving averagesTrend
Updated 8 months ago · None stated GitHub repository of Harmonic Moving Average

Charles' RSI Strategy

by jerryinyang
5 stars

This strategy plots on the price chart and looks for a sequence of RSI overbought or oversold crosses before it can enter. It calculates RSI on a selectable timeframe and compares a fast EMA with a slow EMA, optionally requiring the same moving-average conditi

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Charles' RSI Strategy

EMAs + BB Squeeze + Trend Long Strategy is an overlay strategy combining multi-timeframe Exponential Moving Averages with Bollinger Bands squeeze dynamics. It evaluates short, medium, and long EMAs defaulting to daily resolution alongside Bollinger Bands to id

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of EMAs + BB Squeeze + Trend Long Strategy

Elton's Kimi Claw

by eltonaguiar
4 stars

This indicator calculates a composite volume score using relative volume ratios, short-term volume trends, moving averages, and spike thresholds. It plots buy and sell signals directly on the price chart alongside Average True Range based take-profit and stop-

Indicator v5 VolumeVolatility & bands
Updated yesterday · None stated GitHub repository of Elton's Kimi Claw

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