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

8 Whittle Down

by hasnocool
106 stars

This strategy executes short positions during the end-of-day session (14:29–15:00) when the price is below the 200-day simple moving average. If price moves higher against the initial short trade, it scales into the position by submitting a second short order

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 8 Whittle Down
99 stars

The Kairi Relative Index (KRI) indicator computes the percentage deviation of a source price from its simple moving average. It plots the resulting KRI value as a yellow line in a separate pane along with a dotted gray zero line. Users can select any source se

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Kairi Relative Index (KRI)

New 30 Min Bar

by be-thomas
65 stars

This indicator detects the start of a new 30-minute bar. It defines a helper that reads the time of a given resolution and returns true when that time is valid and differs from the previous bar. The script calls the helper with a 30-minute resolution and plots

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of New 30 Min Bar
37 stars

This indicator plots a volume-weighted average price on the price chart. It accumulates the selected source, defaulting to the average of high, low, and close, against volume and resets when the chosen anchor begins. Anchors include session, week, month, quart

Indicator v5 VolumeVolatility & bands Repaints
Updated 3 years ago · MIT GitHub repository of Volume Weighted Average Price

Trailering V005

by ruckard
13 stars

Trailering V005 is an automated trading strategy template designed for integration with the Zignaly platform. It calculates position sizing and entry conditions based on price excursion and historical statistical metrics, adjusting exposure depending on trigge

Strategy v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Trailering V005
6 stars

SMC Scalping State Engine v2.2.1 is a Pine Script v5 strategy that plots Smart Money Concepts elements on the XAUUSD price chart. It uses a state transition system to detect market structure breaks, order blocks, fair value gaps, key levels and EMA alignments

Strategy v5 SMC / ICT / price actionTrend
Updated 7 months ago · None stated GitHub repository of SMC Scalping State Engine v2.2.1

MicroQuant Trend

by g-moe
3 stars

MicroQuant Trend is a Supertrend-based indicator that calculates dynamic bands using EMA of high and low prices adjusted by ATR. It plots green circles for uptrend direction and red for downtrend. Background colors change to green or red when the trend flips.

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of MicroQuant Trend
2 stars

Market Sessions by Leviathan highlights key global trading sessions including Tokyo, London, New York, and Sydney directly on the main price chart. It renders customizable colored boxes for each session based on UTC times. Additional visual features include se

Indicator v5 Sessions & time
Updated 8 months ago · None stated GitHub repository of Market Sessions - By Leviathan
1 stars

The strategy detects range expansion by comparing the previous bar's range to its ATR multiple. It places pending stop entries above highs of up bars or below lows of down bars. On trigger it enters positions with take profit and stop loss in ticks using OCA g

Strategy v6 Volatility & bandsSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 97 - tp/sl gap reversal oca
1 stars

The indicator combines pivot high and low points with multi-period slope and momentum analysis to identify market trends and range conditions. It calculates short- and medium-term price slopes, EMA slopes, and price acceleration against a statistical Z-Score t

Indicator v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of POT {Morindok} by @BITMOON618

TnSovereign NeuraRL

by raybird
1 stars

An experimental strategy that applies a small reinforcement learning agent, a dueling deep Q-network built with the NeuraLib library, to chart data. An eight-value state vector from price z-score, RSI, ATR ratio, EMA slope, volume, MACD and candle features fee

Strategy v6 AI / machine learning
Updated 2 months ago · None stated GitHub repository of TnSovereign NeuraRL

JOBY-tracker

by Allen1212
303 stars

This indicator visualizes recorded ARK Invest purchases and sales of JOBY on the price chart. It places fixed green buy labels below bars and red sell labels above bars at hardcoded dates, with text that counts how many selected ETFs traded that day. The ETF i

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

888 BOT Backtest

by hasnocool
106 stars

888 BOT Backtest is a multi-indicator trading strategy that evaluates market conditions by combining a Jurik Moving Average, Range Filter, Average Directional Index (ADX), Parabolic SAR, volume-weighted RSI, MACD, and volume thresholds. Each individual filter

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 888 BOT Backtest

Kalman Filter (KALMAN)

by mihakralj
99 stars

This indicator applies a one-dimensional Kalman filter to a chosen price source and plots the filtered series on the price chart. Process noise and measurement noise set how quickly the estimate follows new data versus how much it trusts the measurement. The f

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Kalman Filter (KALMAN)
65 stars

This script is an educational demonstration from the TradingView documentation illustrating order execution mechanics on the next bar open. During the first 100 bars of a chart, it places alternating market orders: entering a long position whenever flat, and r

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Next Bar Open Execution Demo
37 stars

This indicator plots a volume-weighted moving average of a chosen price source on the price chart. It uses TradingView's built-in volume-weighted moving average, so bars with higher volume pull the average more than quieter bars. Length sets the lookback, Sour

Indicator v5 Moving averagesVolume
Updated 3 years ago · MIT GitHub repository of Volume Weighted Moving Average

Trailucering A002

by ruckard
13 stars

Trailucering A002 is a Pine Script strategy template designed for automated crypto trading via Zignaly webhook alerts. It identifies market breakout opportunities and executes trades directly on the main price chart. Position exits are managed using customizab

Strategy v5 Breakout
Updated 1 year ago · None stated GitHub repository of Trailucering A002
6 stars

Time-Filtered MTF CRT Detector identifies multi-timeframe Candle Range Theory (CRT) patterns based on specific time-filtered H4 candles such as 1AM, 5AM, or 9AM models. It plots horizontal high and low range lines directly on the main price chart, complete wit

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Time-Filtered MTF CRT Detector
3 stars

MicroQuant Trend Strat is a trend-following strategy overlaid on the price chart that utilizes a modified Supertrend calculation built with EMA bands and Average True Range volatility bounds. It opens long positions when the trend direction turns bullish and s

Strategy v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of MicroQuant Trend Strat

This indicator overlays volume profiles and session ranges directly onto the price chart for specified periods, including Tokyo, London, New York, Daily, Weekly, Monthly, Quarterly, and Yearly sessions. It calculates and plots Point of Control (POC), Value Are

Indicator v5 VolumeSessions & time
Updated 8 months ago · None stated GitHub repository of Market Sessions and Volume Profile - By Leviathan
1 stars

This strategy identifies trend changes using a dual moving average crossover. It computes fast and slow simple moving averages of the close price and generates long entry signals on fast SMA crossover above slow and short signals on crossover below. Upon entry

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 97a - tp/sl bracket isolate

PPUO Forecast Signals

by morindok
1 stars

The PPUO Forecast Signals indicator derives a Parallel Universe Oscillator from detrended price series using slow and fast moving averages of varying lengths. It extracts smoothed angles from the detrended values, weights and aggregates them into a universe me

Indicator v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of PPUO Forecast Signals
1 stars

An overlay indicator that tries to show only larger reversals through a very wide ATR trail. A main buy or sell requires a trail break with confirmation closes, a swing high or low break, minimum travel from the last flip, and a minimum pullback from the leg p

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Nexus Prime Engine v6 Major Only

Ultra Combo v57

by nishpa800
1 stars

Overlay indicator that marks combination signals on the price chart. Groups include PBJ or PB with F2, E3 and cluster patterns, sequential combos, back-to-back day combos, Heavy Weapon with any bullish or bearish signal, GZ1 and high-volume mega combos, first-

Indicator v5 VolumeOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Ultra Combo v57
1 stars

This overlay indicator detects Power of Three cycles on the price chart: an accumulation range, a manipulation sweep, and a distribution path. It confirms sweeps by a close back inside the range or a fifty percent retrace, and it can require a prior cycle high

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TnSovereign Power of Three

KALU-tracker

by Allen1212
303 stars

KALU-tracker is an overlay indicator that plots historical buy and sell transactions made by ARK Invest for Kaiser Aluminum Corporation (KALU). The script renders labels directly on the price chart at specific trade timestamps to denote purchase or sale events

Indicator v4
Updated 2 years ago · None stated GitHub repository of KALU-tracker
106 stars

This strategy calculates an exponential moving average smoothed Vortex Indicator and plots the positive and negative vortex lines alongside a threshold in a separate pane. It enters long when the difference between VI+ and VI- crosses above a specified positiv

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of [Guz] Vortex Indicator Custom V2

KDJ Oscillator

by mihakralj
99 stars

The KDJ Oscillator is a momentum indicator that calculates an enhanced variation of the Stochastic Oscillator. It computes the Raw Stochastic Value from local price extremes over a user-defined lookback length and applies exponential smoothing to derive the K

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of KDJ Oscillator

Oca Cancel Demo

by be-thomas
65 stars

This strategy places a long entry named LE and a short entry named SE whenever the bar year is greater than 2014 and less than 2016. It defines no exits, stop loss, take profit, or position sizing, so opened trades have no close rule. There are no user inputs.

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Oca Cancel Demo

Vortex Indicator

by TWODS-CAPITAL
37 stars

This indicator plots the standard Vortex Indicator lines in a separate pane to identify trend direction and momentum. It calculates positive trend movement and negative trend movement relative to the true range over a user-defined length. The script outputs tw

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Vortex Indicator

Traiversal A001

by ruckard
13 stars

Traiversal A001 is a breakout reversal strategy designed primarily for cryptocurrency trading. It identifies reversal entry opportunities three candles following a breakout and closes positions when a breakout in the opposite direction occurs. The script inclu

Strategy v5 BreakoutMean reversion
Updated 1 year ago · None stated GitHub repository of Traiversal A001

WED & MIDNIGHT DST System

by alboogycOdR
6 stars

Calculates and plots horizontal support and resistance levels based on weekly Wednesday price action and daily midnight opening candles. It accounts for Daylight Saving Time adjustments to capture monthly Wednesday high, low, and open levels along with daily U

Indicator v5 Support & resistanceSessions & time
Updated 7 months ago · None stated GitHub repository of WED & MIDNIGHT DST System
3 stars

This strategy executes trades based on a modified Supertrend indicator combining exponential moving averages, price channels, and ATR bands. It enters long positions when the trend direction turns bullish and short positions when it turns bearish, filtered by

Strategy v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of MicroQuant Trend Strat +TS
2 stars

This indicator adapts the classic MACD structure by replacing exponential moving averages with median calculations. It computes a fast median and a slow median of price, takes their difference to form the MCD line, and calculates a median-based signal line. Th

Indicator v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of Median Convergence Divergence
1 stars

This strategy identifies long and short positions using a dual moving average crossover on the price chart. The fast and slow simple moving averages generate crossover signals that trigger market entries. The script caps the number of intraday filled orders to

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 97b - intraday cap isolate
1 stars

Tick-chart-safe Pine v5 conversion of an overlay combination indicator. It marks PBJ or PB with F2, E3 and cluster patterns, sequential combos, back-to-back day combos, Heavy Weapon with any bullish or bearish signal, GZ1 and high-volume mega combos, a first-c

Indicator v5 VolumeOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Ultra Combo v57 Tick-Friendly
1 stars

A reversal strategy that looks for liquidity sweeps: price pokes beyond the prior swing high or low and closes back inside. Entries must agree with a higher-timeframe EMA 50 and 200 trend, pass an ATR volatility corridor and a candle body check, and optionally

Strategy v6 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereign Reversal Engine

KIND-tracker

by Allen1212
303 stars

KIND-tracker visualizes historical buy and sell transactions made by ARK Invest funds on the price chart. It renders green labels below price bars for share purchases and red labels above bars for sales, indicating trade activity counts. The input setting allo

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

A Strategy for Leledec

by hasnocool
106 stars

This Pine Script strategy identifies major and minor Leledec exhaustion bars by tracking consecutive price bar comparisons against past closes and checking local extremes over set lookback lengths. It overlays visual markers directly on the price chart for det

Strategy v4 Mean reversionCandlestick patterns
Updated 2 years ago · GPL-3.0 GitHub repository of A Strategy for Leledec

Keltner Channel (KC)

by mihakralj
99 stars

This indicator calculates a Keltner Channel on the price chart. The middle line is an exponential moving average of the chosen source, with a warmup weight so the average builds from the first bars. Upper and lower bands sit a multiple of average true range aw

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Keltner Channel (KC)

OCA Cancel Demo

by be-thomas
65 stars

This script is a TradingView documentation example demonstrating One-Cancels-All (OCA) strategy order execution in Pine Script v4. When bar timestamps fall between the years 2015 and 2016, it submits concurrent long and short entries under a single OCA group n

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of OCA Cancel Demo

Williams Alligator

by TWODS-CAPITAL
37 stars

This indicator plots Bill Williams' Alligator system directly on the price chart. It calculates three smoothed moving averages based on the median price (hl2) representing the Jaw, Teeth, and Lips lines, each projected forward into future bars via plot offsets

Indicator v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Williams Alligator

UnfairValueGap A004

by ruckard
13 stars

UnfairValueGap A004 is a strategy that identifies value gaps on the price chart and trades based on gap filling dynamics. It calculates the distance between the current price and the far side of a recent gap, taking positions in anticipation of trend continuat

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

WED & MIDNIGHT DST System

by alboogycOdR
6 stars

WED & MIDNIGHT DST System is a time-based levels indicator that identifies and visualizes key support and resistance zones directly on the price chart. It plots the high and low ranges from the first five Wednesdays of each month with automatic Daylight Saving

Indicator v5 Support & resistanceSessions & time
Updated 7 months ago · None stated GitHub repository of WED & MIDNIGHT DST System

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