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

ICT + Kill Zone + Silver Bullet is an overlay indicator that highlights key Inner Circle Trader (ICT) session timeframes on the price chart. It draws colored background boxes and labels for trading sessions including Asia, London, NY AM, NY Lunch, and NY PM. U

Indicator v5 Sessions & timeSMC / ICT / price action
Updated 12 months ago · None stated GitHub repository of ICT + Kill Zone + Silver Bullet

BTMM OTE Zones

by jcortes254
3 stars

BTMM OTE Zones automatically identifies swing points to project key Fibonacci retracement levels and Optimal Trade Entry (OTE) areas such as 61.8%, 70.5%, and 78.6%. It plots these levels along with Premium and Discount valuation zones directly on the main pri

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM OTE Zones

RSI Lib

by augustoerni
3 stars

This library exports a function that calculates the Relative Strength Index from the close price. It measures bar-to-bar change, separates gains and losses, smooths both with a running moving average, and returns the standard 100-scale RSI. Callers pass the lo

Library v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI Lib
3 stars

The Long Term Alpha Indicator computes a weighted alpha from price change (close minus average of high low close) multiplied by volume and smoothed via simple moving average. It produces EMAs of this weighted alpha at fixed lengths of 110 30 and 8. Each EMA is

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Long Term Alpha Indicator

Currency Strength Chart

by itmakesyousick
3 stars

This indicator plots the comparative relative strength of major currencies in a separate pane below the price chart. It calculates strength metrics based on raw price or momentum oscillators including RSI, CCI, and Stochastics, smoothed using various moving av

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

MA Spread Histogram

by piecioshka
2 stars

MA Spread Histogram calculates the difference between two configurable moving averages and plots the result as a color-coded column histogram in a separate pane. The histogram bars highlight expanding or contracting momentum across the zero line. When the shor

Indicator v6 Oscillators & momentumMoving averages
Updated 10 days ago · MIT GitHub repository of MA Spread Histogram
2 stars

This indicator calculates RSI and identifies regular and hidden bullish and bearish divergences against price swing pivots in a separate pane. It features an early signal mode that uses a shorter lookback to detect provisional divergence earlier, tracking whet

Indicator v6 Oscillators & momentumDivergence
Updated 4 weeks ago · Custom licence GitHub repository of RSI Divergence Indicator MP v3

Price Action Toolkit

by TamTH-Dev
2 stars

The Price Action Toolkit is an indicator that combines several price action tools on the chart. It calculates the ATR with user-defined length and shows it in a table. It plots multiple Kaufman Adaptive Moving Averages (KAMA) with different lengths and sources

Indicator v6 TrendSupport & resistance
Updated 5 weeks ago · None stated GitHub repository of Price Action Toolkit
2 stars

WaveTrend Oscillator Pro calculates WT1 and WT2 lines derived from exponentially smoothed typical price channels and moving averages. Displayed in a separate pane, it visualises momentum alongside customizable overbought and oversold bands. Crossover signals b

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · Custom licence GitHub repository of WaveTrend Oscillator Pro [Vantrade]

Monday Range (Lines)

by alvinng214
2 stars

This indicator plots key levels from historical Monday sessions, including Monday High, Low, Open, Close, and custom ratio levels such as the equilibrium line. Extending these level lines across the trading week, it draws reference levels and labels directly o

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of Monday Range (Lines)

Zeguela Supertrend

by danielvm-git
2 stars

This strategy plots a Supertrend indicator directly on the price chart to generate trend-following trade signals. It calculates dynamic upper and lower bands using a chosen ATR period, multiplier, and calculation method. Entries trigger when the trend switches

Strategy v4 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Zeguela Supertrend
2 stars

Volume Historical Patterns indicator plots volume analysis in a separate pane. It computes an SMA of volume using optional time filtering for NYC hours and identifies the highest volume bar ever seen. Bars receive custom colors based on volume relative to this

Indicator v6 VolumeMoving averages
Updated 3 months ago · Apache-2.0 GitHub repository of Volume Historical Patterns

Lakshmi Zones v3

by voletiramu
2 stars

Lakshmi Zones v3 is an overlay indicator that builds demand and supply boxes from a volume-profile histogram of recent bars, then merges nearby levels and limits how many zones appear and how far they sit from price. Optional plots include a Magic Line channel

Indicator v6 Support & resistanceVolume
Updated 6 months ago · None stated GitHub repository of Lakshmi Zones v3

Alper

by avatar-lavventura
2 stars

This strategy combines the WaveTrend oscillator with Bollinger Bands and Keltner Channels squeeze momentum calculations in a separate pane. It displays WaveTrend signal lines, oscillator difference areas, threshold levels, and crossover points directly in the

Strategy v4 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of Alper

The Grid Bot Direction Plugin Supertrend Pivot indicator calculates dynamic market trend direction for automated grid trading. It computes a smoothed center level derived from pivot highs and lows, combining it with ATR-based bands to generate a trailing stop

Indicator v5 TrendSupport & resistance Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Direction Plugin Supertrend Pivot psyll
2 stars

This indicator plots cumulative volume delta as candles in a separate pane. It builds volume delta from lower-timeframe intrabars, either as raw delta or as a percent of volume, and accumulates it until a chosen reset. Resets can follow a higher timeframe, a f

Indicator v6 VolumeDivergence
Updated 8 months ago · None stated GitHub repository of CVD - Cumulative Volume Delta Candles

Average True Range Percent (ATRP)

by mushroom-men-Trading
2 stars

This indicator calculates Average True Range as a percentage of the closing price and plots that value in a separate pane. True range is the largest of the bar range and the gaps from the previous close. An RMA-style average with a warmup correction smooths th

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Average True Range Percent (ATRP)
2 stars

This strategy plots a custom SuperTrend Polyfactor Oscillator in a separate pane using ATR, adjustable factors, and normalization options on the chosen indicator source. It generates long, short, or both direction signals based on the oscillator values with mu

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Multi-Step FlexiSuperTrend - Strategy
2 stars

Plots timeframe-adaptive moving averages and technical overlays directly on the price chart. It displays standard daily moving averages, weekly trends, or intraday averages depending on the active timeframe. The 200-period simple moving average dynamically shi

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Key Moving Averages

LabelHelper

by Electrified-Trading
2 stars

This library provides utility functions for managing labels on a TradingView chart. It allows creating labels at the last bar with specified levels, text, colors, and sizes. The refreshXPos function updates the x position of existing labels with optional bar o

Library v5 Support & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of LabelHelper

Z-Score Highlighter

by ryangaraygay
2 stars

Calculates the Z-score of closing prices over a specified moving average period and standard deviation length. It identifies potential statistical outliers by checking if the Z-score breaches positive or negative threshold levels during a user-configurable tra

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · MIT GitHub repository of Z-Score Highlighter

MACD Cross Strategy

by Web3Degenerate
2 stars

This strategy generates buy and sell signals on the price chart using MACD crossovers. It applies an EMA 200 filter requiring price to trade above or below the EMA. Only the first MACD crossover is used after the filter condition is met. Stop loss is calculate

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD Cross Strategy

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and pivot levels on the price chart. It draws HTF candle bodies and optional wicks or hollow fills, plus vertical time-division lines. Labels can show the timeframe, an average, the weekday, and a TD sequential

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots
2 stars

This strategy identifies reversal points using large and additional fractals on the price chart. It detects breaks of fractal levels and plots post-break ranges along with retest lines and signals. Entries occur on retest signals, with pyramiding allowing mult

Strategy v4 Support & resistanceBreakout
Updated 4 years ago · MIT GitHub repository of Order Fractals strategy V3

Kalman vs EMA

by jayadevrana
1 stars

This indicator overlays two smoothed price lines on the chart for comparison. A one-dimensional Kalman filter estimates the current price state and velocity, adjusting based on process noise Q, measurement noise R, and velocity noise qvIn. An EMA of user-defin

Indicator v6 Moving averagesTrend
Updated 2 days ago · MPL-2.0 GitHub repository of Kalman vs EMA

SMC Draw

by skipp-dev
1 stars

This Pine Script v6 library provides drawing wrappers for smart-money chart objects. It exports types for labels, lines and boxes, plus default style arguments and factory methods that build chart points from a bar index or a bar time. Callers create, hide and

Library v6 Repaints
Updated 2 days ago · None stated GitHub repository of SMC Draw

Elder Ray Index

by pineforge-4pass
1 stars

Calculates Elder Ray Bull Power and Bear Power by measuring differences between price extremes and an exponential moving average. It takes long entries during an uptrend when Bear Power is negative but rising, and short entries during a downtrend when Bull Pow

Strategy v6 Oscillators & momentumTrend
Updated 5 days ago · Apache-2.0 GitHub repository of Elder Ray Index

P Err Continuation 4spaces

by GammaExpansion
1 stars

This indicator calculates the maximum of the close and open prices using the math.max function for each bar. It plots the resulting value as a line in a separate pane below the price chart. The script has no input settings and produces no trading signals, entr

Indicator v6
Updated 5 days ago · MIT GitHub repository of P Err Continuation 4spaces

DEPV2 B2 · DEVISSO RATIO

by YuceSezar89
1 stars

This indicator plots a Devisso ratio in a separate pane and is meant to run on the daily chart. It accumulates signed close-to-close percent changes into a running total, applies RSI to that total, then takes the absolute change in RSI divided by the change in

Indicator v6 Oscillators & momentum
Updated 11 days ago · None stated GitHub repository of DEPV2 B2 · DEVISSO RATIO
1 stars

Fractal Spiral draws a geometric spiral in a separate pane and marks price-line crossings against detected swing fractals. It searches a chosen number of bars for up and down fractals, then builds a Golden, Archimedean, or logarithmic spiral around a user-set

Indicator v6 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Fractal Spiral{Morindok}

OHLC Demo

by Alaamo7
1 stars

This script is a basic OHLC demo indicator written in Pine Script version 6. It plots the closing price of the current symbol on a separate pane below the main price chart. Additionally, it displays trading volume in another pane. This educational example help

Indicator v6 Volume
Updated 2 months ago · Custom licence GitHub repository of OHLC Demo
1 stars

This TradingView strategy detects directional trades on the price chart using multiple entry triggers including TMA-Crossing, Breakout, and VWAP-Crossing with price types like Close or Open. It applies optional logical combinations of triggers and enforces tim

Strategy v6 TrendBreakout
Updated 3 months ago · None stated GitHub repository of STT Trade Plan Directional
1 stars

This indicator marks price imbalances on the chart as boxes. It can show fair value gaps, opening gaps, and volume imbalances, each with separate bullish and bearish colors. Optional minimum-width filters accept points, a percentage, or ATR, and each type can

Indicator v5 SMC / ICT / price actionVolume
Updated 4 months ago · None stated GitHub repository of Imbalance Detector [LuxAlgo]

KLSE VCP Stage v2

by kevinesk
1 stars

This indicator classifies market structure into volatility contraction pattern (VCP) stages on the main price chart. It evaluates a Mark Minervini Trend Template score alongside Bollinger Band width percentiles and volume metrics to determine stages such as Co

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of KLSE VCP Stage v2
1 stars

This strategy calculates a rolling price-change momentum score using a custom iterative loop function combined with exponential moving averages. It measures net price movement across six bars alongside a 9-period and 21-period EMA crossover. Long positions are

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of Block Function Loop Score

Trend Surfer

by gabriel-klettur
1 stars

Trend Surfer is a multi-timeframe trend-following indicator overlay. It calculates short and long Exponential Moving Averages from a configurable higher timeframe to determine the main market trend direction. The indicator highlights current-interval RSI overb

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Trend Surfer
1 stars

Strong Trending - Momentum Rider is a trend-following strategy designed for intraday and swing trading. It evaluates market strength using a composite momentum score based on exponential moving averages, the Directional Movement Index (DMI/ADX), candle body ra

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Strong Trending - Momentum Rider
1 stars

UnizonesAlgo identifies and plots higher-timeframe supply and demand zones on the main price chart using pivot highs and lows. It generates trade signals when price reaches a zone, demonstrates rejection, and receives confirmation from volume exceeding a movin

Indicator v5 Support & resistanceVolatility & bands Repaints
Updated 8 months ago · None stated GitHub repository of UnizonesAlgo (Universal Zones)
1 stars

Expected Price with BTC Pair calculates a theoretical price by multiplying the selected price source of the current chart symbol by the price source of a specified benchmark symbol, defaulting to Bitcoin (BTCUSD). It requests security data for the reference sy

Indicator v5
Updated 1 year ago · None stated GitHub repository of Expected Price with BTC Pair

Hello World

by fiji-solutions
1 stars

This educational indicator demonstrates built-in Pine Script string manipulation functions. On the latest bar, it generates text labels directly on the price chart displaying formatted closing prices. In a separate indicator pane, it plots constant numerical v

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

This indicator calculates a Stochastic Momentum Index and is set to draw in a separate pane. It finds the highest high and lowest low over the Percent K length, measures the close against the midpoint of that range, and smooths both the relative distance and t

Indicator v4 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of UCS Stochastic Momentum Index

Volume Divergence+

by krosenfeld7
1 stars

This indicator detects divergences between price highs and lows and those of the Price Volume Trend (PVT) line. It plots the PVT on the price chart and identifies bullish and bearish divergences based on user-selected lookback periods for price and PVT pivots,

Indicator v4 DivergenceVolume
Updated 3 years ago · Apache-2.0 GitHub repository of Volume Divergence+

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