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

STDDEV & ATR Gap

by JohnsonHsiao
1 stars

This indicator calculates the difference between the standard deviation and average true range of the closing price over a specified period. It plots this gap as a histogram in a separate pane, using different colors to indicate volatile or ranging conditions.

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of STDDEV & ATR Gap

The Farey Sequence Weighted Moving Average calculates a smoothed trend line by weighting historical price values according to terms from a Farey sequence of a selected mathematical order. The line plots directly on the price chart and updates dynamically based

Indicator v4 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Farey Sequence Weighted Moving Average
330 stars

This separate-pane indicator plots a MACD line, a signal line, and a histogram whose colors show whether the histogram is rising or falling above or below zero. The oscillator and signal can each use an SMA or an EMA, and an optional marker highlights MACD and

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MTF + MACD [Alorse]

AMZN-tracker

by Allen1212
303 stars

AMZN Tracker visualizes historical buy and sell transactions made by ARK Invest funds on Amazon stock (AMZN) directly on the price chart. The indicator plots green labels below price bars for buy trades and red labels above for sell trades, displaying the coun

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

FunctionDatestring

by ricardosantos79
261 stars

This Pine Script v5 library turns a Unix timestamp into zero-padded text for date, time, or both. It exports datetime, date_, and time_, each defaulting to the current time, and prefixes single-digit months, days, hours, minutes, and seconds with a leading zer

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

Snag - Auto Trade Futures is an overlay indicator designed for trend tracking using weighted moving averages (WMAs). It plots 13-period, 48-period, and 200-period WMAs directly on the price chart and identifies momentum shifts when these averages cross. When f

Indicator v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - Auto Trade Futures
218 stars

The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or

Strategy v6 Mean reversionMoving averages
Updated 3 months ago · None stated GitHub repository of Mean Reversion Strategy Template
114 stars

Calculates normalized price vector changes across custom higher timeframes using a minimax scaling algorithm and configurable activation functions like Swish or LReLU. It can optionally incorporate volume data through cumulative volume shifts. The strategy plo

Strategy v4 Oscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Scaled Normalized Vector Strategy

This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced VWAP-Momentum Pullback Trend Qualifier
99 stars

This overlay indicator calculates Bollinger Bands from a rolling mean and standard deviation and Keltner Channels from a simple moving average plus ATR-smoothed true range. A dedicated function returns whether a squeeze is on, the bandwidth, and the band and c

Indicator v6 Volatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bollinger Band Squeeze (BBS)
65 stars

This indicator defines a function that tracks bar updates by incrementing a counter exclusively on new bars detected via barstate.isnew in Pine Script v5. It plots the resulting update number in a separate pane as a visual reference for bar state concepts. The

Indicator v5 Sessions & time Repaints
Updated 5 days ago · GPL-3.0 GitHub repository of V5 Concepts Bar States 03
55 stars

This indicator plots support and resistance from confirmed pivot highs and lows on the price chart. It uses a fixed lookback of 20 bars on each side. A pivot high draws a solid red horizontal line that extends to the right, and a pivot low draws a dashed green

Indicator v5 Support & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Dynamic Pivot S/R Lines
47 stars

Exponential Transformation (EXP) applies a natural exponential function to a selected price or indicator series. Calculated using Pine Script's built-in exponential math function, it transforms the input source into an exponentially scaled series plotted in a

Indicator v6
Updated 8 months ago · MIT GitHub repository of Exponential Transformation (EXP)

Daily Segment Probabilities

by TamaraKGreen
46 stars

Daily Segment Probabilities is an overlay indicator that lays out twelve percentage bands around the previous day's high and low, from 100 percent below that range to 200 percent above it, in 25 percent steps. It draws previous-day high and low lines and segme

Indicator v5 Support & resistanceScreeners & dashboards
Updated 7 weeks ago · None stated GitHub repository of Daily Segment Probabilities

Connors RSI

by TWODS-CAPITAL
37 stars

Calculates the Connors RSI composite momentum oscillator, combining a short-term Relative Strength Index, an Up/Down streak length RSI, and a Percent Rank of the one-period Rate of Change. The three components are averaged together to output a single value bou

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Connors RSI
16 stars

This price-chart strategy enters long when close breaks the prior Donchian high and short when it breaks the prior low, after a volume check and an optional moving-average regime filter. The first unit risks a percent of price against an ATR stop. Later units

Strategy v6 TrendBreakout Repaints
Updated 12 months ago · None stated GitHub repository of Seykota Alt 35: Fract + Time

FairValueGap A008

by ruckard
13 stars

FairValueGap A008 is an automated strategy template designed for integration with the Zignaly trading platform. It uses customizable moving average filters (Curie closing lines) to generate buy and sell signals directly on the main price chart. The strategy fe

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of FairValueGap A008

This daily-timeframe indicator provides futures market context by evaluating open interest and term structure without altering chart price scales. It requests front-month and next-month futures contracts to measure spread relationships like contango or backwar

Indicator v6 VolumeScreeners & dashboards
Updated 2 days ago · MIT GitHub repository of Futures Context Module [WavesUnchained]

RSI Signal Alert

by suyons
7 stars

This indicator calculates Relative Strength Index values across multiple selectable timeframes to generate trade signals overlaid directly on the price chart. It checks for RSI threshold crossings on a lower timeframe while confirming trend conditions on a hig

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of RSI Signal Alert
6 stars

This indicator maps session-based Candle Range Theory (CRT) cycles by identifying range formation, manipulation, and distribution phases directly on the price chart. It projects range boxes, supply and demand zones, midpoints, and manipulation trendlines accor

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Pro

MACD x RSI Study

by jerryinyang
5 stars

This indicator calculates a multi-timeframe MACD, higher-timeframe RSI, and WaveTrend oscillator to generate trading signals. It triggers long entry shapes when higher-timeframe MACD momentum aligns with oversold RSI readings, and short entry shapes during ove

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD x RSI Study
5 stars

A short-only trading strategy combining three technical indicators: Kijun-Sen, SSL Channel, and Waddah Attar Explosion (WAE). It opens short positions when price is below the Kijun-Sen baseline, the SSL Channel crosses down, and WAE signals downside momentum e

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Kijun-Sen + SSL + WAE Short Strategy

Triple_EMA_STEPFUN

by eltonaguiar
4 stars

This trend-following strategy generates long and short entries based on the alignment of three exponential moving averages and price position relative to the fastest EMA. An optional RSI momentum filter can confirm directional bias. By default, exits occur on

Strategy v5 TrendMoving averages
Updated yesterday · None stated GitHub repository of Triple_EMA_STEPFUN

MTF EMA [trugurpala]

by trugurpala
4 stars

This indicator plots exponential moving averages of close from the daily, weekly, and monthly timeframes on the price chart. Each series uses the same user-set length and is requested with a one-bar historical offset. Toggles show or hide the daily, weekly, an

Indicator v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MTF EMA [trugurpala]

CSW Pro Panel

by g-moe
3 stars

CSW Pro Panel is a lower-pane momentum and trend-confirmation indicator. It builds a momentum oscillator from smoothed Heikin Ashi open, high, low, and close values and colors gradient columns by the open-close range relative to the high-low range. Optional pl

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 5 months ago · None stated GitHub repository of CSW Pro Panel

OT Algo Toolkit

by IAMATOMIC001
3 stars

OT Algo Toolkit is a Smart Money Concepts market structure indicator that plots swing and internal structure transitions, including Break of Structure (BOS) and Change of Character (CHoCH) labels directly on the price chart. It highlights equal highs and lows,

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of OT Algo Toolkit

Ichimoku Raiden

by TamTH-Dev
2 stars

This indicator plots dual Ichimoku Kumo clouds, designated as Lightning and Thunder, directly on the price chart. It calculates Donchian midpoints across two distinct parameter sets to generate fast and slow Senkou Span A and B boundary lines. The script fills

Indicator v5 TrendSupport & resistance
Updated 5 weeks ago · None stated GitHub repository of Ichimoku Raiden

This chart overlay indicator identifies and plots Smart Money Concepts (SMC) elements based on the ICT 2022 trading model. It detects Fair Value Gaps (FVG), Market Structure Shifts (MSS), and key swing high and low levels using specialized external libraries.

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of 2022 Model ICT Entry Strategy TradingFinder

Alpy Vix

by avatar-lavventura
2 stars

This strategy combines the WaveTrend oscillator, a multi-timeframe MACD, and the Williams Vix Fix indicator to identify momentum reversals and volatility spikes in a separate chart pane. Order entry conditions trigger based on WaveTrend oversold thresholds and

Strategy v4 Oscillators & momentumVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

Prime Numbers

by regalouisei
2 stars

Prime Numbers is a mathematical indicator that performs prime number calculations directly on the chart. It provides modes for prime factorization, listing prime numbers, and finding specific prime numbers using either the security's close price or custom inte

Indicator v6 Repaints
Updated 8 months ago · None stated GitHub repository of Prime Numbers

High-Low Volatility (HLV)

by mushroom-men-Trading
2 stars

This indicator calculates High-Low Volatility using the Parkinson estimator based on high and low prices. It smooths the raw estimator with a running moving average and optionally annualizes the result using a specified number of periods per year. The resultin

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of High-Low Volatility (HLV)

Custom Strategy with DSMA

by wynnforthework
2 stars

This strategy calculates short and long-period Deviation Scaled Moving Averages (DSMA) powered by a SuperSmoother filter to adapt to price volatility. It combines breakout bands, RSI momentum levels, and long-term EMA trend filters to signal entries. Position

Strategy v5 Moving averagesBreakout
Updated 1 year ago · None stated GitHub repository of Custom Strategy with DSMA

Basic Engulfing Candles

by Web3Degenerate
2 stars

This indicator identifies standard bullish and bearish engulfing candlestick patterns and plots visual signals directly on the price chart. A bullish engulfing pattern occurs when a bearish bar is followed by a bar that opens below or equal to the prior close

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Basic Engulfing Candles

Simple Trend Painter

by jayadevrana
1 stars

Simple Trend Painter is an overlay indicator that colors chart candles based on their position relative to a simple moving average. Candles are painted green when closing above the moving average and red when closing below it. The script plots the SMA line on

Indicator v6 TrendMoving averages
Updated 3 days ago · MPL-2.0 GitHub repository of Simple Trend Painter

SMC Utils

by skipp-dev
1 stars

SMC Utils is a Pine Script library providing helper functions for Smart Money Concepts indicators and strategies. It features functions for value range checks, range overlap determination, lower-timeframe selection, formatting price levels and trend states, dy

Library v6
Updated 3 days ago · None stated GitHub repository of SMC Utils

Leverage Margin Call Perp 5x

by pineforge-4pass
1 stars

This strategy is a validation probe that opens one oversized long on the first flat bar at or after bar index 50 and never issues a close or exit. It sets required margin to 20 percent, which corresponds to 5x leverage, and sizes quantity from a five-million n

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of Leverage Margin Call Perp 5x

P_err_strategy_risk

by GammaExpansion
1 stars

This minimal strategy demonstrates Pine Script risk management functions by enforcing a maximum drawdown limit of ten percent of equity. The script enters a long position whenever a candle closes higher than its opening price. It plots the current position siz

Strategy v6 Candlestick patterns
Updated 6 days ago · MIT GitHub repository of P_err_strategy_risk
1 stars

A strategy for MNQ futures built on the 09:30 to 10:00 New York opening range. It looks for one qualified 15-minute breakout candle, checks body size, close location, wick and ATR limits, then waits for a one or two bar pullback on the 5-minute chart. Entry fo

Strategy v6 BreakoutSessions & time Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of MNQ One-and-Done Confirmed Expansion

DEPV2 Debug S14

by YuceSezar89
1 stars

DEPV2 Debug S14 is a multi-symbol quantitative signal generator that evaluates up to 20 cryptocurrency tickers using four analytical dimensions: trend, momentum, volatility, and volume. Traders can select different signal generation modes, including single met

Indicator v6 TrendOscillators & momentum Repaints
Updated 12 days ago · None stated GitHub repository of DEPV2 Debug S14
1 stars

A strategy in a separate pane built on the WaveTrend oscillator. It enters long when the fast line crosses above the slow line while below the second oversold level, and short on a downward cross while above the second overbought level. Positions close on the

Strategy v5 Oscillators & momentumMean reversion
Updated 2 weeks ago · None stated GitHub repository of WaveTrend Cross Strategy
1 stars

Plots seven mirrored price lines on the price chart. Each is twice a moving average minus the close, using Fibonacci lengths from 8 to 144 and a selectable EMA, SMA or WMA type, with coloured fills between neighbouring lines that can be switched off. It also m

Indicator v6 Moving averagesVolume
Updated 7 weeks ago · None stated GitHub repository of Symmetric Fib Volume Dashboard

Volume MAs Cloud Trend

by vedkanani123
1 stars

An overlay indicator that draws a cloud around a selectable volume-based moving average, with positive and negative band multipliers setting the upper and lower edges. The signal type setting chooses how the trend is read, with the cloud as the default, and th

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Volume MAs Cloud Trend

Anish TB Foster Fix

by nishpa800
1 stars

Overlay indicator for stock-style charts that flags pocket pivot candles: a large percentage body whose volume beats the highest opposite-colour volume over a lookback. It also tests trend stages using 50, 150 and 200 period EMAs plus distance from the 52-week

Indicator v5 TrendVolume
Updated 2 months ago · None stated GitHub repository of Anish TB Foster Fix

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