Synced with GitHub · updated today

Free TradingView Pine Scripts

8,340 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
8,340 scripts

Linda Raschke Setup [JR]

by jayadevrana
1 stars

This strategy implements Linda Raschke's classic trend pullback setup. It measures market trend strength using the ADX indicator and identifies pullbacks to an Exponential Moving Average (EMA). When ADX exceeds a specified threshold and price touches the EMA,

Strategy v6 TrendMoving averages
Updated 2 days ago · MPL-2.0 GitHub repository of Linda Raschke Setup [JR]

SMC Exit Signal

by skipp-dev
1 stars

SMC Exit Signal is an overlay companion indicator that manages position lifecycle states driven by external Smart Money Concepts engine outputs. It monitors trigger levels, stops, and take-profit targets to track active trades directly on the chart. It can dyn

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of SMC Exit Signal

ES point-value 9/21 SMA cross

by pineforge-4pass
1 stars

This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses

Strategy v6 TrendMoving averages
Updated 5 days ago · Apache-2.0 GitHub repository of ES point-value 9/21 SMA cross

P Syn Inputs All

by GammaExpansion
1 stars

This Pine Script v6 indicator tests every supported input type including integers floats booleans strings textareas sources colors times prices symbols timeframes and sessions. It sums all selected input values then plots that total along with the close price

Indicator v6
Updated 5 days ago · MIT GitHub repository of P Syn Inputs All
1 stars

This indicator calculates the distance in ATR units to the nearest higher timeframe OHLC level from the current close price. It identifies the closest level above or below the price and computes the average of near and big levels distances. The script plots we

Indicator v6 Support & resistanceVolatility & bands
Updated 11 days ago · None stated GitHub repository of DEPV2 C1b · HEDEF MESAFESİ

Types Demo

by Alaamo7
1 stars

Types Demo is an educational indicator designed to illustrate fundamental Pine Script variable types, including boolean, integer, float, string, and color. It checks whether the current bar is bullish and plots the closing price in green within a separate pane

Indicator v6 Candlestick patterns
Updated 2 months ago · Custom licence GitHub repository of Types Demo

XSP Daily Lotto

by majohnst
1 stars

This strategy models a zero-days-to-expiration (0DTE) Opening Range fade system on the price chart, designed around Mini-SPX index options. It calculates an opening range box and gauges directional sentiment from an external symbol like ES futures. Bullish con

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of XSP Daily Lotto

REQ TEST

by kevinesk
1 stars

REQ TEST is a minimal diagnostic utility indicator that tests external symbol data accessibility using security requests. It fetches daily closing price data for specified US market tickers including major index ETFs and market indicators such as SPY, QQQ, XLK

Indicator v5 Screeners & dashboards
Updated 4 months ago · None stated GitHub repository of REQ TEST
1 stars

Composite Price Stats is a trend-following overlay strategy that evaluates statistical metrics on price components. It calculates cumulative true range, variance, deviation, and ADX on hlc3 price data, while plotting an averaged price series. Long entries trig

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Composite Price Stats
1 stars

This Pine Script strategy combines bullish and bearish engulfing candlestick patterns detected on the price chart with a stochastic oscillator for entry signals. The stochastic is calculated using inputs for K period, D period, and smoothing. Long entries trig

Strategy v5 Candlestick patternsOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Engulfing and Stochastic Strategy

VWAP Bounce & Cross

by Basant1Saini
1 stars

This strategy trades intraday price interactions with the Volume Weighted Average Price (VWAP). It offers bounce and crossover entry modes, filtered by an Exponential Moving Average trend filter and a customizable trading session window. Stop loss levels are c

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of VWAP Bounce & Cross

Hello World

by fiji-solutions
1 stars

This educational indicator illustrates how variable persistence functions across historical and real-time bars. It maintains three counters: a standard bar counter using the var keyword, a tick counter using varip that increments on every intrabar update witho

Indicator v5 Repaints
Updated 2 years ago · None stated GitHub repository of Hello World

(JS) Squeeze Pro 2

by amico1234
1 stars

This indicator is built for a separate pane and compares Bollinger Bands with three Keltner Channel widths to mark low, mid, and high squeeze conditions. Length, price source, and moving-average type for both calculations are selectable among SMA, EMA, WMA, VW

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of (JS) Squeeze Pro 2

DTX

by JohnsonHsiao
1 stars

Calculates two TRIX (Triple Exponential Average) lines based on logarithmic close prices over different lookback periods. The fast TRIX uses a primary period length, while the slow TRIX adds an offset factor to determine its longer period length. Both TRIX lin

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of DTX
948 stars

This script provides a developer testing framework for Pine Script v5 that executes custom test suites and assertions. It logs test specifications, skips marked tests, and evaluates array equality across data types. The tool renders a visual test reporter dire

Indicator v5
Updated 10 days ago · GPL-3.0 GitHub repository of Unit Testing Framework
575 stars

This overlay indicator screens a pasted list of symbols for ICT market structure shifts, or for retracements toward an optimal trade entry or order block. It uses a zig zag built from highs and lows or opens and closes, then lists matching bullish and bearish

Indicator v5 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Market Structure Shift (MSS) Screener

Strategy Tester

by Alorse
330 stars

Strategy Tester is an overlay trading strategy that combines linear regression momentum, Directional Movement Index (DMI), and Average True Range (ATR) volatility levels. It seeks long entry setups when pivot highs form on the custom momentum oscillator while

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Strategy Tester

ACHR-Tracker

by Allen1212
303 stars

ACHR Tracker visualizes historical buy and sell transactions made by ARK Invest funds for Archer Aviation (ACHR). It plots colored labels directly on the price chart at historical timestamps, indicating whether ARK ETFs purchased or sold shares and showing the

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

DebugConsole

by ricardosantos79
261 stars

DebugConsole is a Pine Script v5 library that stores debug text in a fixed-length string array and shows it in a single chart table cell. init creates a bottom-left table and an empty line buffer whose size defaults to 20. queue drops the oldest line and appen

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

This strategy overlays a volume-weighted moving average of open prices and standard-deviation bands on the ES futures chart, aimed at the one-minute timeframe. It requests open and low from several higher timeframes with lookahead enabled. Percentage inputs se

Strategy v5 Volatility & bandsMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of ES - Futures 1M No repaint

STRG-HOLP

by harryguiacorn
219 stars

STRG-HOLP is a trading strategy that identifies High of Low Period (HOLP) and Low of High Period (LOHP) breakout setups. It tracks the lowest low or highest high over a user-defined lookback window. A long trade opens when the close breaks above the high of th

Strategy v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of STRG-HOLP
219 stars

This educational indicator detects local swing highs across a rolling nine-bar window. It checks whether the high from four bars ago equals the highest high of the nine-bar period. When confirmed, it plots an asterisk and the letter H directly on the price cha

Indicator v4 Support & resistance
Updated 5 years ago · None stated GitHub repository of 教學:尋找高低點2

Dead Cat Bounce

by TradersPost
218 stars

Calculates consecutive bar sequences that fail to create new price extremes and identifies potential reversal breakout points. When a run breaks, the script plots measured move projection arrows, high-water mark lines, and Fibonacci levels directly on the pric

Strategy v6 BreakoutMean reversion
Updated 3 months ago · None stated GitHub repository of Dead Cat Bounce

Aroon-based Strategy

by capissimo
114 stars

This indicator overlay generates buy and sell signals based on Aroon extreme levels combined with optional volume or volatility filters. It calculates Aroon Up and Aroon Down lines using localized high and low lookbacks, generating trade entries when Aroon rea

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Aroon-based Strategy
106 stars

This strategy plots 50-, 100- and 200-period simple moving averages on the price chart. After a user-chosen start date, it enters a long position when the 50-period average crosses above the 100-period average, using 100 percent of equity. A short order is cod

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 50/100/200 Moving Average Strategy

Calculates and plots an Autoregressive Finite Impulse Response (AFIRMA) moving average directly on the price chart. It weights historical price data using selectable windowing functions, including Hanning, Hamming, Blackman, and Blackman-Harris filters. An opt

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Autoregressive FIR Moving Average (AFIRMA)

Dual-color bars

by be-thomas
65 stars

This indicator draws a separate OHLC bar series in its own pane using plotbar. Each bar is colored lime when the close is greater than or equal to the open, and red when the close is below the open. It has no user inputs, no signals, and no entry, exit, stop,

Indicator v5 Candlestick patterns
Updated 4 days ago · GPL-3.0 GitHub repository of Dual-color bars

Strategy Template

by iamrichardD
57 stars

This strategy template implements an EMA trend filter paired with MACD momentum confirmations. Long positions trigger when the fast EMA is above the slow EMA alongside a bullish MACD crossover and positive histogram, while short positions require the reverse.

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of Strategy Template

Supply Demand

by iamc1oud
56 stars

This overlay indicator maps market structure and draws supply and demand zones on the price chart. It marks swing points, optional structure mapping, sweep marks, and bubbles, and can color candles from its trend detection. It plots the last selected order blo

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Supply Demand

Simple RSI

by dcaoyuan
55 stars

Simple RSI calculates and plots the standard Relative Strength Index oscillator in a separate pane. It tracks price momentum based on a user-defined calculation length, defaulting to 13 bars, applied to a selectable price source such as the close. Dashed horiz

Indicator v6 Oscillators & momentum
Updated 6 months ago · Apache-2.0 GitHub repository of Simple RSI
53 stars

This overlay indicator calculates the 14-period Relative Strength Index to identify overbought and oversold market conditions. When RSI crosses key thresholds, it plots initial long or short entry labels directly on the price chart. If price continues moving a

Indicator v6 Oscillators & momentumMean reversion
Updated 2 months ago · MPL-2.0 GitHub repository of RSI Multi-Layer Entry Indicator
47 stars

Calculates the Composite Fractal Behavior metric across multiple depth tiers to analyze trend persistence and cycle behavior. It evaluates fractal pattern ratios across logarithmic period steps, smooths the resulting index, and applies Jurik Moving Average fil

Indicator v6 Oscillators & momentumVolatility & bands
Updated 8 months ago · MIT GitHub repository of Composite Fractal Behavior (CFB)

Session Raid Stats

by TamaraKGreen
46 stars

Session Raid Stats highlights custom session price ranges and projects range extension lines at fixed point intervals above and below session highs and lows. It identifies liquidity raids exceeding user-defined point thresholds within a specified time cutoff f

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Session Raid Stats
43 stars

This overlay indicator marks Williams fractal highs and lows on the price chart. It compares each bar’s high and low with a user-set number of bars on either side and plots a tiny triangle above a confirmed up fractal and below a confirmed down fractal. The on

Indicator v4 Support & resistance
Updated 1 year ago · None stated GitHub repository of Williams Tiny Fractals
43 stars

Donald - AI Futures is a price-chart strategy that estimates inner and outer high-low zones and a smoothed close with rational quadratic kernel regression. It builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving

Strategy v5 Oscillators & momentumSMC / ICT / price action Repaints
Updated 2 years ago · None stated GitHub repository of Donald - AI Futures

Awesome Oscillator

by TWODS-CAPITAL
37 stars

This indicator plots the Awesome Oscillator in a separate pane. It subtracts a 34-period simple moving average of the high-low midpoint from a 5-period simple moving average of the same midpoint. Rising bars are drawn as teal columns and falling bars as red co

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

Zen Trading Toolkit

by Zen-Tim
29 stars

Zen Trading Toolkit is an overlay indicator that plots average bar range measured-move targets from the prior regular-hours close, plus optional yesterday high, low, close and range projections. It draws an N-bar opening-range box and a volatility table of ave

Indicator v6 Volatility & bandsSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen Trading Toolkit
26 stars

This indicator identifies and plots bullish and bearish Fair Value Gaps (FVG) directly on the price chart. It detects three-bar imbalances where gaps occur between the high of the first candle and the low of the third candle, or vice versa. The tool includes a

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · AGPL-3.0 GitHub repository of Fair Value Gap (FVG)

KC15

by benso87
24 stars

KC15 is a price-chart strategy that configures two moving averages, a Bollinger Band Width Percentile filter, and PMARP entry and exit thresholds for long and short trades. Users can switch each average between SMA and EMA, set lengths and colors, and toggle l

Strategy v5 Moving averagesVolatility & bands
Updated 4 years ago · MPL-2.0 GitHub repository of KC15

Trailing Drawdown

by palitojendthen
20 stars

The Trailing Drawdown indicator calculates and visualizes the percentage drop of a price series from its peak over a user-specified lookback period. It tracks maximum price levels within a rolling window and measures the current deviation from those peaks. Tra

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Trailing Drawdown

RSI/BB/60 Strategy

by SammyEnigma
18 stars

This strategy plots Bollinger Bands on the price chart and calculates RSI plus Bollinger Band width from one shared length. It enters long when band width crosses under 0.01, with a stop order at the lower band. It adds short orders when price crosses the uppe

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of RSI/BB/60 Strategy

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