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

SPX Gamma (DTE:55)

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 about fifty-five days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced o

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

Asian Session Range

by Ahmed1926
1 stars

A Pine v4 overlay that draws the Asian session range as a box with high, low and midline levels that extend to a chosen time, using Eastern time hours. It can also show a London session box with its range in pips. Start and end hours, line extension time, colo

Indicator v4 Sessions & timeSupport & resistance Repaints
Updated 9 months ago · None stated GitHub repository of Asian Session Range

ES Alpha (Logic Fix)

by knectardev
1 stars

This strategy tracks the opening 1-minute range during regular market hours and trades the subsequent breakout on the price chart. It locks the high and low of the 09:30 to 09:31 session and plots both levels as trigger lines. A long position is taken if price

Strategy v5 BreakoutSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Alpha (Logic Fix)
1 stars

Target Trend is a trend-following overlay indicator that determines market direction using ATR-adjusted simple moving average bounds. It calculates upper and lower channel boundaries based on SMA calculations of high and low prices offset by a smoothed ATR val

Indicator v5 TrendSupport & resistance
Updated 9 months ago · None stated GitHub repository of Target Trend [BigBeluga]
1 stars

A chart-overlay indicator that detects pivot highs and lows and draws extended trendlines through the latest pairs, keeping only lines steeper than a minimum angle and limiting the total number. Resistance and support pivots can be labelled R and S. A table su

Indicator v5 Support & resistanceTrend
Updated 9 months ago · None stated GitHub repository of Ultimate Auto Trendlines

Wonder2

by turnupdigital
1 stars

An indicator on the price chart that builds smoothed average prices from a Heikin Ashi style open, high, low and close, then compares a smoothed close with a smoothed open. Green or red shading marks which is higher, and a buy or sell triangle appears when the

Indicator v5 Trend
Updated 1 year ago · None stated GitHub repository of Wonder2

Bars per Day

by ivansoft
1 stars

This indicator calculates and plots the total number of bars that occurred during the previous day. It tracks daily boundaries by detecting changes in the day of the month, continuously counting bars between transitions. Whenever a new day begins, it stores th

Indicator v6 Sessions & time
Updated 1 year ago · None stated GitHub repository of Bars per Day

[Z] Moving Average

by zhuzp98
1 stars

This indicator calculates and plots eight separate moving averages directly on the price chart. It provides seven Simple Moving Averages with default periods of 5, 10, 20, 30, 60, 120, and 200, alongside one 20-period Exponential Moving Average. Each moving av

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of [Z] Moving Average

Higher Close and Lower Close

by fiji-solutions
1 stars

Higher Close and Lower Close is an overlay indicator that highlights simple single-candle price action signals. It monitors whether the current bar closes above the preceding bar's high or below the preceding bar's low. When a close exceeds the previous high,

Indicator v5 Candlestick patternsBreakout
Updated 2 years ago · None stated GitHub repository of Higher Close and Lower Close
1 stars

This indicator plots the 14-period simple moving average on the price chart. It defines functions that detect crossovers in the SMA line with price, RSI crossing 70 and 30 levels, and momentum line crossing zero. When these conditions occur, the script sends a

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Alert with Multiple Indicators

Bjorgum MTF MA

by nvFede
1 stars

A Pine v4 overlay that draws up to three moving averages, each with its own type, length, optional timeframe and colours. Available types include EMA, HMA, WMA, DEMA, VWMA, VWAP, T3 and others. A length of zero disables an average. Lines and bars can be colour

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Bjorgum MTF MA

Grid Level

by JohnsonHsiao
1 stars

This indicator constructs a grid of upper and lower price levels centered around a Simple Moving Average baseline. It calculates ten upper bands and ten lower bands spaced evenly at step multipliers defined by the grid gap percentage. These bands are plotted d

Indicator v5 Support & resistanceMoving averages
Updated 3 years ago · None stated GitHub repository of Grid Level
1 stars

A separate-pane version of the Directional Movement Index. It plots the ADX line together with the plus and minus directional indicator lines, using the same Wilder style smoothing as the standard tool. The area between the plus and minus lines is filled with

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Directional Movement Index

Fast EMA

by tseitz
1 stars

A Pine v4 strategy that plots a very fast two-period EMA of the close in orange on the price chart. It goes long whenever the EMA is above its previous value and short whenever it is below, closing the opposite side, so it flips direction as the slope changes

Strategy v4 Moving averagesScalping Repaints
Updated 4 years ago · None stated GitHub repository of Fast EMA
948 stars

The Ahrens Moving Average calculates a smoothed trend-following line using a recursive formula that factors in both the immediate previous average and a historical average value. It plots directly on the main price chart as a continuous overlay. When color hig

Indicator v4 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Ahrens Moving Average
575 stars

This multi-timeframe indicator calculates and draws key technical levels directly on the main price chart. It projects pivot points, support and resistance lines, and previous high/low boundaries across three configurable timeframes such as daily, weekly, and

Indicator v5 Support & resistance Repaints
Updated 1 year ago · MPL-2.0 GitHub repository of Magnetic Zones - Multi Timeframe
330 stars

Trend EMA + RSI is a trend-following strategy that generates trading signals using three exponential moving averages and RSI filter conditions. Long trades execute when a fast EMA crosses above a slow EMA while remaining above a long-term baseline EMA on a bul

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Trend EMA + RSI [Alorse]

ADSK Tracker

by Allen1212
303 stars

This script plots historical buy and sell transactions made by ARK Invest for Autodesk Inc (ADSK) directly on the price chart using labels anchored to specific timestamps. Each label indicates a buy or sell action along with the number of participating ARK ETF

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

Function - Forecast Linear

by ricardosantos79
261 stars

This script provides helper functions to calculate linear forecasts based on series data, mirroring standard spreadsheet forecast functionality. It converts price series into arrays over specified sample lengths and computes the predicted future value using si

Indicator v5
Updated 4 years ago · None stated GitHub repository of Function - Forecast Linear
257 stars

The ESH2023 5M strategy is a Pine Script v5 indicator for E-mini S&P 500 futures trading on the 5-minute chart. It calculates a Stochastic oscillator from Ichimoku cloud high/low averages using inputs for K period, D period, and smoothing. The script signals l

Strategy v5 Oscillators & momentumBreakout Repaints
Updated 6 weeks ago · None stated GitHub repository of ESH2023 5M - No repaint V1.1

Quantity Quality Commitment

by harryguiacorn
219 stars

The Quantity Quality Commitment indicator evaluates market momentum across three dimensions in a separate chart pane. It measures quantity by counting bullish and bearish candles over a lookback window, assesses quality by analyzing the ratio of candle bodies

Indicator v4 Oscillators & momentumCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Quantity Quality Commitment
219 stars

This indicator marks swing highs and lows on the price chart. It treats a bar as a high or low when its high or low equals the extreme across a window of bars on both sides. Persistent variables store the latest confirmed high and low. When a new high appears,

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

This indicator plots dynamic support and resistance levels on the price chart. It detects pivot highs and lows using the pivot length and tracks touches to build strength-based levels. Support and resistance zones appear as colored boxes while lines mark key l

Indicator v6 Support & resistanceBreakout
Updated 3 months ago · None stated GitHub repository of Dynamic Support & Resistance

EMA Strategy

by capissimo
114 stars

Calculates a central Exponential Moving Average with upper and lower channel bands offset by a fixed pip distance, inspired by LazyBear's Pip Collector script. Generates buy and sell signals when price interacts with the envelope bands, with an optional ATR vo

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Strategy

This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 5min Williams Fractals Scalping (3commas)
99 stars

This indicator calculates and plots the bar average price directly on the main price chart. It evaluates the arithmetic mean of each bar's open, high, low, and close values, matching standard TA-Lib average price implementations. The script contains no user-co

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of AVGPRICE: Average Price

Example 2

by be-thomas
65 stars

This indicator calculates a normalized percentage oscillator based on the distance between the closing price and a 10-period simple moving average. It displays the oscillator line alongside a dotted zero reference line in a separate indicator pane. The space b

Indicator v5 Oscillators & momentumMoving averages
Updated 5 days ago · GPL-3.0 GitHub repository of Example 2

RSI [SystemAlpha]

by iamc1oud
56 stars

This indicator plots a standard Relative Strength Index (RSI) in a separate pane alongside customizable overbought and oversold threshold levels with shaded fills. It identifies pivot highs and lows on the oscillator to detect regular and hidden bullish and be

Indicator v4 Oscillators & momentumDivergence Repaints
Updated 2 months ago · None stated GitHub repository of RSI [SystemAlpha]

SuperTrend & Pivots

by dcaoyuan
55 stars

This overlay indicator plots a SuperTrend line on the price chart using a fixed ATR length of 10 and a factor of 3. When the trend direction is up it draws a green line and a light green fill toward the candle midpoint; when down it draws a red line and a ligh

Indicator v6 TrendVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of SuperTrend & Pivots
47 stars

This indicator calculates and plots the cumulative arithmetic mean of a selected price series from the very beginning of the chart history. It continuously sums non-null values and divides by the total count of valid bars seen so far. The user can adjust the i

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of Cumulative Mean (CUMMEAN)
46 stars

This indicator overlays higher-timeframe candles, price traces, fair value gaps, and liquidity sweeps directly on the main price chart. It projects key high, low, open, and close levels using customizable trace lines to monitor structural reference points. As

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Sweep · CISD · FVG · Key Levels

No Repaint - MACD

by dearvn
43 stars

This indicator plots a MACD oscillator in a separate pane. It calculates the source as the average of the previous ten open prices, then subtracts a slow moving average from a fast moving average. A signal line and a histogram follow. Fast, slow, and signal le

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of No Repaint - MACD

Bollinger Bands

by TWODS-CAPITAL
37 stars

This indicator calculates and plots standard Bollinger Bands directly on the price chart. It computes a central basis line using a simple moving average of the selected price source over a user-defined period. Upper and lower bands are constructed by adding an

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · MIT GitHub repository of Bollinger Bands

Zen ATH Bands

by Zen-Tim
29 stars

Zen ATH Bands calculates the all-time high or current price of an asset and projects horizontal reference lines representing percentage pullback levels. It draws up to seven user-defined drawdown thresholds below the baseline, complete with custom price and pe

Indicator v5 Support & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen ATH Bands

Stochtaker

by benso87
24 stars

Stochtaker combines a Stochastic oscillator and Bollinger Band Width Percentile (BBWP) into a single separate pane indicator. It calculates BBWP across a configurable lookback period and length, displaying volatility conditions using a dynamic color spectrum o

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 years ago · MPL-2.0 GitHub repository of Stochtaker

This strategy trades Donchian breakouts on the price chart and sizes each unit from a percentage of equity. It allows long and short entries, places an ATR initial stop, trails with a chandelier stop, and can add units as price moves by a multiple of ATR, up t

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 24: Vol-Adjusted Targets

Divergenced H002

by ruckard
13 stars

Divergenced H002 is an automated trading strategy designed to identify divergence setups using transitions in the Squeeze Momentum Indicator combined with Curie moving average closing lines for exit conditions. It detects bearish divergence when momentum weake

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced H002

WE:TDI/STOCH

by davro
10 stars

This indicator plots three stochastic oscillators and a Traders Dynamic Index in a separate pane. Stochastic periods of 15, 32 and 50 each draw a K and D line that turns green below 18 and red above 82. A background band turns green when all six lines are over

Indicator v4 Oscillators & momentum
Updated 5 years ago · None stated GitHub repository of WE:TDI/STOCH

Commodity Heat Reversal plots score-based mean-reversion reversal markers on the price chart for commodity futures, aimed at the four-hour timeframe. It builds separate long and short heat scores from ATR distance to a mean moving average, ATR expansion, RSI e

Indicator v6 Mean reversionVolatility & bands
Updated 2 days ago · MIT GitHub repository of Commodity Heat Reversal [WavesUnchained]

This indicator automatically maps the current chart timeframe to an aligned higher timeframe to detect and draw ICT-style Fair Value Gaps (FVGs). It identifies bullish and bearish price imbalance zones and displays them as colored overlay boxes directly on the

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of TehThomas - Aligned Timeframe Fair Value Gaps

VWAP Bounce - Eterna

by EternaHybridExchange
9 stars

This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in

Strategy v5 Mean reversionTrend
Updated 7 months ago · MIT GitHub repository of VWAP Bounce - Eterna

This indicator plots optional exponential and simple moving averages plus five fixed simple averages and one Hull moving average on the price chart. The optional EMA and SMA change color with slope: green when rising, red when falling, and blue when flat. The

Indicator v4 Moving averages
Updated 4 years ago · None stated GitHub repository of Moving Average Colored EMA/SMA

Heikin Ashi Delta Smoothed

by lunarticktrading
7 stars

This indicator calculates the difference between Heikin-Ashi close and open values to quantify directional candle spread. It smooths this delta value using a simple moving average and plots the resulting oscillator as a line in a separate pane. Traders can cus

Indicator v6 Oscillators & momentumCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Heikin Ashi Delta Smoothed
7 stars

This indicator combines a fast and slow exponential moving average crossover, an RSI filter, and a volume flow indicator into a weighted directional score. It draws an on-chart dashboard for those components and can plot buy or sell arrows when the score meets

Indicator v6 Screeners & dashboardsMoving averages
Updated 3 months ago · None stated GitHub repository of Scalping 3-Signal Dashboard v2

DCA Simulator

by suyons
7 stars

This strategy simulates a dollar-cost averaging investment approach directly on the price chart. It executes a long entry with a fixed cash amount on every historical bar that falls within a user-defined date window. All accumulated open positions are closed s

Strategy v5
Updated 4 months ago · None stated GitHub repository of DCA Simulator
7 stars

This strategy executes breakout trades based on price channels and moving average trend alignment. It enters long positions when the closing price breaks above its 20-period high while trading above a 130-period simple moving average. Short positions enter whe

Strategy v5 BreakoutTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Weekly Break out Strategy
6 stars

This indicator plots session boxes, high-low ranges, and optional open lines for Asia, London, and New York sessions on the price chart. It detects breakouts when price crosses the prior session range. Inputs let users toggle visibility of boxes, open lines, b

Indicator v6 Sessions & time
Updated 8 weeks ago · MIT GitHub repository of Capital41 Session Flow Simple v2

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