Synced with GitHub · updated yesterday

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
10 stars

This indicator plots the active hours of major global trading sessions including Tokyo, Berlin, London, Sydney, and New York. It dynamically adjusts session times based on whether the instrument is classified as a traditional market or crypto. The script uses

Indicator v4 Sessions & time
Updated 5 years ago · None stated GitHub repository of My Trading Sessions

TPCharts ADR

by TPCharts
10 stars

TPCharts ADR calculates average daily, weekly, monthly and yearly ranges from a simple moving average of prior high-minus-low ranges. It projects each range into high and low levels, draws those levels as lines on the price chart, and labels the pip or tick di

Indicator v4 Volatility & bandsSupport & resistance Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of TPCharts ADR

Auto Trendlines

by casoon
9 stars

Auto Trendlines calculates support and resistance lines by identifying confirmed pivot highs and lows over a specified lookback window. It validates trendline candidates using ATR-based touch tolerances, touch counts, line spans, and max violation thresholds.

Indicator v6 TrendSupport & resistance Repaints
Updated 2 days ago · MIT GitHub repository of Auto Trendlines

Nexural QWAP

by JasonTeixeira
9 stars

Nexural QWAP calculates a volume-weighted average price combined with a cumulative volume delta order flow engine directly on the main price chart. It analyzes market structure by detecting volume absorption, liquidity sweeps, price-CVD divergence, stacked imb

Indicator v6 SMC / ICT / price actionVolume
Updated 13 days ago · Custom licence GitHub repository of Nexural QWAP

Impulse Trend Arrows

by MeridianAlgo
9 stars

Calculates an adaptive baseline using an EMA and constructs an ATR channel smoothed over a user-defined length. It combines channel breakout conditions with RSI and MACD momentum agreement to generate buy and sell signals. Signals are displayed on the main pri

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Impulse Trend Arrows

Ichimoku Cloud - Eterna

by EternaHybridExchange
9 stars

This strategy calculates standard Ichimoku Cloud components, including the conversion line, base line, and displaced leading spans. It opens long positions when price resides above a bullish cloud and the conversion line crosses above the base line. Short entr

Strategy v5 Trend
Updated 7 months ago · MIT GitHub repository of Ichimoku Cloud - Eterna

My Script

by Anderson-ALGO
9 stars

This indicator computes the dot product of two equal-length arrays and plots the result in a separate pane. One array is filled with the current close for every element, and the other is filled with the constant 1.618. A single integer input sets both lengths

Indicator v4
Updated 5 years ago · None stated GitHub repository of My Script

This indicator tracks swing highs and swing lows to generate trend-following trailing stop levels on the price chart. When the closing price breaks above the previous swing high, the system establishes a bullish state using the recent swing low as a trailing s

Indicator v4 TrendBreakout
Updated 4 years ago · None stated GitHub repository of Accurate Swing Trading System

TR Margin Pulse

by Enesp4rl4k
7 stars

TR Margin Pulse calculates and plots the ratio of marketwide margin calls to required margin using Takasbank data generated via MCP templates. Rendered in a separate pane, the line turns red when exceeding a predefined stress threshold and teal when below. A s

Indicator v6 Screeners & dashboards
Updated 6 days ago · MIT GitHub repository of TR Margin Pulse

LunarTick Initial Balance

by lunarticktrading
7 stars

This indicator tracks and visualizes the initial balance range over customizable trading sessions directly on the price chart. It plots the high, low, and midpoint of the opening balance, with optional session extension levels, an anchored VWAP, and shaded hig

Indicator v6 Sessions & timeSupport & resistance Repaints
Updated 2 weeks ago · None stated GitHub repository of LunarTick Initial Balance
7 stars

The Hybrid Volume Spread Analysis (HVSA) indicator calculates a volume-weighted momentum oscillator in a separate pane by multiplying moving averages of open and close prices by relative volume change. It evaluates price spread dynamics adjusted for volume cha

Indicator v6 VolumeOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Hybrid Volume Spread Analysis

Order Block Strategy

by muammeryldrm42
7 stars

This strategy identifies bullish and bearish order blocks using an average true range impulse filter and plots corresponding boxes on the price chart. It enters positions on price retests of the order block zones, optionally filtered by an exponential moving a

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · MIT GitHub repository of Order Block Strategy
7 stars

This indicator recolors candlestick bodies directly on the main price chart based on relative trading volume. It calculates volume relative to a simple moving average (SMA) over a user-defined length. Up bars and down bars are assigned one of six distinct colo

Indicator v5 Volume
Updated 4 months ago · None stated GitHub repository of Candle Color by Volume

This indicator overlays Bollinger Bands with two exponential moving averages directly on the price chart. It calculates standard Bollinger Bands using a selectable basis moving average type, length, and standard deviation multiplier. Alongside the bands, it co

Indicator v6 Moving averagesVolatility & bands
Updated 5 months ago · None stated GitHub repository of EMA 9, EMA 21 & Bollinger Bands

EMA 9/26/52/200

by SynergOps
7 stars

EMA 9/26/52/200 calculates four exponential moving averages based on bar closing prices using fixed periods of 9, 26, 52, and 200. It plots all four lines directly on the main price chart in distinct yellow, purple, blue, and red colors to help identify short-

Indicator v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of EMA 9/26/52/200

This strategy generates trading signals based on crossovers between daily session VWAP and a 4-hour 90-period Exponential Moving Average (EMA). When VWAP crosses above the 4-hour EMA, the strategy closes open short positions and enters a long trade with full e

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 4H Bullish Buy 4H Bearish Sell Session

FX Market Sessions

by itmakesyousick
7 stars

This indicator draws up to three named forex sessions on the price chart, defaulting to London, New York and Tokyo in a chosen timezone. Each session can show a shaded history box, dashed borders, optional Fibonacci levels and an opening range. Users set sessi

Indicator v5 Sessions & timeSupport & resistance
Updated 3 years ago · None stated GitHub repository of FX Market Sessions

MACD

by trsdn
6 stars

This indicator implements a standard Moving Average Convergence Divergence oscillator plotted in a separate pane. It calculates fast and slow exponential moving averages of the closing price, derives the MACD line from their difference, and smooths it to creat

Indicator v5 Oscillators & momentumMoving averages
Updated 6 days ago · MIT GitHub repository of MACD
6 stars

This indicator detects regular and hidden divergences between price pivots and RSI or Williams %R. Confirmed swing highs and lows, which wait a set number of bars on each side, are compared with oscillator extremes. Regular divergences mark possible reversals,

Indicator v6 DivergenceOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Divergence Detector
6 stars

This indicator draws a two-column dashboard table on the price chart for up to three user-selected symbols, defaulting to EURUSD, GBPUSD, and USDJPY. For each symbol it requests four-hour highs, lows, and closes from the two prior candles and classifies a high

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Institutional Bias Scanner
6 stars

This strategy example builds TradersPost webhook JSON messages and plots them as colored labels on the price chart. At fixed clock hours it shows a long with a trailing-stop percent, an add, a cancel, an exit, a short with a trailing-stop price, a flatten, and

Strategy v5
Updated 1 year ago · None stated GitHub repository of WebhookMessage Test Strategy

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite classifies real OHLC bars with Rob Smith's TheStrat method and draws labels, targets, and stop levels on the price chart. It detects inside bars, hammers, shooters, outside bars, and Failed 2 range reclaims, then shows magnitude and exhaustion t

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of TheStrat Suite

Pair Creation

by gorx1
5 stars

This indicator constructs a synthetic trading pair from two user-selected instruments using division or multiplication. It retrieves multi-asset price data and optionally applies a forward pricing model to the second leg using financing rates, storage costs, y

Indicator v6 Volume
Updated 8 months ago · None stated GitHub repository of Pair Creation

Moving Average

by SiegerTerpstra
5 stars

This indicator calculates a simple moving average as the arithmetic mean of a chosen price source over a set length. A second averaging pass can smooth the result, and an offset shifts the calculation window. An indicator timeframe input selects the data timef

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Moving Average

Linear Regression Channel

by jerryinyang
5 stars

The Linear Regression Channel indicator calculates the middle line via linear regression on a user-selected source over a configurable length. It plots upper and lower channel bands using a deviation multiplier and draws these lines directly on the price chart

Indicator v4 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of Linear Regression Channel

This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic Long Strategy

AG Momentum Breakout

by eltonaguiar
4 stars

AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th

Strategy v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of AG Momentum Breakout

MTF MA Bands

by InNoobWeTrust
4 stars

The indicator calculates and plots up to five multi-timeframe moving average bands directly on the price chart. Each band is constructed from moving averages computed across user-defined timeframes, such as current chart, 5-minute, 30-minute, 4-hour, and daily

Indicator v6 TrendMoving averages Repaints
Updated yesterday · None stated GitHub repository of MTF MA Bands

RSI Threshold

by latentwill
4 stars

This strategy calculates the Relative Strength Index of the close and is configured for a separate pane. It opens a long position when RSI is below the oversold level and a short position when RSI is above the overbought level. Position size defaults to ten pe

Strategy v5 Oscillators & momentumMean reversion
Updated 7 days ago · None stated GitHub repository of RSI Threshold
4 stars

This indicator plots a Chandelier Exit trailing stop on the price chart. It sets a long stop from the highest high over the ATR length minus an ATR multiple, and a short stop from the lowest low plus that multiple. Each stop only moves in the favorable directi

Indicator v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Chandelier Exit [trugurpala]
4 stars

This strategy overlays directly on the price chart to identify pullback buying opportunities during established bullish moves. It checks whether price gained by a specified percentage over an earlier window and subsequently pulled back by a minimum threshold o

Strategy v5 TrendMean reversion
Updated 5 months ago · None stated GitHub repository of Buy the Dip in an Uptrend

订单流分析

by YooooungLee
4 stars

This strategy evaluates order flow by combining volume dynamics and price deviation relative to the Volume Weighted Average Price (VWAP). It enters long trades when trading volume exceeds a relative threshold, price moves significantly above VWAP, net volume p

Strategy v6 VolumeOscillators & momentum Repaints
Updated 10 months ago · Apache-2.0 GitHub repository of 订单流分析
4 stars

This indicator detects a bullish long lower shadow when the lower wick exceeds 75 percent of the candle range. It plots an LLS label below the bar, tints the background blue, and fires an alert titled new pattern detected. The only input changes the bullish la

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Long Lower Shadow - Bullish

UT Bot Alerts

by ShabbirHasan1
4 stars

UT Bot Alerts combines an ATR-based trailing stop mechanism with selectable channel bands, including Bollinger Bands, Keltner Channels, and standard or pivot-based Donchian Channels. Signals are driven by crossovers between price and the adaptive ATR trailing

Strategy v4 TrendVolatility & bands
Updated 1 year ago · Custom licence GitHub repository of UT Bot Alerts
4 stars

This indicator plots multiple custom moving averages on the price chart. It draws EMA lines of periods 9, 14, 34 and 55 using daily resolution alongside WMA lines of periods 9, 15 and 18 using weekly resolution. Users adjust the source (default close), length

Indicator v5 Moving averages
Updated 2 years ago · None stated GitHub repository of Hareketli Ortalamalar
4 stars

This indicator calculates rolling quartiles and interquartile ranges (IQR) across a customizable lookback window, plotting a statistical box plot offset to the right of the chart. It identifies the 25th, 50th (median), and 75th percentiles along with standard

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 years ago · None stated GitHub repository of Quartiles with Box Plot [KL]

Intraday Gap Detector

by might-tree
4 stars

This indicator calculates the percentage price gap between the current bar open and the previous bar close on the price chart. When the absolute gap exceeds a hardcoded threshold of 0.2 percent within the past 30 days, it draws an extended horizontal line at t

Indicator v5 Support & resistanceBreakout
Updated 3 years ago · None stated GitHub repository of Intraday Gap Detector
4 stars

Calculates Bollinger Bands, RSI, and Stochastic to identify potential reversal opportunities directly on the price chart. It plots buy signals when the bar low is within a set distance of the lower Bollinger Band while both RSI and Stochastic register oversold

Indicator v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of RSI and Stoch (Brahim)

Stats Table

by degenview
3 stars

Displays a statistical summary table pinned to the top right of the price chart. It calculates key metrics including ATR percentage relative to price, high-low range percentage over a configurable bar count, relative volume compared to its simple moving averag

Indicator v6 Screeners & dashboardsTrend
Updated yesterday · GPL-3.0 GitHub repository of Stats Table

Dip Bulucu-2

by gocaman
3 stars

Dip Bulucu-2 combines a WaveTrend oscillator and Williams Vix Fix to identify potential market bottoms and trend reversals. It calculates Williams Vix Fix based on standard deviation Bollinger Bands and percentile ranges, highlighting exhaustion bars in red hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated yesterday · None stated GitHub repository of Dip Bulucu-2

Alert System with Trading Dashboard calculates two exponential moving averages on the chart while tracking fast and slow EMA crossover states across four configurable timeframes. It displays a visual table on the price chart showing the directional bias for ea

Indicator v5 Screeners & dashboardsMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Alert System with Trading Dashboard
3 stars

This indicator demonstrates debugging visualization patterns for Pine Script. It plots value tracking with mean, min, and max reference lines, condition markers using shapes and arrows, historical comparisons with standard deviation bands, multi-series overlay

Indicator v5 Moving averagesVolatility & bands
Updated 7 months ago · None stated GitHub repository of Debugging Visualization Patterns

Stella's Bollinger Squeeze

by stella-entry
3 stars

Stella's Bollinger Squeeze plots Bollinger Bands and compares them with a Keltner Channel on the price chart. It marks a squeeze when the Bollinger Bands sit inside the Keltner Channel and a gray background when they sit outside. After the squeeze ends, it mar

Indicator v5 Volatility & bandsBreakout
Updated 8 months ago · MIT GitHub repository of Stella's Bollinger Squeeze

2:1 Strategy with Signals

by IAMATOMIC001
3 stars

This indicator identifies key market structure and pivot points directly on the price chart. It calculates Higher Highs, Lower Highs, Higher Lows, and Lower Lows using configurable left and right pivot evaluation lengths. Users can toggle pivot labels, customi

Indicator v5 Support & resistanceSessions & time Repaints
Updated 12 months ago · None stated GitHub repository of 2:1 Strategy with Signals

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