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

This indicator computes the Z-Score of a user-selected moving average or smoothed price series. It provides numerous smoothing modes such as SMMA, EMA, JMA, ALMA, and others to customize the base calculation. The Z-Score uses a chosen length and generates sign

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of VQZL Z Score + MA Options

RSI with ATR Bands

by nvFede
1 stars

A Pine v4 indicator in a separate pane, titled Parabolic SAR in the code, though the visible logic plots the 14-period RSI together with two bands. The upper band is the highest RSI over 22 bars minus the ATR, and the lower band is the lowest RSI plus the ATR.

Indicator v4 Oscillators & momentumVolatility & bands
Updated 3 years ago · None stated GitHub repository of RSI with ATR Bands

Price Oscillator

by JohnsonHsiao
1 stars

The Price Oscillator calculates the difference between two simple moving averages applied to close prices: a fast SMA using fast_len (default 20) and a slow SMA using fast_len plus slow_len_factor (default 60). It plots this oscillator value as a green line in

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of Price Oscillator
1 stars

A Pine v4 strategy that plots a 36-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 LTCBTC EMA Cross Strategy
948 stars

Dividends per Share (DPS, Yearly) calculates and displays annual dividend payment totals retrieved from FactSet fundamental data feeds. It accumulates historical dividend payouts and estimates on a yearly basis, plotting them as styled columns in a separate in

Indicator v4 Repaints
Updated 11 days ago · GPL-3.0 GitHub repository of Dividends per Share (DPS, Yearly)
330 stars

This strategy generates crossover signals using two exponential moving averages calculated from multi-timeframe Heikin Ashi data. It enters long when the fast EMA crosses above the slow EMA and enters short on a crossunder, reversing the open position. Positio

Strategy v5 Moving averagesTrend Repaints
Updated 2 months ago · None stated GitHub repository of Javo v1 [Repaint] [Alorse]

ALTR Tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest transaction records directly onto the ALTR price chart. It plots green and red labels at precise historical timestamps corresponding to past buy and sell transactions executed by ARK funds, displaying transaction c

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of ALTR Tracker

Function Polynomial Regression

by ricardosantos79
261 stars

This indicator fits a quadratic polynomial regression through recent fractal pivot highs and lows and plots the result as a channel on the price chart. A reusable function returns fitted values plus maximum, minimum, and average absolute deviations from the cu

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function Polynomial Regression
257 stars

Marks intraday swing tops and bottoms on the price chart with labels and short horizontal lines. After a morning session reset in the UTC-8 time zone, it tracks the running high and low, measures how far price has moved away from the extreme, and prints a labe

Indicator v5 Support & resistanceSessions & time
Updated 6 weeks ago · None stated GitHub repository of High Low Live Super

MACD Strategy

by TradersPost
218 stars

This overlay strategy is built around MACD inputs for a fast average, a slow average, and a signal line. Comments say the script keeps MACD values available and can draw a histogram and zero line in a separate pane, with an optional overlay on price. Settings

Strategy v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of MACD Strategy
114 stars

This indicator applies Learning Vector Quantization (LVQ), a supervised neural network competitive learning algorithm, to classify normalized market features. It determines winning prototype vectors using Euclidean distance and continuously updates weights acr

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: LVQ-based Strategy
106 stars

This script executes long and short trades directly on the price chart by combining signals from multiple indicators, including MACD, RSI, Stochastic RSI, Supertrend, and moving average crosses. It aggregates indicator conditions using weighted scores and ente

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Acrypto - Weighted Strategy
99 stars

The Bilateral Filter indicator calculates an edge-preserving smoothed price line based on bilateral filtering principles. It combines spatial domain distances across past bars with range domain price amplitude differences using dual Gaussian weighting function

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bilateral Filter (BILATERAL)

This strategy calculates a 20-period Relative Strength Index and plots the oscillator alongside a centerline at 50 in a separate pane. It enters long positions when the indicator crosses above 50 and enters short positions on downward crosses. The strategy rev

Strategy v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy with selective alert() calls
55 stars

This indicator draws diagonal trendlines from confirmed swing points on the price chart. It detects pivot highs and pivot lows using a fixed 15-bar lookback on each side. When a new pivot confirms, it connects the last two highs with a solid red line and the l

Indicator v5 TrendSupport & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Auto Diagonal Trendlines
47 stars

This indicator calculates John Ehlers' Sine Wave cycle indicator and plots it in a separate pane. It detrends the chosen input price using a two-pole high-pass filter, smooths the result with a two-pole Super-Smoother filter, and resolves the cycle into in-pha

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Ehlers Sine Wave (SINE)

This indicator builds a momentum score from the rate of change of close, using a lookback that expands or contracts with ATR relative to its standard deviation. It divides that rate of change by price standard deviation, scales the result, and weights it by vo

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of Adaptive Volatility-Adjusted Momentum Score

ChannelBreakOutStrategy

by TWODS-CAPITAL
37 stars

This strategy tracks price channels by calculating the highest high and lowest low over a customizable lookback period. It executes stop orders to enter long positions above the upper channel boundary and short positions below the lower channel boundary. Posit

Strategy v5 BreakoutTrend
Updated 3 years ago · MIT GitHub repository of ChannelBreakOutStrategy

Zen-DAX GX

by Zen-Tim
29 stars

This indicator calculates and plots session ranges and key breakout levels for DAX futures directly on the price chart. It defines the overnight Globex session, the Frankfurt pre-market range, and the regular trading hours open using European timezone settings

Indicator v5 Sessions & timeBreakout
Updated 2 weeks ago · MIT GitHub repository of Zen-DAX GX

This strategy trades Donchian channel breakouts with ATR-based risk. It allows long and short entries, sizes the first unit from a risk percent, and adds up to four fractional units as price moves in favor. An initial ATR stop moves to breakeven after a set pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 31: Fractional + BE Lock

Diverlong E002

by ruckard
13 stars

Diverlong E002 is a trading strategy that identifies momentum divergences using state changes in the Squeeze Momentum Indicator. It triggers long and short entries when price action diverges from momentum transition phases. Position exits are determined by Cur

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Diverlong E002

This indicator plots Fibonacci retracement levels anchored to a confirmed structural reference swing and scores them based on historical internal price reactions. Instead of relying purely on geometric levels, it detects ATR-weighted micro-pivots inside the sw

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 days ago · MIT GitHub repository of Fib Reaction Memory [WavesUnchained]
7 stars

This indicator identifies market displacement, structure breaks, and Fair Value Gaps (FVGs) directly on the main price chart. It highlights displacement candles using an average range lookback and multiplier factor, with optional structure break filtering usin

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of [CT] Displacement FVG Toolkit
7 stars

This indicator overlays two Bollinger Band sets from two timeframes on the price chart. It centers RSI on zero and classifies the second timeframe as up, sideways, or down. A buy appears when that trend is down or sideways and the first timeframe percent B is

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 months ago · None stated GitHub repository of RSI + BB Signal Alert
6 stars

The 2AM-Gold Swing Strategy+hist indicator plots Smart Money Concepts (SMC) elements for gold trading overlayed directly on the price chart. Starting at a user-defined session hour (default 2:00 AM UTC+2), it tracks liquidity sweeps, market structure shifts, o

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of 2AM-Gold Swing Strategy+hist
5 stars

This indicator plots volume-weighted deviation bands on the price chart. It computes a volume-weighted mean of the selected source over a lookback length, then a volume-weighted standard deviation or average deviation around that mean. Optional log-space mode

Indicator v4 Volatility & bandsVolume
Updated 8 months ago · None stated GitHub repository of Volume Weighted Deviations

MACD Breakout

by jerryinyang
5 stars

This indicator plots a higher-timeframe MACD breakout setup on the price chart and combines it with linear regression channels. It marks support and resistance zones from MACD histogram sensitivity, then filters them with the MACD zero line, a linear regressio

Indicator v4 Oscillators & momentumBreakout
Updated 2 years ago · None stated GitHub repository of MACD Breakout
5 stars

Fear + Greed Reversal Projection measures market sentiment extremes by comparing price source values against historical highs and lows using standard deviation bands. It calculates fear and greed zones through simple or weighted moving averages. When market co

Indicator v4 Volatility & bandsMean reversion
Updated 3 years ago · Apache-2.0 GitHub repository of Fear + Greed Reversal Projection

Simpleton Stepfun

by eltonaguiar
4 stars

This indicator plots signals on the price chart for crypto trading. It computes RSI-2, MACD crossover, Bollinger Band squeeze, volume spikes, Triple EMA alignment and Ichimoku Cloud to produce confluence signals. Each indicator can be toggled with adjustable w

Indicator v5 Oscillators & momentumVolatility & bands
Updated yesterday · None stated GitHub repository of Simpleton Stepfun
4 stars

This strategy tracks gold price trends using three exponential moving averages with lengths of 8, 21 and 55. It calculates ADX for trend strength filter and ATR for dynamic risk levels. The script enters long positions when the EMAs align bullishly with suffic

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Gold Triple EMA [trugurpala]

MACD + ATR13

by jash-git
3 stars

This indicator plots a standard MACD oscillator alongside an average true range line in a separate pane. It calculates the MACD line, signal line, and histogram using customizable fast, slow, and smoothing periods. It also computes a 13-period ATR plotted with

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 weeks ago · None stated GitHub repository of MACD + ATR13

CSW Indicators

by g-moe
3 stars

CSW Indicators combines eight technical analysis tools into a single overlay plotted directly on the main price chart. It features automated power support and resistance levels derived from pivot points, distance perimeter bands, a linear regression channel, R

Indicator v5 TrendSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of CSW Indicators

Estimations-10min

by IAMATOMIC001
3 stars

This overlay strategy estimates trend with a selectable TEMA, Hull, or ALMA basis and optional higher-timeframe or Heikin Ashi sources. It plots a regression estimator with ATR near and far boundaries, can color bars by trend, and can show order blocks. Entrie

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of Estimations-10min

This indicator estimates realized volatility in a separate pane. It computes log returns from the current price and the previous daily close, then annualizes the standard deviation over short, medium, and long lookbacks. It also plots a quicker estimate that m

Indicator v5 Volatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Volatility Oscillator with Quick Estimate and Forecast

Calculates a Zero Lag Exponential Moving Average (ZLEMA) combined with Average True Range volatility bands to determine market trends. It plots the ZLEMA basis line, volatility bands, trend reversal labels, and entry signals directly on the price chart. Additi

Indicator v5 TrendMoving averages Repaints
Updated 5 weeks ago · None stated GitHub repository of Zero Lag Trend Signals (MTF) [AlgoAlpha]

Mirpapa_Lib_Structs

by alvinng214
2 stars

Mirpapa_Lib_Structs is a Pine Script library designed to assist in detecting Smart Money Concepts (ICT) market structure shifts. It provides exported custom types and helper functions to manage trend state, track swing highs and swing lows, and verify structur

Library v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Mirpapa_Lib_Structs

Alpy Vix

by avatar-lavventura
2 stars

Alpy Vix is a strategy that calculates and plots the Williams Vix Fix indicator adapted for BIST stocks in a separate pane. It generates entry signals when the Vix Fix crosses upper bands or percentile ranges and meets filtered criteria based on price action s

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix
2 stars

This indicator builds a pairwise similarity matrix for a user-supplied list of assets, defaulting to major stock indices. It collects a rolling window of returns or volume-modified returns for each ticker, then applies a selected distance or similarity functio

Indicator v6 Screeners & dashboards
Updated 8 months ago · None stated GitHub repository of Multi Asset Similarity Matrix

Exponential Moving Average (EMA)

by mushroom-men-Trading
2 stars

This indicator plots an exponential moving average of a chosen price source on the price chart. It calculates the average with exponential smoothing and applies a warmup compensator so a value is available from the first bar instead of waiting through a long s

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of Exponential Moving Average (EMA)

[SMT] B&S Renko

by wynnforthework
2 stars

This strategy plots Renko open prices on the price chart based on the ATR length setting. It generates buy signals when Renko open crosses under close and sell signals when open crosses over close. The main setting adjusts ATR length used for Renko brick calcu

Strategy v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of [SMT] B&S Renko

ZenLibrary

by Web3Degenerate
2 stars

ZenLibrary is a custom Pine Script utility library providing standard helper functions for trading scripts. It includes calculations for quote currency decimal precision, market pip sizes, decimal truncation, pip conversions, percentage change over lookback pe

Library v5
Updated 2 years ago · None stated GitHub repository of ZenLibrary
2 stars

Trend Direction Helper calculates overall trend direction by combining customized range filters, Williams %R, and multi-period threshold logic to plot directional buy and sell labels. It also features optional percentage-reversal ZigZag lines, pivot-based supp

Indicator v4 TrendSupport & resistance
Updated 3 years ago · None stated GitHub repository of Trend Direction Helper
1 stars

A strategy that builds on the JAT+BSM family: an AlphaTrend style core with MACD, three consolidation layers with volume profile, candlestick and macro pattern drawings, and a kinematic and Bayesian forecast with a feedback learning rate. Inputs include a stra

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v15 Unified

Session Stats

by jayadevrana
1 stars

Session Stats highlights Asia, London, and New York trading sessions on the chart with distinct background colors while tracking performance metrics. It plots session high and low lines directly on price action and presents a summary table displaying average s

Indicator v6 Sessions & timeScreeners & dashboards
Updated 3 days ago · MPL-2.0 GitHub repository of Session Stats

SMC Session Context

by skipp-dev
1 stars

This indicator displays session context, market structure shifts, and session scoring in a separate pane using imported pre-generated profile data. It plots a context score column chart colored by bullish, neutral, or bearish thresholds, highlights active kill

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 days ago · None stated GitHub repository of SMC Session Context

Highest Lowest Breakout

by pineforge-4pass
1 stars

A channel breakout strategy using the highest high and lowest low over an adjustable lookback. It enters long when the current bar sets a new high and price is above a 50-period EMA, and short when it sets a new low below that EMA. Positions close when price c

Strategy v6 BreakoutSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of Highest Lowest Breakout

P_err_reassign_undeclared

by GammaExpansion
1 stars

The script is an indicator in Pine Script version 6 that plots a constant value of 5. It assigns the value 5 to a local variable x and then plots x. The indicator draws its plot in a separate pane. There are no input settings, no trading signals, no stop loss,

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

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