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 strategy trades based on calculated astronomical lunar phases. It computes the current lunar day using a fixed 29.53-day cycle from a reference timestamp to identify full moon and new moon events. Full moons trigger long entries, while new moons trigger s

Strategy v5 Sessions & time
Updated 7 days ago · None stated GitHub repository of Moon Phases Long/Short Strategy

An indicator meant for the 15-minute chart that extracts delta-based points of interest from each session, turns them into ATR-sized zones with contamination and freshness rules, and marks the first close through a zone edge plus an ATR buffer. A break can opt

Indicator v6 VolumeSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Delta Break and Retest Stage 5 Break Detection
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 12 days ago · None stated GitHub repository of DEPV2 C1b · HEDEF MESAFESİ

1m Spot Fib Scalper

by MuhammadMuhamid
1 stars

A long-only strategy for one-minute spot charts that waits for a bullish break of structure above a swing high, then parks an entry at a Fibonacci retracement of the impulse leg, defaulting to the 0.618 level inside a 0.5 to 0.618 zone. The stop goes below the

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 12 days ago · None stated GitHub repository of 1m Spot Fib Scalper

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

Median Cascade Trend

by vedkanani123
1 stars

A price-chart indicator by BackQuant that smooths a chosen source through up to three causal median filters, then a two-pole Super Smoother, to draw a trend line coloured by direction. A chop filter can block trend changes when directional efficiency or ATR-no

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Median Cascade Trend

SCDTM Strategy

by GreyssonEnterprises
1 stars

A strategy built on a multi-step checklist. It compares 9 and 18 EMA alignment across daily, 4-hour and 1-hour data, then combines Bollinger Band %B and Stochastic RSI conditions with fractal breakout levels. Stops sit at the fractal, take profit is set by a r

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 months ago · MIT GitHub repository of SCDTM Strategy

Range Detector

by tthanhvu002sgu
1 stars

Finds sideways ranges on the price chart and draws them as boxes. A range is flagged when every close over the minimum length stays within an ATR-based band around a simple moving average. The box, a dotted midline and top and bottom plot lines extend while th

Indicator v5 Support & resistanceBreakout
Updated 3 months ago · None stated GitHub repository of Range Detector

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 4 months ago · None stated GitHub repository of XSP Daily Lotto

NY Anchor Range FVG Breakout

by riegodavid-git
1 stars

An overlay indicator that marks an anchor range during a configurable morning session, by default 09:00 to 10:00 New York time. It detects a breakout from that range, sets a bullish or bearish bias, and finds fair value gaps in the breakout leg. It then tracks

Indicator v5 SMC / ICT / price actionBreakout
Updated 4 months ago · None stated GitHub repository of NY Anchor Range FVG Breakout

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

Quad Rotation 40 4

by rubbermetal
1 stars

Quad Rotation 40 4 is the slow pane of a four-stochastic setup with periods 9, 14, 40 and 60. It plots the 40/4 stochastic K and D lines in a separate pane with oversold and overbought zones, K/D cross triangles inside extreme zones, and a convergence band wei

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of Quad Rotation 40 4
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

Multi-Timeframe Trend Alignment

by shubhamtaywade82
1 stars

Compares price with a moving average on four selectable timeframes, defaulting to 15 minutes, 1 hour, 4 hours and 1 day. Each timeframe scores plus one, minus one or zero, and the four are summed into an alignment score from minus four to plus four. It plots i

Indicator v6 TrendMoving averages Archived
Updated 5 months ago · None stated GitHub repository of Multi-Timeframe Trend Alignment

Talons Volume Surge (Memecoin)

by muammeryldrm42
1 stars

A long-only strategy for fast-moving small-cap crypto charts. It enters when volume is a set multiple of its recent average, the bar gains more than a minimum percentage, the candle is green and the move over the last twelve bars is not above a too-late limit.

Strategy v5 VolumeBreakout
Updated 5 months ago · None stated GitHub repository of Talons Volume Surge (Memecoin)

Crypto AMT VP Flow PA

by latifangren
1 stars

An overlay indicator for crypto charts that combines a volume profile with value area, an anchored VWAP with bands, an order flow proxy from lower-timeframe delta, relative volume and cumulative delta, and price action based on swing pivots and ATR rejection w

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT VP Flow PA
1 stars

This compact indicator labels Elliott Wave counts on the price chart. It runs a zig-zag at several depths, chooses the depth that gives the best fit, and applies Elliott Wave rules, with a strict mode that forces an A-B-C count when the rules break. A correcti

Indicator v6 Support & resistance Repaints
Updated 6 months ago · None stated GitHub repository of Mini Elliott Wave 2026-3
1 stars

An indicator on the price chart that draws an ATR-based trailing stop with a smooth tightening phase. The stop starts at a multiple of a 200 period ATR from the extreme and flips when the close crosses it. After a flip, the stop moves closer to price along a s

Indicator v6 TrendVolatility & bands
Updated 6 months ago · None stated GitHub repository of Sigmoid Transition Trailing Stop
1 stars

A macro strategy that builds a global central bank liquidity series from the Fed balance sheet, Treasury account, reverse repo, ECB, People's Bank of China and Bank of Japan, and a combined M2 money supply series, each convertible to dollars and switchable. It

Strategy v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Liquidity Moving Average Cross
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

IBOB Inside Bar Outside Bar

by Tradehook-org
1 stars

A Pine v5 strategy that trades an outside bar after one or more inside bars. An inside bar has a lower high and higher low than the bar before it, and an outside bar exceeds both. After the chosen number of consecutive inside bars, an outside bar closing up op

Strategy v5 Candlestick patternsBreakout
Updated 8 months ago · None stated GitHub repository of IBOB Inside Bar Outside Bar

SPX Gamma (7DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPX Gamma (7DTE)
1 stars

An overlay indicator that draws the current candle range of several higher timeframes on the lower-timeframe chart. Seven timeframes can be switched on or off: 30 minutes, 1 hour, 2 hours, 4 hours, daily, weekly and monthly. Each gets its own colour, and an op

Indicator v5 Support & resistance
Updated 9 months ago · None stated GitHub repository of Multi-Timeframe Intrabar

A chart-overlay indicator that detects pivot-based swings and marks break of structure and change of character events. It measures the percentage size of each move that follows and sorts it into four levels with adjustable minimum and maximum percentages. Labe

Indicator v5 SMC / ICT / price actionSessions & time
Updated 9 months ago · None stated GitHub repository of BOS/CHoCH Impulsive Move Detector
1 stars

An indicator on the price chart that draws a zigzag of swing highs and lows from a chosen timeframe, with length, depth and highlight level inputs and an option for a curved line. The recursive depth builds higher-order swings from lower ones. It can attach RS

Indicator v6 Support & resistanceTrend Repaints
Updated 1 year ago · None stated GitHub repository of Multi-Timeframe Recursive Zigzag

TESLA-BestPosition

by theteelek
1 stars

TESLA-BestPosition is a long-only dollar-cost averaging strategy that combines custom Relative Strength Index levels with smoothed highest-high and lowest-low channels. It calculates 10-period exponential moving averages of highest highs and lowest lows over a

Strategy v6 Mean reversionOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TESLA-BestPosition

ValueAtTime

by ivansoft
1 stars

A Pine Script v6 library that stores timestamped values and retrieves the value at a past point in time, such as one week, one month or year-to-date ago. It defines a data type with parallel time and value arrays, helper functions that limit array size to the

Library v6 Repaints
Updated 1 year ago · None stated GitHub repository of ValueAtTime

TD RSI Strategy

by zhuzp98
1 stars

This strategy combines a TD Sequential close comparison, RSI with a moving-average Bollinger envelope, MACD, and the Stochastic Momentum Index. It allows long, short, or both directions and sizes orders from a percentage of equity. Inputs set RSI and MACD leng

Strategy v5 Oscillators & momentumBreakout
Updated 1 year ago · None stated GitHub repository of TD RSI Strategy

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

ZWAP

by nvFede
1 stars

A Pine v4 indicator in a separate pane that computes a z-score of price against a volume-weighted average price over a chosen length, 20 bars by default, then smooths it with an exponential average. Shaded bands mark overbought and oversold zones, by default b

Indicator v4 Mean reversionVolume
Updated 3 years ago · None stated GitHub repository of ZWAP

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

Trend SNEK

by rajatjpatel
1 stars

A price chart overlay that plots the highest high and lowest low of the previous set number of bars, ten by default, together with a midline between them. The area between the bands is shaded green when the current bar's high breaks above the prior upper line

Indicator v5 BreakoutSupport & resistance
Updated 4 years ago · None stated GitHub repository of Trend SNEK
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 11 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

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