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

Rising Window - Bullish

by TWODS-CAPITAL
37 stars

This indicator detects a bullish Rising Window, a two-candle pattern in which the current low is above the previous high during an uptrend. It plots an RW label below price, tints the background, and fires an alert when the pattern appears. Trend context can u

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Rising Window - Bullish

Sergio Squeeze C002

by ruckard
13 stars

Sergio Squeeze C002 is a Pine Script v5 strategy template designed to interact with Zignaly for automated trading. It relies on the SqueezeMomentum indicator to generate signals: it opens long positions when the indicator shows positive shine and short positio

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Sergio Squeeze C002

This strategy calculates the WaveTrend oscillator alongside Stochastic RSI to identify reversal setups at overbought and oversold extremes. It enters long positions when the WaveTrend oscillator crosses upward below configured oversold levels, and enters short

Strategy v6 Oscillators & momentumMean reversion Repaints
Updated 2 days ago · MIT GitHub repository of WaveTrend v4 [WavesUnchained] Strategy

Dollar Normalized Volume v2

by eddiebelaval
7 stars

Dollar Normalized Volume v2 calculates dollar volume by multiplying the closing price of each bar by the bar volume. It renders the computed traded value as gray columns in a separate pane, providing a measure of total currency turnover rather than raw unit vo

Indicator v5 Volume
Updated 3 months ago · None stated GitHub repository of Dollar Normalized Volume v2
6 stars

Plots smart money concepts and session visuals directly on the price chart. It highlights trading killzones with session boxes, draws trend lines, and marks upper or lower wick rejections. Additionally, it identifies Order Blocks (OB), Fair Value Gaps (FVG), C

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of NY SMC Suite Multi-Killzone
3 stars

Linear Regression Slope is a momentum and trend strength indicator that calculates the mathematical slope of a linear regression line using weighted and simple moving averages. It plots the resulting slope oscillator alongside a reference zero line in a separa

Indicator v5 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of Linear Regression Slope

This indicator retrieves and displays fundamental financial metrics across up to fourteen selected symbols in a separate pane. It queries financial statements including income statement and balance sheet data such as basic EPS, revenue, EBIT, and debt metrics

Indicator v5 Screeners & dashboards
Updated 8 months ago · None stated GitHub repository of Fundamentals Graphing [Kioseff Trading]
1 stars

This strategy tests whether a second strategy.exit call that reuses the same exit id replaces an existing bracket. At 08:15, when flat, it opens one long unit. While long, it submits a one-percent limit and stop, then immediately submits a tighter 0.3 percent

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 67 - same id exit replace
1 stars

This indicator measures real-time tick height movements on a chosen higher timeframe overlay. It accumulates upward and downward tick price distances using tick step precision, then computes directional probability percentages based on recent historical bars.

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

Smart Breakout Targets

by vedkanani123
1 stars

A squeeze breakout indicator on the price chart. It detects consolidation when Bollinger Band width and ATR are both compressed for a minimum number of bars, draws a range box with a centerline, and signals a breakout when an impulse candle leaves the range. E

Indicator v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of Smart Breakout Targets

KC Combo SR v5.0

by nishpa800
1 stars

Combines bullish and bearish signals in one price chart overlay, built on a Keltner Channel, an ATR supertrend and several volume and displacement detectors. Markers flag candles where those detectors line up with a support or resistance structure. Version 5.0

Indicator v5 Support & resistanceVolume
Updated 2 months ago · None stated GitHub repository of KC Combo SR v5.0

This strategy calculates the Stochastic oscillator (%K and %D) alongside overbought and oversold reference levels to detect divergences against price pivots. Using left and right pivot lookbacks on price and the Stochastic line, it identifies bullish and beari

Strategy v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Stoch Divergence v6
1 stars

Detects pivot points and draws horizontal support and resistance lines on the price chart. The pivot length, the accuracy tolerance and the timeframe used for assessment can each be automatic or manual. Line widths for active and broken lines can be set, broke

Indicator v4 Support & resistance
Updated 6 months ago · None stated GitHub repository of Support and Resistance (k)

Using varip Variables

by ivansoft
1 stars

An educational Pine Script v4 indicator that demonstrates varip variables, which keep their values across live updates of the same bar. Part one raises up and down alerts when the close stays above or below a 10-bar moving average for a set number of seconds,

Indicator v4 Repaints
Updated 1 year ago · None stated GitHub repository of Using varip Variables

GM-tracker

by Allen1212
303 stars

GM-tracker plots ARK Invest purchase and sale activity for General Motors on the price chart. It marks buy and sell events with share volume and the stock's weight in the selected ETF. A setting chooses one ARK ETF or all of them, and same-day activity across

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

Test 025 K-Means

by ricardosantos79
261 stars

This script demonstrates an experimental implementation of the K-means clustering algorithm in Pine Script using array structures and a custom pseudo-random number generator. It partitions a dataset into a specified number of clusters based on Euclidean distan

Indicator v4 AI / machine learning
Updated 4 years ago · None stated GitHub repository of Test 025 K-Means

My Strategy

by hasnocool
106 stars

This overlay strategy combines a Schaff Trend Cycle, an ATR trailing stop, and a fixed 200-period simple moving average. It enters long when the cycle turns upward, the ATR bias is bullish, and price is at or above the average, and short on the opposite alignm

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

This indicator calculates the dominant cycle period of the input source using a Radix-2 Fast Fourier Transform. It builds a windowed array from the source data, performs an in-place iterative FFT, and identifies the peak magnitude within the specified frequenc

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of FFT Dominant Cycle (Radix-2 FFT)

My Script

by be-thomas
65 stars

This script plots candlesticks on the price chart using open, high, low, and close values. It colors the candle body green if close exceeds open and red otherwise, with black wicks and orange borders. The script uses the study function to define it as an indic

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

RSI Strategy

by TWODS-CAPITAL
37 stars

This script implements a classic Relative Strength Index mean-reversion strategy overlaid directly on the price chart. It calculates an RSI value based on close prices over a user-defined length. A long position enters when the RSI crosses above the oversold l

Strategy v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of RSI Strategy

Sergiosqueeze

by ruckard
13 stars

This strategy executes trades based on the Squeeze Momentum indicator and overlays directly on the price chart. It opens long positions when momentum is positive and active, and enters short positions when momentum is negative and active. Trades exit when the

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze

This indicator plots a Williams %R oscillator normalized from the native negative range onto a 0–100 scale in a separate pane. It smooths the core with a selectable average, draws a signal line, and marks midline and overbought or oversold crosses. Optional st

Indicator v6 Oscillators & momentumDivergence
Updated 2 days ago · MIT GitHub repository of Williams %R Advanced [WavesUnchained]

DX with Price-Aligned Color

by eddiebelaval
7 stars

This indicator calculates the Directional Index from plus and minus directional movement and true range, then plots the DX line in a separate pane. Line color is lime when DX is rising and price is up, red when DX is rising while price is down or when DX is fa

Indicator v5 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of DX with Price-Aligned Color
6 stars

This indicator draws six New York killzone boxes on the price chart, covering morning, afternoon, and opening windows plus their extended ranges. It detects order blocks, fair value gaps, and change-in-state-of-delivery marks on a selectable timeframe, and dra

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of NY SMC Suite Multi-Killzone

LinReg Bands

by g-moe
3 stars

LinReg Bands calculates a linear regression channel and multiple deviation bands over a user-defined length directly on the price chart. It determines the linear regression slope using weighted and simple moving averages, then projects three configurable upper

Indicator v5 TrendVolatility & bands Repaints
Updated 5 months ago · None stated GitHub repository of LinReg Bands

Gann Square of 144

by regalouisei
2 stars

This indicator overlays a Gann Square of 144 grid on the price chart for technical analysis. Users define a starting date, manual min and max price levels, and can enable automatic price and bar adjustments. The grid features vertical divisions, optional extra

Indicator v5 Support & resistanceTrend
Updated 8 months ago · None stated GitHub repository of Gann Square of 144
1 stars

This validation strategy evaluates the execution order when strategy entry and exit orders sharing the same identifier are placed during the same bar calculation pass. It submits paired long and short entry and close orders at specific hours and minutes of the

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 68 - Entry Close Same Pass
1 stars

This indicator projects price and time levels using Fibonacci golden ratio scaling from an interactively selected anchor candle. Once a user selects a starting time, the script identifies its mid-price and plots vertical time lines into both the past and futur

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Magical Ruller by BITMOON618
1 stars

A price-chart indicator that tracks market structure at two swing scales, internal and external, with an EMA trend ribbon and optional structure-shift arrows. A dashboard lists modules such as trend strength, swing direction, internal and external structure, p

Indicator v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of Smart Market Structure Matrix Pro

KC Combo SR v5.1

by nishpa800
1 stars

Combines bullish and bearish signals in one price chart overlay, built on a Keltner Channel, an ATR supertrend and several volume and displacement detectors. Markers flag candles where those detectors line up with a support or resistance structure. Version 5.1

Indicator v5 Support & resistanceVolume
Updated 2 months ago · None stated GitHub repository of KC Combo SR v5.1
1 stars

This strategy computes a Stochastic Oscillator K and D lines with customizable length, smooth periods, and overbought/oversold thresholds. It generates long signals on K/D crossover below the oversold level in a bullish regime defined by price above a 200 EMA,

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Stoch v6
1 stars

Calculates a VWAP-based pivot on a higher timeframe, either chosen automatically or set by the user, and extends it with up to fifteen Fibonacci multiples as horizontal levels on the price chart. Settings cover VWAP length, how many past periods to plot, line

Indicator v4 Support & resistance
Updated 6 months ago · None stated GitHub repository of VWAP Expanded Pivots Alt2

GOOG-tracker

by Allen1212
303 stars

GOOG-tracker plots historical purchase and sale transactions of GOOG (Alphabet Inc.) conducted by ARK Invest funds directly on the price chart. The script generates chart labels at specific historical timestamps, indicating buy or sell events along with the co

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

Test 026 Lvl2

by ricardosantos79
261 stars

Test 026 Lvl2 is an experimental overlay indicator designed to plot dynamic structural trend lines. It tracks local extreme high and low price points based on candle relationships and direction shifts, dynamically updating pre-allocated line drawings on the ma

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of Test 026 Lvl2

My strategyP

by hasnocool
106 stars

This strategy draws on the price chart and opens a long when a five-period exponential moving average crosses above a ten-period exponential moving average. It opens a short when a six-period exponential moving average crosses below an eleven-period exponentia

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of My strategyP
99 stars

This indicator calculates the first finite difference, or velocity, of a chosen source series. It subtracts the previous bar's value from the current value and returns zero when the previous value is not available. A single source input selects the series, def

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of First Derivative / Velocity (SLOPE)

My Script

by be-thomas
65 stars

Calculates a simple moving average with a dynamic period based on the location of recent highs and lows. It measures the relative distance of the highest high and lowest low bars within a lookback period, uses that distance to adjust the smoothing length dynam

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

Shooting Star - Bearish

by TWODS-CAPITAL
37 stars

This indicator marks a bearish shooting star on the price chart. It looks for a small real body near the low, an upper shadow at least twice the body, and no meaningful lower shadow, and it only confirms the pattern while price is in an uptrend. The trend filt

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Shooting Star - Bearish

Sergiosqueeze B002

by ruckard
13 stars

Sergiosqueeze B002 is an automated trading strategy based on Squeeze Momentum and moving average closing lines designed to work with Zignaly copy trading webhooks. It executes long or short positions based on momentum direction and exits when momentum weakens.

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze B002

This indicator calculates synthetic fear and complacency gauges based on the Williams VIX Fix formula for both bullish and bearish directions. It overlays standard deviation bands, percentile lookbacks, and context moving averages to identify volatility spikes

Indicator v6 Volatility & bandsOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Williams VIX Fix Advanced [WavesUnchained]

Fisher Transformator Index

by eddiebelaval
7 stars

This indicator plots a modified Fisher Transform oscillator alongside an adjustable trigger line in a separate pane. It calculates normalized median price values, applies smoothing and clipping, and transforms the result into Gaussian probability distribution

Indicator v5 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of Fisher Transformator Index

LinReg MTF

by g-moe
3 stars

LinReg MTF plots up to three linear regression channels on the price chart, each from its own timeframe. For every enabled timeframe it draws an upper band, lower band, and midline from a chosen price source, regression length, and deviation. Users can show or

Indicator v5 Trend
Updated 5 months ago · None stated GitHub repository of LinReg MTF

Gaps Profile [vnhilton]

by regalouisei
2 stars

Gaps Profile draws boxes on the price chart for price gaps that meet a minimum absolute percentage size. It can place the profile to the left or the right of price and highlight the largest or newest up or down gap, or highlight none. Color themes include a si

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Gaps Profile [vnhilton]
1 stars

This Pine Script strategy probe tests the order of execution between entry orders and cancel commands within the same script evaluation pass. It places stop orders for long and short positions at specific times of the day, alternating between placing an entry

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 69 - entry cancel same pass

This overlay indicator builds exponential harmonic price levels from a resonance factor that combines the golden ratio, pi and a fractal multiplier. On confirmed bars it maps the close to the nearest level, records upward and downward transitions in a Markov c

Indicator v5 Support & resistanceAI / machine learning

SmartTrend Pro

by vedkanani123
1 stars

A trend indicator on the price chart with an adaptive volatility trend engine controlled by a sensitivity and an ATR period. Signals get a score from 0 to 100, with a minimum score and a strong-only option, and pullback signals can be added. A trend cloud, an

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of SmartTrend Pro

KC Combo SR v5.2

by nishpa800
1 stars

Combines bullish and bearish signals in one price chart overlay, built on a Keltner Channel, an ATR supertrend and several volume and displacement detectors. Markers flag candles where those detectors line up with a support or resistance structure. Version 5.2

Indicator v5 Support & resistanceVolume
Updated 2 months ago · None stated GitHub repository of KC Combo SR v5.2

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