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

Average Daily Range (ADR)

by mushroom-men-Trading
2 stars

This indicator calculates the range of each bar as high minus low and smooths those ranges into an average daily range. The user chooses a lookback length and a smoothing method: simple, exponential, or weighted moving average. It plots the resulting value as

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

Hulk Grid Algorithm V2 is a grid trading strategy designed for price charts. It establishes ten distinct grid levels around a user-defined mid price, spaced apart by a fixed dollar grid step. The strategy places long limit orders across these levels with scale

Strategy v5 Support & resistanceMean reversion Repaints
Updated 1 year ago · None stated GitHub repository of Hulk Grid Algorithm V2 - The Quant Science

Zebra Week

by etnt
2 stars

Zebra Week paints alternating background stripes on the price chart so consecutive time periods are easier to see. On a daily chart it shades even weeks; on a 15-minute chart it shades every other trading day using the week number and weekday. A single toggle

Indicator v6 Sessions & time
Updated 1 year ago · MPL-2.0 GitHub repository of Zebra Week

QQE MOD

by iceberg211
2 stars

QQE MOD is a separate-pane oscillator that builds two smoothed RSI-based QQE trails. The primary trail uses a fast factor and Bollinger bands around the centered line; the secondary trail uses a smaller factor and a fixed threshold. It plots the secondary QQE

Indicator v4 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of QQE MOD

DailyLevels

by Electrified-Trading
2 stars

DailyLevels library supplies functions to fetch open, high, low and close values from daily bars using a daysPrior parameter. It supports daily and intraday charts while respecting session boundaries to prevent lookahead bias. The library tracks session start

Library v5 Support & resistanceSessions & time
Updated 1 year ago · MPL-2.0 GitHub repository of DailyLevels

PIN BAR

by ryangaraygay
2 stars

The PIN BAR indicator identifies strong and weak pin bar candlestick patterns, including hammers and shooting stars, directly on the price chart. It evaluates pattern validity using major and minor wick-to-bar ratios, ATR volatility filters, volume thresholds,

Indicator v5 Candlestick patterns
Updated 1 year ago · MIT GitHub repository of PIN BAR
2 stars

This strategy enters long when price closes above the prior channel high and a longer EMA filter, the bar is bullish, volume rises versus the previous bar, and average volume and turnover clear set thresholds. It exits the long when price closes below a shorte

Strategy v5 BreakoutMoving averages
Updated 2 years ago · None stated GitHub repository of DegenerateChain Channel Breakout

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator plots higher-timeframe candles and pivot point levels directly on the main price chart. It visualizes multi-timeframe price action through custom candle bodies, wicks, and central pivot range zones. As an analytical overlay, it provides visual r

Indicator v5 Support & resistanceCandlestick patterns
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

ZigZag_Punches_OH_OL

by WISEPLAT
2 stars

This indicator calculates pivot highs and lows using a custom depth and deviation threshold to draw zigzag swing lines directly on the price chart. At each swing reversal, it plots labels displaying the reversal price, price change in absolute or percentage te

Indicator v5 Support & resistanceVolume
Updated 3 years ago · None stated GitHub repository of ZigZag_Punches_OH_OL
2 stars

This strategy combines Momentum, Chande Momentum Oscillator, and Commodity Channel Index alongside standard deviation Bollinger Band bounds. It calculates oscillator values across customizable timeframes and lengths to track market momentum and volatility in a

Strategy v4 Oscillators & momentumVolatility & bands Repaints
Updated 3 years ago · None stated GitHub repository of [CBB] MOM/CCI Divergence Strategy

Range Filter [DW]

by theupslidedown
2 stars

The Range Filter indicator filters out minor price fluctuations directly on the price chart to provide a clearer view of underlying market trends. Inspired by QQE volatility concepts, it calculates a smooth range using methods such as ATR, Average Change, Stan

Indicator v4 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Range Filter [DW]

CRUDE OIL BUY/SELL

by DaniilOkrug
2 stars

This overlay indicator plots a simple moving average on the crude oil chart and colors it according to RSI extremes and whether price sits above or below the average. It marks buy and sell labels when a prior bar crosses the average and the current candle conf

Indicator v4 Oscillators & momentumMoving averages Repaints
Updated 4 years ago · MIT GitHub repository of CRUDE OIL BUY/SELL

Supertrend

by mydcc
1 stars

Supertrend is a trend-following overlay indicator that computes dynamic trailing bands based on the Average True Range and price action. It calculates the standard Supertrend line using customizable ATR length and factor multiplier inputs. Green lines plot bel

Indicator v6 TrendVolatility & bands
Updated today · Custom licence GitHub repository of Supertrend
1 stars

This indicator draws the 5-minute closing price on the chart for multi-timeframe analysis. It takes the number of bars for prediction as an input and initializes an array of predictors with recent close prices. A matrix is prepared for heuristic logic but rema

Indicator v5 AI / machine learning

Engulfing Candles

by jayadevrana
1 stars

The Engulfing Candles indicator automatically identifies and highlights bullish and bearish engulfing candlestick patterns directly on the price chart. It checks whether the current bar fully wraps around the body of the previous bar and exceeds a customizable

Indicator v6 Candlestick patterns
Updated 2 days ago · MPL-2.0 GitHub repository of Engulfing Candles
1 stars

This library builds real-time Smart Money Concepts context frames on each bar. It derives StructureFrame using engine primitives for BOS, CHoCH, trend and S-R levels. ImbalanceFrame tracks FVG lifecycle, BPR overlap, liquidity void and zone-bias. ZoneFrame man

Library v6 SMC / ICT / price action
Updated 2 days ago · None stated GitHub repository of SMC Context Engine Private

Drawing UDT Alias Identity

by pineforge-4pass
1 stars

This strategy stores a line inside a user-defined type and keeps an alias to the same drawing. It plots an 18-period simple moving average as a line on the price chart and reads that line's end price back through the alias. When the level is ready, it enters o

Strategy v6 Moving averagesTrend
Updated 5 days ago · Apache-2.0 GitHub repository of Drawing UDT Alias Identity

I_vol

by GammaExpansion
1 stars

Plots a wide array of built-in Pine Script volatility calculations in a separate pane. It outputs true range variations, average true range across multiple periods, standard deviation, variance, mean absolute deviation, Bollinger Bands and Bollinger Bands Widt

Indicator v6 Volatility & bands
Updated 5 days ago · MIT GitHub repository of I_vol
1 stars

This reference script demonstrates multiple usage examples of Pine Script's request.security function. It plots higher-timeframe data directly on the price chart, including the daily close, weekly high and low levels, daily 20-period EMA, and the previous day'

Indicator v5 Support & resistanceMoving averages Repaints
Updated 5 days ago · None stated GitHub repository of request.security Örnekleri

Pivot Point SuperTrend

by kanylbullen
1 stars

This Pine Script strategy plots pivot points and a SuperTrend-style trailing line based on ATR and center line derived from pivots. It calculates trend direction and generates buy and sell signals on trend reversals. Signals are filtered by a user-selected mov

Strategy v5 TrendVolatility & bands Repaints
Updated 6 days ago · None stated GitHub repository of Pivot Point SuperTrend

DEPV2 A8 · Onay Makinesi

by YuceSezar89
1 stars

This indicator implements a multi-metric confirmation engine that validates trading signals across four core dimensions: trend level scores based on an HLC3 SMA, momentum z-scores derived from rate of change, volatility expansion ratios comparing fast and slow

Indicator v6 TrendOscillators & momentum
Updated 11 days ago · None stated GitHub repository of DEPV2 A8 · Onay Makinesi
1 stars

Calculates the WaveTrend oscillator using channel and average exponential moving averages alongside a simple moving average signal line in a separate pane. It plots the dual oscillator lines, their difference area, and configurable overbought and oversold thre

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 12 days ago · MPL-2.0 GitHub repository of Taught to Trade - WaveTrend Audit

Higher Close Demo

by Alaamo7
1 stars

Higher Close Demo is a Pine Script v6 teaching indicator drawn on the price chart. It checks whether the current close is greater than the previous close. When that condition is true, it plots a green upward triangle below the bar. The script has no user input

Indicator v6
Updated 2 months ago · Custom licence GitHub repository of Higher Close Demo

SCDTM - Unemployment Edition

by GreyssonEnterprises
1 stars

This overlay indicator tracks a multi-checkpoint setup built from trending exponential moving averages, Bollinger Band percent B, and a stochastic RSI crossover. A three- or five-bar fractal marks an unconfirmed signal, then the script stores breakout prices,

Indicator v4 Oscillators & momentumVolatility & bands Repaints
Updated 2 months ago · MIT GitHub repository of SCDTM - Unemployment Edition

STT SR TMA Plan

by majohnst
1 stars

This strategy executes trades based on Triangular Moving Average (TMA) crossings, support and resistance structures, and breakout logic. It evaluates multiple confluence conditions including daily pivots, anchored VWAP, and multi-day moving averages alongside

Strategy v6 Moving averagesTrend
Updated 3 months ago · None stated GitHub repository of STT SR TMA Plan

SMC Strategy

by mrdungx2603
1 stars

This Smart Money Concepts (SMC) strategy identifies market structure, order blocks, imbalances, and premium or discount zones directly on the price chart. It executes long trades in discount zones and short trades in premium zones based on order block retests,

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of SMC Strategy

KLSE Quality Overlay

by kevinesk
1 stars

The 8_KLSE_Quality_Overlay is a Pine Script v5 indicator that overlays quality grades on the price chart for KLSE stocks. It combines user inputs from KC Chong 8-Criteria, Cold Eye 8-Criteria, Tong Kooi Ong tiers, and Tradeview MONEY equation to assign grades

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 4 months ago · None stated GitHub repository of KLSE Quality Overlay

Trailing Call Comma

by Snappni
1 stars

This strategy plots a 12-period and a 26-period exponential moving average on the price chart. It enters long when the fast average crosses above the slow average and enters short when the fast average crosses below the slow average. Opposite signals reverse t

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Trailing Call Comma
1 stars

This strategy generates buy and sell signals on the SP500 4H chart using EMA crossovers confirmed by MACD, filtered by ADX trend strength, RSI levels, and active London or New York sessions. It plots EMA 9, EMA 21, and EMA 200 on the price chart. Buy signals e

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Señales EMA + MACD v4b [SP500 4H]

BTC ATH Scaling

by ymlee1104
1 stars

BTC ATH Scaling tracks the all-time high price and calculates the percentage drawdown from that peak. It displays a real-time label offset to the right of the latest price candle showing the ATH level, current price, and percentage drop. The label color dynami

Strategy v6 Support & resistanceScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of BTC ATH Scaling
1 stars

This strategy looks for mean-reversion entries when RSI crosses back through the oversold or overbought levels, or recovers from more extreme RSI readings. Optional divergence confirmation can require a price and RSI mismatch before entry. It opens one long or

Strategy v5 Mean reversionOscillators & momentum
Updated 7 months ago · None stated GitHub repository of RSI Extremes - Mean Reversion

Support & Resistance Levels

by haydarkadioglu
1 stars

This indicator automatically detects support and resistance levels using pivot point analysis on historical price data. It identifies potential resistance at pivot highs and support at pivot lows, storing up to the maximum number of unique levels (default 3 ea

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Support & Resistance Levels

RSGAlgo (Range/Support/Gap)

by Tradehook-org
1 stars

RSGAlgo identifies consolidation ranges, support and resistance pivot levels, and price gaps directly on the chart. It calculates range bounds using a percentage threshold over a custom lookback period and highlights consolidation zones with background colorin

Indicator v5 Support & resistanceBreakout
Updated 8 months ago · None stated GitHub repository of RSGAlgo (Range/Support/Gap)

EMA Crossover Strategy

by knectardev
1 stars

This strategy plots a fast and a slow exponential moving average on the price chart. It opens a long position when the fast EMA crosses above the slow EMA and closes that long when the fast EMA crosses back below. There is no short entry and no stop loss. Posi

Strategy v5 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of EMA Crossover Strategy

MACD-X by DGT

by webcrack4
1 stars

This indicator provides multiple MACD calculation methods including traditional, histogram, leader, and source-based variants. It plots the MACD line, signal line, and histogram on the price chart with SMA or EMA smoothing options. Crossover signals generate l

Indicator v5 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of MACD-X by DGT

Volume Spike Detector

by surajmateti
1 stars

The Volume Spike Detector is a separate-pane indicator designed to highlight unusually high trading volume. It calculates a simple moving average of volume over a user-defined length and flags a spike whenever the current volume exceeds this average multiplied

Indicator v5 Volume
Updated 11 months ago · None stated GitHub repository of Volume Spike Detector

New Strategy Template

by NakliTechie
1 stars

New Strategy Template provides a basic Pine Script v5 boilerplate structure for developing custom automated trading strategies. It includes pre-configured inputs for lookback period, source price, and trade position sizing, as well as conditional structures fo

Strategy v5
Updated 1 year ago · MIT GitHub repository of New Strategy Template
1 stars

This indicator calculates the MACD histogram from the fast and slow exponential moving averages. It plots the MACD line, signal line, and a histogram divergence column on a separate pane. The histogram divergence uses green columns for positive changes and red

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of [Z] MACD Hist Divergence

Hello world

by fiji-solutions
1 stars

This indicator requests external data from Quandl using the BCHAIN/CPTRV ticker and plots the resulting value as a line in a separate indicator pane. It functions as a basic educational example demonstrating how to retrieve external dataset series using the re

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

Squeeze Panel

by amico1234
1 stars

Squeeze Panel plots a volatility squeeze in a separate pane. It marks a squeeze when Bollinger Bands sit inside a Keltner Channel and marks when the bands expand outside it. The user chooses Money Flow Index or linear regression to color likely breakout direct

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Squeeze Panel

Stochastic Divergence+

by krosenfeld7
1 stars

This indicator calculates the Stochastic oscillator (%K and %D) and scans for divergences between price swings and oscillator swings. It detects pivot highs and lows on both price and the stochastic lines using user-defined lookback intervals and tolerance thr

Indicator v4 DivergenceOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Stochastic Divergence+
1 stars

The Detrending Net Distance Ratio indicator computes the difference between current close and close prices at ten different lookback periods ranging from seven to three hundred sixty bars. It sums the positive differences to create a net value and sums their a

Indicator v5 DivergenceMean reversion
Updated 3 years ago · None stated GitHub repository of Detrending Net Distance Ratio
1 stars

TRXBTC EMA Cross Strategy is a trend-following cryptocurrency strategy that executes trades based on single Exponential Moving Average price positioning and candle color. It plots a customizable EMA on the main price chart and triggers a long position when a b

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of TRXBTC EMA Cross Strategy
948 stars

The Quick Moving Average calculates a triangular-weighted moving average on the price chart. It plots the average line and can color it green when rising or pink when falling. Price bars and chart background receive matching colors based on slope. Settings con

Indicator v6 Moving averagesTrend
Updated 10 days ago · GPL-3.0 GitHub repository of Quick Moving Average

This indicator calculates and plots external range liquidity levels by identifying swing highs and swing lows across up to three configurable timeframes. Plotted directly on the main price chart, it highlights key pivot levels using high/low or open/close pric

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT External Range Liquidity Static Multi-timeframe (Swing High and Low)

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