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
106 stars

Calculates up to four customizable Supertrend indicators using Average True Range (ATR) and user-selected price sources. It generates long and short trade signals when designated Supertrend instances switch direction, provided other configured Supertrend trend

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR GOD Strategy by TradeSmart

Connors RSI (CRSI)

by mihakralj
99 stars

The Connors RSI indicator calculates a composite momentum oscillator as the average of standard RSI on the input source, RSI on directional price streaks, and percent rank of one-bar rate of change. It plots this value in a separate pane below the price chart.

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Connors RSI (CRSI)

array.sort()

by be-thomas
65 stars

This demonstration script illustrates the usage of the array sorting function in Pine Script v4. It creates two float arrays with fixed numerical values and evaluates the final bar state on the chart. If the last bar is bullish, it sorts the first array in asc

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of array.sort()

NQ Stats - ALN Profiler

by TamaraKGreen
46 stars

Plots trading session ranges for New York, London, and Asia directly on the price chart. The indicator draws customizable boxes highlighting the high and low of each session, with options for dotted borders, background transparency, and identifying labels. It

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats - ALN Profiler

Dragonfly Doji - Bullish

by TWODS-CAPITAL
37 stars

This overlay indicator marks a bullish dragonfly doji on the price chart. It treats a candle as a doji when the range is positive and the body is no larger than five percent of the range, then requires the upper shadow to be no larger than the body. On a match

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

This strategy implements a trend-following Donchian channel breakout system with momentum-based position sizing. It enters an initial scaled position on a channel breakout to minimize false breakout risk, then adds to the position if RSI confirms directional s

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 47: Momentum Sized

Lastguru KNN A002

by ruckard
13 stars

This strategy applies k-nearest neighbors machine learning to fast and slow moving average crossovers to filter entry signals. It overlays directly on the price chart and incorporates built-in Zignaly alert triggers for automated execution. Traders can configu

Strategy v5 AI / machine learningMoving averages
Updated 1 year ago · None stated GitHub repository of Lastguru KNN A002

This strategy evaluates the dynamic relationship between price and a chosen moving average across six diagnostic dimensions: trend, respect, extension, compression, acceleration, and exhaustion. It plots a normalized relationship oscillator bounded between -10

Strategy v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of Market–Average Relationship Engine [WavesUnchained]
7 stars

The indicator calculates total volume for the IMOEX Russian index by summing volumes of 30+ constituent stocks fetched via request.security. Dollar volume is normalized by multiplying close prices with volumes. The script detects index mode and plots the resul

Indicator v6 Volume
Updated 3 months ago · None stated GitHub repository of Dollar Normalized Volume & IMOEX
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.

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

Strategy Long Template

by krosenfeld7
5 stars

This long-only strategy template provides boilerplate logic for building custom Pine Script trading systems on the price chart. It features built-in risk management that calculates target exits and stop-loss levels using either percentage-based distances or Av

Strategy v4 Volatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Strategy Long Template
4 stars

This strategy executes trades based on Stochastic Oscillator crossovers combined with a trend filter and ATR-based risk management. It calculates smoothed %K and %D lines alongside an Exponential Moving Average (EMA). A long signal triggers when %K crosses abo

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · MIT GitHub repository of Stoch Strategy [trugurpala]
3 stars

Calculates buy and sell volume pressure alongside the Awesome Oscillator to scan for market divergence opportunities. It initiates long and short strategy entries when divergence signals meet conditions, optionally filtered by New York trading session hours an

Strategy v5 DivergenceVolume
Updated 5 months ago · None stated GitHub repository of Divergence Scanner

Super Algo Setup [Aura]

by IAMATOMIC001
3 stars

This overlay indicator combines SuperTrend, RSI, MACD, and an EMA to mark labeled tops and bottoms on the price chart. Optional filters hide repeating signals and keep only relevant exits, and a Krypton fear-and-greed filter can limit bottoms and tops to overs

Indicator v5 Oscillators & momentumMoving averages
Updated 12 months ago · None stated GitHub repository of Super Algo Setup [Aura]

MTF FVG

by alvinng214
2 stars

MTF FVG indicator detects fair value gaps across multiple user-selected timeframes and plots them as colored boxes directly on the price chart. Bullish FVGs form when recent lows exceed prior highs while bearish FVGs form when recent highs fall below prior low

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of MTF FVG

VWMA_WF_cross

by avatar-lavventura
2 stars

Calculates a 24-period Volume-Weighted Moving Average (VWMA) and RSI divergence using 60-minute timeframe data, accompanied by percentage-based envelope bands and Williams Fractal logic. The indicator plots the VWMA line alongside customizable upper and lower

Indicator v4 Moving averagesVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of VWMA_WF_cross

This indicator creates a heatmap table in a separate pane showing cointegration strength between a user-defined list of symbols. It calculates aligned returns from sum and difference spreads for each symbol pair, then derives a cointegration proxy as the resid

Indicator v6 Mean reversionScreeners & dashboards Repaints

Mass Index (MASSI)

by mushroom-men-Trading
2 stars

The Mass Index indicator measures volatility and potential trend reversals by examining the range between high and low prices. It calculates a single exponential moving average (EMA) and a double EMA of the high-low difference, computes their ratio, and sums t

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Mass Index (MASSI)

Q-Trend Strategy

by wynnforthework
2 stars

The Q-Trend Strategy is a trend-following overlay strategy that identifies directional bias using dynamic price channels combined with an ATR volatility buffer. It calculates highest highs and lowest lows over a chosen trend period to establish a baseline midp

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Q-Trend Strategy

Generating Alerts

by Web3Degenerate
2 stars

This Pine Script indicator generates alerts based on bar close conditions. It defines hc as close greater than high[1] and lc as close less than low[1], then computes RSI with length 14. The script calls alert() with dynamic messages that include close price a

Indicator v5
Updated 2 years ago · None stated GitHub repository of Generating Alerts

Open-Prep Daily Panel

by skipp-dev
1 stars

This indicator renders a top-right table dashboard with a baked-in snapshot of the last open-prep run. It lists up to ten watchlist symbols, their playbook labels, directional bias, composite scores, tier tags, gap percentages, and relative volume. A freshness

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 3 days ago · None stated GitHub repository of Open-Prep Daily Panel
1 stars

This long-only strategy identifies trend-following entries using moving average crossovers filtered by higher-timeframe trend alignment. It plots directly on the main price chart. Entries trigger when a fast exponential moving average crosses above a slow movi

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of MTF probe 10 - HTF bracket static

P_fmt_crlf

by GammaExpansion
1 stars

P_fmt_crlf is a basic test indicator that calculates a custom formula using the closing price and plots the result directly on the main chart area. It defines a user-defined function that doubles the input value and adds one, then executes this on the current

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_fmt_crlf

SMC NQ Pro v3 - Auto SL/TP

by rosijay17-cmd
1 stars

An overlay indicator for smart money concepts on Nasdaq futures. It marks order blocks, fair value gaps, break of structure and change of character, liquidity sweeps and premium and discount zones, with lookbacks for each. London, New York and Asian sessions c

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 7 days ago · GPL-3.0 GitHub repository of SMC NQ Pro v3 - Auto SL/TP

DEPV2 DEBUG S27

by YuceSezar89
1 stars

DEPV2 DEBUG S27 is a multi-asset signal evaluation indicator designed to monitor up to twenty cryptocurrency pairs simultaneously. It classifies market behavior into four analytical dimensions: trend, momentum, volatility, and volume. The script supports multi

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

Atomic Tick Predictor — Statistical Next-Candle Engine estimates the likelihood of the next candle direction by combining a K-Nearest Neighbors algorithm with live tick updates. It tracks up and down ticks, tick volume, and price pressure within the active bar

Indicator v5 AI / machine learningVolume Repaints

ATSYS Keep It Simple

by vedkanani123
1 stars

A price-chart indicator with Portuguese labels that combines Bollinger Bands, a fast 13 and slow 34 exponential average, and coloured clouds. Bands default to an exponential basis and can use simple, smoothed or weighted types. The average cloud changes colour

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of ATSYS Keep It Simple

Fable Bear HTF v1

by nishpa800
1 stars

The first release of a bearish-side detection indicator for higher timeframe charts. It draws numbered signals on the price chart from relative volume tiers, displacement using a nine standard deviation default multiplier, a VWMA with ATR Supertrend latch, poc

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

TN HFT Engine

by raybird
1 stars

A smart money style strategy that scores setups from 0 to 100 using market structure, momentum, range context and liquidity sweeps, with fair value gaps and order blocks drawn on the price chart. Trades need a minimum score, optional higher-timeframe agreement

Strategy v6 SMC / ICT / price actionSessions & time
Updated 2 months ago · None stated GitHub repository of TN HFT Engine

Squeeze2backtester

by GreyssonEnterprises
1 stars

Squeeze2backtester is an indicator-based backtester that identifies volatility squeezes by comparing Bollinger Bands with Keltner Channels. It simulates trade executions directly on the price chart, tracking entry prices, stop-loss thresholds, breakeven levels

Indicator v4 Volatility & bandsBreakout Repaints
Updated 2 months ago · MIT GitHub repository of Squeeze2backtester

A Pine Script v5 indicator in a separate pane, the second revision of a Hurst spectral oscillator. It passes the hl2 price through bandpass filters for cycles from 1 day upward and draws the cycle waves with a composite line. A single bandwidth value applies t

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

This indicator identifies regular and hidden divergences across up to ten technical oscillators simultaneously, including RSI, MACD, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, MFI, and an external source. It plots divergence lines and text labels directly o

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Divergence for Many Indicators yzz
1 stars

An indicator in a separate pane that shows how far each bar's high, low, close and optionally open, size or high-low combinations moved from the previous bar, as columns. Percentile levels over a chosen number of bars mark unusually large moves, and a cumulati

Indicator v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Price Impulse Detector

RSI Please!

by tseitz
1 stars

A Pine v4 strategy that plots a 66-period weighted moving average and combines a 12/26 MACD, a 14-period RSI, candle sizes and rolling highs and lows over a long lookback. Inputs set take-profit and stop-loss percentages for each side, the long lookback and th

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 4 years ago · None stated GitHub repository of RSI Please!

Moving Median

by everget
948 stars

Moving Median calculates the 50th percentile value of a specified price source over a user-defined lookback period using the nearest rank method. It plots directly on the main price chart as a single line. When trend highlighting is enabled, the plot changes c

Indicator v4 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Moving Median
330 stars

This momentum strategy combines the Moving Average Convergence Divergence and Directional Movement Index indicators to generate long trading signals. It enters a long position when the MACD line crosses above its signal line while positive directional movement

Strategy v4 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of MACD + DMI [Alorse]

BABA-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest funds for Alibaba stock directly on the price chart. It renders green upward labels below price bars for purchases and red downward labels above price bars for sales, displaying t

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

MathConstantsAtomic

by ricardosantos79
261 stars

This Pine Script library provides a collection of atomic and nuclear physical constants based on CODATA reference values. It exports functions returning fundamental physical measurements, including the fine-structure constant, Rydberg constant, Bohr radius, Ha

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

This indicator builds a footprint of estimated buy and sell volume across price rows and plots it in a separate pane. It fills rows from bar low to high, stores volume per row, and draws buy and sell volume boxes, volume-profile boxes, row labels, and cumulati

Indicator v5 Volume Repaints
Updated 6 weeks ago · None stated GitHub repository of Footprint Delta Lite

RSI Divergence Scanner

by TradersPost
218 stars

The RSI Divergence Scanner calculates the Relative Strength Index and identifies regular and hidden bullish or bearish divergences against price using pivot high and low points. It plots divergence lines and customizable labels directly on the price chart. Inp

Indicator v6 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of RSI Divergence Scanner

Aggregate Signal

by capissimo
114 stars

This indicator builds an aggregate oscillator in a separate pane. It scales open, high, low, close, and volume into a 0 to 1 range, then averages scaled readings from MACD, a MACD histogram, RSI, stochastic, CCI, momentum, OBV, a directional index, volume-weig

Indicator v4 Oscillators & momentumVolume Repaints
Updated 1 year ago · None stated GitHub repository of Aggregate Signal

ATR Mean Reversion

by hasnocool
106 stars

This strategy identifies mean reversion opportunities using ATR bands on the price chart. It enters long positions when price touches the lower band (open minus ATR) with no open position and within the set time filter. Positions exit on the upper band breach,

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Mean Reversion
99 stars

This indicator computes the Continuous Wavelet Transform magnitude of a chosen source series using a Morlet wavelet at one scale. It applies a Gaussian-windowed sine and cosine kernel over a window of about three scales, then plots the resulting power in a sep

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Continuous Wavelet Transform (CWT)

ATR

by be-thomas
65 stars

This script calculates a 14-period Average True Range (ATR) indicator and displays its current value inside a single-cell table positioned at the top right of the price chart. To ensure accurate historical calculation while optimizing table performance, the AT

Indicator v4 Volatility & bandsScreeners & dashboards
Updated 5 days ago · GPL-3.0 GitHub repository of ATR
47 stars

This indicator plots a Hull Moving Average on the price chart. It computes weighted moving averages of the selected source over half the period and the full period, subtracts the full average from twice the half average, then smooths that difference with a wei

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hull Moving Average (HMA)
46 stars

This indicator tracks regular trading hours for Nasdaq futures on the price chart. It stores the current session open, high, and low and keeps yesterday's RTH high and low. It can draw those levels as lines with labels shifted a chosen number of bars to the ri

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats - RTH Breaks w/stats

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