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

SMC Killzone Engine

by alboogycOdR
6 stars

This overlay indicator tracks smart-money points of interest during optional London, New York, and Asian killzones. It can detect fair value gaps, order blocks, breakers, and mitigation blocks using separate entry, point-of-interest, and structure timeframes.

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

Calculates and plots a multi-band envelope on the price chart based on mean reversion principles and Keltner Channel concepts. Instead of standard moving averages, it uses advanced filters such as Ehlers SuperSmoother, Butterworth, Gaussian, or traditional ave

Indicator v5 Mean reversionVolatility & bands
Updated 5 months ago · None stated GitHub repository of Mean Reversion Channel - MRI Variant

The Linear Regression Oscillator [ChartPrime] calculates a slope and intercept using linear regression over a specified lookback period, normalizing the values with a 100-period z-score calculation. It plots the normalized oscillator in a separate pane with dy

Indicator v5 TrendOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Linear Regression Oscillator [ChartPrime]
1 stars

This strategy is a validation probe that places one long at 08:00 and one short at 20:00 when flat, using a fixed quantity of one. Each entry is paired with a stop 10 price units away, a limit 20 units away, and a trailing stop of 8 points. Orders process on b

Strategy v6 ScalpingSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 90 - narrow stop/limit + trail8
1 stars

This indicator detects pivot highs and lows on the price chart using configurable left and right bars. It extends lines from recent pivots in green for lows and red for highs with Fibonacci 1.618 ratio projection. It calculates crossing points of the extended

Indicator v5 Support & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Painting Of Price by BITMOON618

Extrapolated Previous Trend

by vedkanani123
1 stars

An overlay indicator that fits a linear regression to closing prices of the previous period on a chosen timeframe, such as the prior day, and extends that line into the current period. The line is teal when the slope was up and red when it was down, candles ar

Indicator v5 TrendSupport & resistance
Updated 2 months ago · None stated GitHub repository of Extrapolated Previous Trend

Squarify HTF v1

by nishpa800
1 stars

Overlays up to 46 buy and sell marker signals on the price chart, built from standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Inputs set three displacement multipliers, a first-bar-only switch and per-sign

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

TnS_ICT_V6

by raybird
1 stars

TnS_ICT_V6 is a Pine Script v6 strategy that identifies liquidity sweeps and displacement moves exceeding a multiple of ATR. It detects Fair Value Gaps and Optimal Trade Entries in the 62 to 79 percent retracement zone of the displacement leg to generate buy a

Strategy v6 SMC / ICT / price actionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnS_ICT_V6

INCY Tracker

by Allen1212
303 stars

INCY Tracker visualizes historical buy and sell transactions executed by ARK Invest funds for INCY stock directly on the price chart. The script generates green buy labels below price bars and red sell labels above bars at specific historical timestamps corres

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

4 MA Strat

by hasnocool
106 stars

Calculates four selectable moving averages (SMA, EMA, WMA, RMA, HMA, or ALMA) with custom periods to generate crossover trading signals directly on the price chart. Signals are triggered when a selected moving average crosses another, with an optional fourth m

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 4 MA Strat
99 stars

The Intraday Momentum Index calculates an oscillator bounded between 0 and 100 based on intraday price movement. It measures gains when the close is higher than the open and losses when the close is lower than the open over a set lookback period. Computed usin

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Intraday Momentum Index (IMI)

My Script

by be-thomas
65 stars

This minimal demonstration script is an example from TradingView documentation illustrating basic drawing functionality in Pine Script v4. It creates a new drawing label on the price chart at each bar's high price using the bar index as the horizontal coordina

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

Tweezer Top - Bearish

by TWODS-CAPITAL
37 stars

This overlay indicator marks a two-candle Tweezer Top bearish reversal on the price chart. It looks for a prior long bullish candle in an uptrend followed by a bearish candle whose high is nearly the same as the previous high, using an EMA of candle body size

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Tweezer Top - Bearish

Trailering O002

by ruckard
13 stars

This long-only strategy plots on the price chart and sizes entries according to how many trigger conditions are met. It manages exits by tightening the stop and extending the take profit from the price's maximum excursion, with optional take profit and risk-re

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering O002

This strategy calculates a 10-period and a 20-period simple moving average directly on the price chart. It triggers long entries on SMA bullish crossovers and short entries on SMA bearish crossunders, formatting alert payloads into JSON string templates for we

Strategy v5 Moving averagesTrend Repaints
Updated 5 months ago · None stated GitHub repository of Messing with Alerts & Calc Every Tick

The LOWESS indicator applies locally weighted scatterplot smoothing to price data to reduce noise and highlight trends. It calculates a smoothed line based on user-defined length. Additionally, it identifies pivot highs and lows using specified bar counts and

Indicator v5 Moving averages
Updated 8 months ago · None stated GitHub repository of LOWESS (Locally Weighted Scatterplot Smoothing)
1 stars

This strategy is a validation probe that opens one long at 08:00 and one short at 20:00 when the position is flat. Each entry sets an ATR-based stop, a limit at twice that stop distance, and a trailing stop whose trail points equal the current ATR. ATR length

Strategy v6 Volatility & bandsSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 91 - atr trail fixed entry
1 stars

The Parallel Lines Live indicator draws geometric Fibonacci-based horizontal lines on the price chart. It computes a fractal phi ratio using the user-set Fibonacci expansion multiplier and tracks historical price touches along with bullish and bearish outcomes

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Parallel Lines Live by BITMOON618

Grok Apex Flip Engine v1

by vedkanani123
1 stars

An always-in flip indicator on the price chart, written in Pine version 5, where BUY exits a short and enters long and SELL does the reverse. It uses a wide Supertrend-style ATR trail with a cap on how far the trail can move per bar, plus an optional volume-we

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Grok Apex Flip Engine v1

Squarify v2 BT

by nishpa800
1 stars

A strategy backtest version of a 46-signal study that combines standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Each enabled signal can trigger a buy or sell on the price chart. Inputs set three displaceme

Strategy v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Squarify v2 BT

TnS_IctCombo_V6

by raybird
1 stars

This Pine Script strategy identifies high-confluence trading opportunities using ICT and SMC logic. It calculates a confluence score from HTF bias via EMA, FVG detection with lookback, liquidity sweep confirmation, market structure shift breaks, premium discou

Strategy v6 SMC / ICT / price actionTrend Repaints
Updated 2 months ago · None stated GitHub repository of TnS_IctCombo_V6

INMD Tracker

by Allen1212
303 stars

INMD Tracker overlays historical ARK Invest buy and sell trade transactions directly onto the price chart using labeled markers. It places visual labels above or below price bars at specific historical timestamps to indicate institutional transaction activity

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

4x EMA + Volume

by hasnocool
106 stars

This strategy plots four exponential moving averages on the price chart and filters trades with a smoothed Ease of Movement oscillator. In the default mode it opens a long when price and the four averages are stacked upward and Ease of Movement is positive, th

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 4x EMA + Volume

This indicator reconstructs a low-pass filtered series from the selected source using a discrete Fourier transform. It applies a Hann window over a fixed window of 32, 64, or 128 bars, keeps only the chosen number of lowest-frequency harmonics, and adds their

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Inverse Fast Fourier Transform (IFFT)

My Script

by be-thomas
65 stars

This indicator draws a text label directly on the main price chart above each bar at the bar high. It calculates and displays the current bar index coordinates alongside the exact high price level on separate text lines without background styling. There are no

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

Ultimate Oscillator

by TWODS-CAPITAL
37 stars

The Ultimate Oscillator combines short-term, medium-term, and long-term price momentum into a single bounded oscillator. It calculates buying pressure and true range across three configurable period lengths, defaulting to 7, 14, and 28 bars. By applying higher

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Ultimate Oscillator

Trailering P010

by ruckard
13 stars

A trading strategy that combines k-nearest neighbors (KNN) classification logic with custom position management and automated Zignaly signal execution. It evaluates historical price excursions and KNN patterns to identify entry opportunities and set dynamic ex

Strategy v5 AI / machine learning
Updated 1 year ago · None stated GitHub repository of Trailering P010
6 stars

This multi-timeframe indicator combines Smart Money Concepts (SMC) with customizable session killzones for London and New York trading. It identifies market structure points such as Break of Structure (BOS) and Change of Character (CHoCH), alongside Points of

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of SMC Killzone State Engine Enhanced

MFI Divergences

by g-moe
3 stars

This indicator plots price data and is designed to detect divergences between price action and the Money Flow Index (MFI). It uses pivot highs and lows to identify potential regular and hidden bullish or bearish divergence signals. By evaluating momentum shift

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences

This indicator calculates a volatility-adaptive SuperTrend by applying k-means clustering to ATR values over a user-defined training period. It segments historical volatility into high, medium, and low clusters to dynamically adjust the SuperTrend bands to shi

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Machine Learning Adaptive SuperTrend [AlgoAlpha]
1 stars

This validation strategy tests position reversal mechanics via stop orders without explicit closing calls. It executes a long market entry at 00:15 when flat, then submits a short stop entry just below the bar low at 00:45 to trigger an automated position flip

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 92 - flip stop no paired close
1 stars

This indicator plots dynamic parallel lines based on logarithmic fractal price grid levels adjusted by a phi ratio multiplier. It scores price levels using a weighted quantitative model incorporating estimated order flow delta, kinetic volatility energy, liqui

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 weeks ago · None stated GitHub repository of Parallel Lines Live V2
1 stars

An overlay indicator that detects pivot highs and lows and marks bullish and bearish market structure breaks with dotted or dashed lines. After a break it trails a stop level that follows price, with an increment factor controlling how fast it tightens. The st

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure Trailing Stop

TNT Opening Drive OD

by nishpa800
1 stars

Detects opening drive moves on the price chart by combining displacement, swing structure and return-to-level checks into named bull and bear signals. Inputs set sensitivity, swing length, the displacement deviation length and multiplier, and return percentage

Indicator v5 Sessions & timeVolatility & bands
Updated 2 months ago · None stated GitHub repository of TNT Opening Drive OD

TnS_StochDiv_V6

by raybird
1 stars

This Pine Script strategy detects causal reversals using a smoothed stochastic oscillator to track momentum. It identifies harmonic divergences in price versus the oscillator and applies a Kronos resonance proxy based on phase coherence. ATR dynamically sets s

Strategy v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of TnS_StochDiv_V6

INO-tracker

by Allen1212
303 stars

This indicator marks historical ARK Invest purchases and sales of Innoviva on the price chart. It draws hardcoded labels at fixed dates: red Sell labels above bars and green Buy labels below bars, each marked X1. An ETF setting exists but only offers ALL, so i

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

5-10-20 Cross

by hasnocool
106 stars

This strategy combines three exponential moving averages with a Supertrend indicator to generate trend-following trade entries directly on the price chart. A long position is entered when the fastest EMA is above the medium EMA, the medium EMA is above the slo

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5-10-20 Cross

Jarque-Bera Test (JB)

by mihakralj
99 stars

Jarque-Bera Test evaluates whether price data follows a normal distribution. It constructs a rolling array of recent bars to compute sample mean, variance, skewness, and excess kurtosis through central statistical moments. The calculated statistic quantifies d

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Jarque-Bera Test (JB)

My Script

by be-thomas
65 stars

This minimal Pine Script code example demonstrates how loop iterations and conditional branches evaluate historical series functions. It iterates through a short loop based on the current bar index, conditionally retrieving the lowest value of the bar index ov

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

Up/Down Volume

by TWODS-CAPITAL
37 stars

This indicator calculates and visualizes buying versus selling volume by aggregating lower timeframe data onto the current chart. It uses intrabar price movement to classify volume as positive or negative, plotting positive volume as green columns and negative

Indicator v5 Volume
Updated 3 years ago · MIT GitHub repository of Up/Down Volume

Trailering Q004

by ruckard
13 stars

Trailering Q004 is an execution strategy that generates automated trading signals integrated with Zignaly webhooks. It uses historical statistical advice and price excursion limits to enter long or short positions based on sub-strategy trigger conditions. The

Strategy v5 TrendMean reversion
Updated 1 year ago · None stated GitHub repository of Trailering Q004

SMC Luxmod Nuburo0

by alboogycOdR
6 stars

This indicator maps Smart Money Concepts (SMC) directly onto the price chart. It detects both internal and swing market structure breakouts, labeling Changes of Character (CHoCH) and Breaks of Structure (BOS). It also highlights bullish and bearish internal an

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of SMC Luxmod Nuburo0
3 stars

This indicator plots the Money Flow Index in a separate pane and marks bullish and bearish divergence from pivot highs and lows. It stores recent pivot prices, MFI values, and bar indexes, then checks regular or hidden divergence across a chosen number of dots

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences Lower
2 stars

This indicator calculates a custom RSI oscillator enhanced with machine learning using the K-nearest neighbors algorithm. It combines the standard RSI with KNN predictions for improved signal generation. The script applies smoothing using ALMA and Kalman filte

Indicator v5 AI / machine learningOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Machine Learning RSI BullVision

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