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

Multi Risk Demo

by be-thomas
65 stars

Multi Risk Demo is an educational strategy script demonstrating Pine Script risk management functions. It attempts to enter long positions on every bar after the year 2014 up to a pyramiding limit of ten positions. The strategy applies intraday order managemen

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Multi Risk Demo

Rate Of Change

by TWODS-CAPITAL
37 stars

This indicator plots the rate of change of a chosen price source in a separate pane. It calculates the percentage difference between the current source value and the value a set number of bars earlier, then draws that series as a line together with a horizonta

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Rate Of Change

Sergdi A002

by ruckard
13 stars

Sergdi A002 is a directional strategy designed for crypto trading. It generates long entry signals when the 4-hour DI+ crosses over the 4-hour DI-, and short entry signals on a cross under. It features configurable risk management options, including fixed perc

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergdi A002

Wave Navigator is a price-chart indicator that builds zigzag swings from ATR or percentage thresholds and scans stored pivots for Elliott-style impulse, diagonal, flat and triangle patterns. It scores candidates with optional Fibonacci, time-ratio, RSI or MACD

Indicator v6 Support & resistanceOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Wave Navigator [WavesUnchained]

BTC bar volume color

by eddiebelaval
7 stars

This overlay indicator collects Bitcoin spot volume from many named exchanges on the chart timeframe and adds those series after treating missing values as zero. It also begins gathering perpetual futures volume from several venues and sets a fixed length of 1

Indicator v5 Volume
Updated 3 months ago · None stated GitHub repository of BTC bar volume color

MSNR

by alboogycOdR
6 stars

This indicator identifies and plots key support and resistance structures directly on the price chart. It calculates A/V swing levels, price gaps, and Quasimodo levels using configurable pivot lengths and touch tolerances. Users can customize maximum level cou

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of MSNR
3 stars

The Limitless Trading Indicator is an overlay tool that combines multi-timeframe Exponential Moving Averages (13 and 62 EMAs) with Relative Strength Index (RSI) crossovers. It evaluates trend direction on a user-selected higher timeframe and filters entry sign

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Limitless Trading Indicator

Extreme Trend Reversal Points identifies potential trend reversal zones directly on the price chart using moving averages and historical range percentiles. The indicator calculates price extremes relative to historical percentile history to detect overextended

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Extreme Trend Reversal Points [HeWhoMustNotBeNamed]

PF Probe 61 Same Id Stop Raise

by pineforge-4pass
1 stars

A test strategy from a reference corpus that moves a pending stop entry in one direction before it fills. At 02:15, 02:30 and 02:45 it re-submits a buy stop one tick above the bar high, and at 14:15, 14:30 and 14:45 a sell stop one tick below the bar low, usin

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 61 Same Id Stop Raise

Quantum Trend Matrix Pro AI

by vedkanani123
1 stars

A price-chart indicator built on a triple EMA ribbon, defaulting to 8, 21 and 55 periods, with gradient fill and a trend background. It combines EMA alignment, slope, persistence, momentum, spread and squeeze detection into a weighted 0 to 100 trend score with

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Quantum Trend Matrix Pro AI

KC Combo Bull v4.6

by nishpa800
1 stars

Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo Bull v4.6
1 stars

TN Sovereign Optimized Trend v6 is a Pine Script v6 strategy that plots fast, slow, and macro EMAs on the price chart. It generates buy signals on fast EMA crossover above the slow EMA when price exceeds the 200 EMA macro filter, RSI exceeds 50, and volume sur

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Optimized Trend v6
1 stars

A Pine v4 pane indicator that draws moving average based momentum as a heat map of up to 28 rows and adds pivot-based swing detection on the oscillator. Separate pivot lookbacks and range limits are provided for short, medium and long term swings, and colored

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of Angular Momentum Swing Heat Map
1 stars

A test indicator in a separate pane that sums the previous bar's volume over several rolling windows, from ten minutes up to one day, converted into bar counts from the chart timeframe. For some windows it also plots a percentile of the sum over a longer histo

Indicator v5 Volume
Updated 1 year ago · None stated GitHub repository of VolumeSpikeTestCumulative

GENI-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell labels on the GENI price chart. It does not calculate an oscillator or generate trading signals. When the ETF input is ALL, it places green labels below bars for buys and red labels above bars for sell

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

Test 012 ZZ

by ricardosantos79
261 stars

This experimental script detects high and low pivot points to establish a basic ZigZag structure. It plots red and lime circles on the chart to highlight detected high and low pivots, along with a gray line tracking the ZigZag trajectory based on bar index off

Indicator v4 Support & resistance Repaints
Updated 4 years ago · None stated GitHub repository of Test 012 ZZ
106 stars

This Pine Script strategy uses the Commodity Channel Index (CCI) with a 20-period SMA to generate long-only signals. It plots the CCI line and dashed bands at 150 and -150 on the chart, filling the area between bands. Entries occur when CCI crosses above the l

Strategy v5 Oscillators & momentumSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of CCI High Performance Long Only

Entropy

by mihakralj
99 stars

This indicator calculates normalized Shannon entropy of a chosen source over a lookback window and plots the result in a separate pane. It ignores missing values, places valid samples into histogram bins, and divides entropy by the logarithm of the bin count s

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Entropy

My Script

by be-thomas
65 stars

This indicator calculates and plots the number of bars elapsed since the start of the current trading day. It defines a custom function to identify a new day by monitoring changes in the day of the week attribute across bars. Using the barssince function, it t

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Relative Strength Index

by TWODS-CAPITAL
37 stars

This indicator calculates the Relative Strength Index from a chosen price source using a smoothed average of gains and losses, then plots it in a separate pane. It overlays a moving average of the RSI that can be SMA, EMA, SMMA, WMA, VWMA, or a Bollinger Band

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Relative Strength Index

Sergdi B003

by ruckard
13 stars

Sergdi B003 is a trend-following strategy designed to capture directional momentum using higher-timeframe Directional Movement Index signals. It opens long positions when the 4-hour DI+ crosses over the 4-hour DI-, and short positions when DI+ crosses under DI

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergdi B003

WaveTrend Advanced Smoothing is a separate-pane momentum oscillator built on the classic WaveTrend algorithm with eight selectable smoothing techniques, including SuperSmoother, T3, KAMA, and JMA. It provides three normalization scale modes: Classic, Clamp, an

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · MIT GitHub repository of WaveTrend Advanced Smoothing [WavesUnchained]

MSNR [Optimized]

by alboogycOdR
6 stars

The MSNR Optimized indicator identifies key market structure support and resistance levels directly on the price chart, including Apex/Valley (A/V) swings, price gaps, and Quasimodo (QM) patterns. It uses configurable pivot lengths to detect structural pivots

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of MSNR [Optimized]
3 stars

Lin Reg Simplified calculates a custom linear regression channel overlaid on the main price chart. It uses a combination of weighted moving average (WMA) and simple moving average (SMA) applied to HLC3 prices to compute the trend slope, middle line, and standa

Indicator v5 TrendSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Lin Reg Simplified
2 stars

The Fast Fourier Transform (FFT) Filter decomposes time series price data into frequency components using a discrete Fourier transform algorithm. It plots the frequency-domain power spectrum in a separate pane to highlight dominant market cycles. Users can dis

Indicator v5 TrendScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Fast Fourier Transform (FFT) Filter
1 stars

This strategy tests pending stop order modification behavior in the Pine Script engine. It enters long or short positions using stop orders triggered at specific times of the trading day. An initial stop order is submitted, then modified on a later bar if no p

Strategy v6 Support & resistanceSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 62 - stop cross before modify

Recursive Kernel Trend

by vedkanani123
1 stars

A trend line on the price chart from a recursive filter that corrects a fraction of its error against price on each bar. The correction rate is scheduled by efficiency and volatility weighting, can be biased by direction, and the filter structure can be Standa

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Recursive Kernel Trend

KC Combo Bull v4.7

by nishpa800
1 stars

Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo Bull v4.7
1 stars

A simple trend and momentum strategy on the price chart. It goes long when RSI is above an upper threshold while price sits above a 200-period EMA, and short when RSI is below a lower threshold with price under the EMA. Each entry places an ATR-based stop loss

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Tn Sovereign RSI ATR

This indicator calculates a smoothed momentum oscillator from price and plots many offset momentum lines in a separate pane as a colour-graded heat map. Moving average type, smoothing periods, the number of plotted lines and the colour theme are adjustable. It

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of Angular Momentum Swing Heat Map Plot
1 stars

Pine v4 experiment that sketches a synthetic dollar index from weighted currency pairs, kept in comments, but the active code only plots the chart's close price. It also prints a label with the timeframe multiplier, period and high, and requests a 15-minute IB

Indicator v4
Updated 1 year ago · None stated GitHub repository of Bloomberg Dollar Spot Index

GH Tracker

by Allen1212
303 stars

GH Tracker plots historical buy and sell transactions executed by ARK Invest funds for Guardant Health directly on the price chart. It uses hardcoded execution timestamps to render green buy labels below price bars and red sell labels above price bars. Users c

Indicator v4
Updated 2 years ago · None stated GitHub repository of GH Tracker

Test 013 Global Array in Local

by ricardosantos79
261 stars

This script serves as a technical test demonstrating global array manipulation within custom functions in Pine Script. It initializes a global float array with ten elements set to the open price. On each bar execution, a user-defined function pops the last arr

Indicator v4
Updated 4 years ago · None stated GitHub repository of Test 013 Global Array in Local

CCI Level Zone

by hasnocool
106 stars

This strategy plots the Commodity Channel Index of the OHLC4 price in a separate pane and uses fixed CCI zones to allow long or short trades. Longs open when the CCI is above its long level, optionally above an SMA of the CCI, and the long RSI crosses a buy le

Strategy v5 Oscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of CCI Level Zone
99 stars

This indicator plots an exponential decay envelope on the price chart. Each bar it keeps the source value when it exceeds the previous result, otherwise it multiplies the previous result by (length minus one) divided by length so the line falls exponentially a

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Exponential Decay (EDECAY)

My Script

by be-thomas
65 stars

This indicator is a TradingView documentation example that places a single label on the price chart. It creates the label once and then updates its coordinates each bar so the label stays at the current bar index and the bar high. The label text is three lines

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Relative Vigor Index

by TWODS-CAPITAL
37 stars

This indicator plots the Relative Vigor Index in a separate pane. It divides the length-period sum of symmetrically weighted close-minus-open values by the matching sum of high-minus-low ranges, then plots that line and a symmetrically weighted moving average

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Relative Vigor Index

Sergdi C003

by ruckard
13 stars

Sergdi C003 is a trading strategy that generates entry signals using directional movement index (DI+ and DI-) crossovers on a four-hour higher timeframe. It opens long positions on bullish DI crossovers and short positions on bearish crossovers. The script inc

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Sergdi C003
9 stars

WaveTrend v2 [WavesUnchained] is a momentum oscillator displayed in a separate pane. It derives channel index values using configurable price sources and smooths them with selectable algorithms including EMA, HMA, WMA, or JMA approximation. Traders can toggle

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 days ago · MIT GitHub repository of WaveTrend v2 [WavesUnchained]
7 stars

This indicator plots Smart Money Concepts and price action components directly on the price chart. It highlights bullish and bearish order blocks, multi-timeframe pivot points, market structure swings with key Fibonacci retracement levels (0.618 and 0.786), zo

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Cryptokazancev Strategy Pack

MSNR [OPTIMIZED]AI

by alboogycOdR
6 stars

This indicator detects and draws support and resistance structure levels directly on the price chart. It identifies Apex/Vortex (A/V) pivot levels, price gap levels, and Quasimodo (QM) pattern levels, tracking whether each level is fresh or previously tested.

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of MSNR [OPTIMIZED]AI
3 stars

This indicator calculates and plots a linear regression line alongside upper and lower deviation bands directly on the price chart. It determines linear regression slope and channel width using weighted and simple moving average formulas across a user-specifie

Indicator v5 TrendSupport & resistance
Updated 5 months ago · None stated GitHub repository of Linear Regression

Financial Growth

by regalouisei
2 stars

This indicator plots financial growth metrics in a separate pane as a customizable table. It calculates year-over-year and quarter-over-quarter changes plus CAGR for user-selected items including revenue, net income, EBITDA, EPS, dividends, total assets, liabi

Indicator v5 Screeners & dashboards Repaints
Updated 8 months ago · None stated GitHub repository of Financial Growth
1 stars

This strategy rotates pending stop entries by the clock. Before noon it places a long stop one tick above the bar high and cancels the short order id; from noon it places a short stop one tick below the bar low and cancels the long order id. An open long is cl

Strategy v6 Sessions & timeBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 63 - dual stop cancel rotation

Live Tick Counter

by morindok
1 stars

This indicator calculates and plots a multi-factor order-flow analysis using tick counts, volume ratios, big player volume, recent delta momentum, and a K-nearest neighbors pattern matching algorithm. It evaluates bull and bear thresholds across multiple weigh

Indicator v5 VolumeScreeners & dashboards Repaints
Updated 7 weeks ago · None stated GitHub repository of Live Tick Counter

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