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

Time Machine Pro

by morindok
1 stars

Time Machine Pro is an overlay drawing tool that reflects historical price between two user-selected price levels and two times. It measures green and red candle distances by sum, simple average, or volume-weighted average, then plots spirals or vertical lines

Indicator v5 Support & resistanceVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Time Machine Pro

NSTG-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell dates for NSTG on the price chart. It places red sell labels above bars and green buy labels below bars, with text that counts how many selected ETFs traded that day. An ETF input switches between ARKG

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of NSTG-tracker

Av3

by hasnocool
106 stars

Av3 is a price-chart strategy that compares the current seven-period ATR with the average of the previous five ATR values. When ATR is above that average it buys if the open is above the prior close and sells if the open is below it; when ATR is below the aver

Strategy v4 Volatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Av3
99 stars

Min-Max Normalization rescales a price series or input source into a bounded range between 0 and 1 using rolling minimum and maximum values over a designated lookback period. It plots the normalized output as a line indicator in a separate chart pane. Users ca

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Min-Max Normalization (NORMALIZE)

Volume

by be-thomas
65 stars

This indicator plots trading volume as a column chart in a separate pane with dynamic gradient coloring. It assigns distinct colors for bullish and bearish price bars based on whether the close is above the open. The transparency of each column dynamically adj

Indicator v4 Volume
Updated 5 days ago · GPL-3.0 GitHub repository of Volume

Pivot Trendlines

by g-moe
3 stars

This strategy overlays two SMA lines with a cloud fill to show trend direction. It detects band reversals with Bollinger Bands and uses RSI for mean-reversion signals. Long entries trigger when the trend is bullish, price touches the lower band, and RSI is bel

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
2 stars

This indicator renders an analog and digital world clock in a separate pane. It calculates local time across global cities based on UTC offsets and configurable daylight saving time options. Users can choose specific time zones, adjust text sizes, and toggle d

Indicator v5 Sessions & time Repaints
Updated 8 months ago · None stated GitHub repository of Analog/Digital World Clock by DGT
1 stars

This session-based strategy triggers long entries at the start of the New York trading session when trend and momentum conditions align. It calculates a 38-period Exponential Moving Average and a 14-period RSI. A long position is taken at session open if the c

Strategy v6 Sessions & timeTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Borough New York Session
1 stars

Time Machine is an overlay indicator that calculates historical price reflections using Fibonacci levels, SMA variants, Bollinger Bands, VWAP, and spiral spine methods. It plots symmetric price lines around dashed levels and dynamic indicator lines, plus area

Indicator v5 Support & resistanceMean reversion
Updated 7 weeks ago · None stated GitHub repository of Time Machine{Morindok}

NTDOY Tracker

by Allen1212
303 stars

NTDOY Tracker overlays historical buy and sell transactions made by ARK Invest funds on the price chart for Nintendo Co., Ltd. (NTDOY). It places visual labels at specific historical timestamps indicating trade activity and the count of participating ARK ETFs.

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

This strategy implements the B-Xtrender indicator, calculating short-term and long-term momentum oscillators using RSI applied to moving average spreads and smoothings. It plots the momentum oscillators as colored histograms in a separate pane. Trades are filt

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of B-Xtrender [Backtest Edition] @QuantTherapy
99 stars

This indicator calculates and plots the Minus Directional Indicator (-DI) in a separate pane to measure downward price movement. It computes negative directional movement and true range using Wilder's smoothing with warmup compensation, ensuring stable values

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Minus Directional Indicator (-DI)

Zig Zag

by be-thomas
65 stars

Calculates and plots a ZigZag indicator directly on the price chart to highlight significant high and low pivot points. The script identifies local pivot highs and lows using a custom loop mechanism based on the depth setting, then connects them with drawing l

Indicator v4 TrendSupport & resistance Repaints
Updated 5 days ago · GPL-3.0 GitHub repository of Zig Zag

Pivot Trendlines

by g-moe
3 stars

Pivot Trendlines is an indicator that plots horizontal support and resistance lines along with trendline support and resistance based on swing pivots of customizable lengths. Three separate groups allow adjustment of pivot length to draw multiple horizontal li

Indicator v5 Support & resistanceTrend
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines

Andean Oscillator

by regalouisei
2 stars

The Andean Oscillator measures trend strength by calculating distinct bullish and bearish components using modified exponential envelopes applied to open and close prices. It computes variance-like metrics to estimate directional volatility and tracks momentum

Indicator v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Andean Oscillator
1 stars

The Cadence Matrix Pairing strategy calculates price direction changes and volume confirmation across short, medium, and long horizons using close comparisons and simple moving averages of volume. It assembles these binary votes into a transposed matrix and ta

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Cadence Matrix Pairing

TMoon Mirror

by morindok
1 stars

TMoon Mirror plots a dynamic moving average line on the price chart that decays in length according to user-defined time ranges. It mirrors this line around a central level and plots top, middle, and bottom horizontal lines for support and resistance. An optio

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of TMoon Mirror

NU-tracker

by Allen1212
303 stars

NU-tracker plots historical ARK Invest buy and sell events for the NU stock on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed dates from late 2021 into early 2022 in the shown code. Each label marks

Indicator v4
Updated 2 years ago · None stated GitHub repository of NU-tracker
106 stars

Backtest Custom HiLo Strategy overlays a high-low trailing line on the price chart calculated from moving averages of highs and lows. It establishes upper and lower bounds using simple or exponential moving averages along with optional period extremes. Signal

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Backtest Custom HiLo Strategy
99 stars

Calculates and plots the Minus Directional Movement (-DM) component of J. Welles Wilder's directional movement system. It measures downward price momentum by comparing the current low to the previous low and applying Wilder's RMA smoothing with warmup compensa

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Minus Directional Movement (-DM)

Pivot Trendlines

by g-moe
3 stars

The Pivot Trendlines indicator identifies swing highs and lows on the chart to form support and resistance levels. It plots these levels as markers and draws trendlines connecting them. Buy and sell signals activate when the price breaks beyond a set percentag

Indicator v5 Support & resistanceBreakout
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
1 stars

This strategy calculates a fast EMA, a slow EMA, and an ATR value to implement a trend-following trading model with cash position sizing. It enters long trades when the fast EMA crosses above the slow EMA. Positions are exited when the fast EMA crosses below t

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Cashflow Cash Costs

NUVA-tracker

by Allen1212
303 stars

NUVA-tracker visualizes historical buy and sell transactions executed by ARK Invest on NuVasive (NUVA). It plots informational labels directly on the main price chart at historical timestamps, displaying transaction type and the number of participating ARK ETF

Indicator v4
Updated 2 years ago · None stated GitHub repository of NUVA-tracker
106 stars

This strategy calculates a custom Signal-to-Noise ratio derived from logarithmic aggregation of inverse close prices and compares it against a Simple Moving Average. It plots both lines in a separate pane and alters price bar colors based on signal direction.

Strategy v4 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Backtest Signal To Noise

Mode

by mihakralj
99 stars

Mode calculates the most frequent value of a chosen source series over a lookback period and plots that value in a separate pane. The source defaults to close and the period defaults to 14. On each bar it counts non-missing values inside the available window,

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mode

Pivot Trendlines

by g-moe
3 stars

This indicator plots supply and demand zones along with pivot-based trendlines on the price chart. It detects swing highs and lows to form trendlines and overlays three customizable zones with adjustable lengths and timeframes for multi-timeframe analysis. Mai

Indicator v5 Support & resistanceTrend Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
1 stars

The PineForge Compass Partial Ladder strategy identifies trend-following opportunities using a fast and slow Exponential Moving Average (EMA) crossover. Upon entering a long position, the strategy manages risk and profit targets using Average True Range (ATR)

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Compass Partial Ladder

Two Tangent Circles

by morindok
1 stars

The script plots two closed polylines on the price chart representing tangent circles. It takes two user-defined points defined by time and price inputs to calculate the direction and distance between them. Centers of two circles with radii one-quarter of thos

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Two Tangent Circles

NVMI-tracker

by Allen1212
303 stars

This indicator plots ARK Invest purchase and sale labels for NVMI on the price chart. It marks dated trade events with buy or sell text and a count of how many ARK ETFs acted that day. The ETF input chooses which fund records to show, though this file only off

Indicator v4
Updated 2 years ago · None stated GitHub repository of NVMI-tracker
106 stars

This strategy simulates a 3Commas dollar-cost averaging (DCA) bot directly on the price chart. It opens long or short deals based on configurable conditions such as immediate execution, RSI-7 thresholds, or TradingView technical presets. As price moves against

Strategy v4 Oscillators & momentumMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Backtesting 3commas DCA Bot v2

Modular Filter (MODF)

by mihakralj
99 stars

Modular Filter (MODF) calculates and plots an adaptive dual-path smoothing filter on the main price chart. Based on work by alexgrover, it computes upper and lower EMA bands that snap to price extremes and maintain a bullish or bearish state. The beta paramete

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Modular Filter (MODF)

Pivot Trendlines

by g-moe
3 stars

The Pivot Trendlines strategy identifies swing pivots on the price chart using a configurable swing lookback period and draws trendlines connecting these pivots. It generates buy and sell signals based on three-move patterns with user-defined move sizes, filte

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
2 stars

Calculates the statistical likelihood of price reaching multiple percentage-spaced breakout levels above and below the current price. It renders horizontal lines with percentage probability labels directly on the price chart and maintains a summary dashboard i

Indicator v5 BreakoutSupport & resistance
Updated 8 months ago · None stated GitHub repository of Breakout Probability (Expo)
1 stars

PineForge — Constellation Bands is a mean-reversion strategy displayed on the price chart. It calculates standard Bollinger Bands alongside price volatility. A long entry triggers when the close price crosses back above the lower band while remaining below the

Strategy v6 Mean reversionVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Constellation Bands

Universal System

by morindok
1 stars

Universal System plots geometric logarithmic spirals based on the golden ratio directly on the price chart. The indicator gathers price range data between two user-defined anchor timestamps, accumulating bullish and bearish price movement sums. On the final ba

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Universal System

NVS Tracker

by Allen1212
303 stars

NVS Tracker overlays historical buy and sell transactions executed by ARK Invest for Novartis (NVS) directly onto the main price chart. It renders colored visual labels below or above price bars corresponding to specific trade dates, indicating whether ARK fun

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

BarUpDn Long Strategy

by hasnocool
106 stars

BarUpDn Long Strategy executes long trades based on price bar directional movements and previous bar closes. It places a long stop order above the current high when a bullish candle opens above a prior close. Because short entries are restricted to exiting lon

Strategy v4 Candlestick patternsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BarUpDn Long Strategy

Momentum (MOM)

by mihakralj
99 stars

This indicator calculates momentum as the difference between the selected source and the same source a set number of bars earlier, measuring the rate of price change. It plots a single MOM line in a separate pane. Length sets the lookback, with a minimum of on

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Momentum (MOM)

Pivot Trendlines

by g-moe
3 stars

The Pivot Trendlines indicator detects swing pivot highs and lows on the price chart using a user-defined pivot length. It identifies small pivots when they occur and large pivots when price breaks through the recent opposite small pivot. Labels for small pivo

Indicator v5 Support & resistanceSMC / ICT / price action Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines

CAGR Custom Range

by regalouisei
2 stars

CAGR Custom Range calculates the compound annual growth rate between two user-selected times on the chart. It captures the close at each point, passes those prices and times to TradingView's cagr function, and draws a connecting line colored by whether the lat

Indicator v5
Updated 8 months ago · None stated GitHub repository of CAGR Custom Range
1 stars

This strategy uses RSI with bull and bear threshold crossovers to trade opposite market pairs. It enters long when RSI crosses above 58 and short when below 42, automatically closing the opposite position first. Entry size is 8 percent of equity with 0.05 perc

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Crosscurrent Market Pair

NXPI-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell transactions for NXP Semiconductors (NXPI) directly onto the price chart. It plots green labels below the bars for purchase days and red labels above the bars for sale days, including indicators for tr

Indicator v4
Updated 2 years ago · None stated GitHub repository of NXPI-tracker

BarUpDn Strategy

by hasnocool
106 stars

The BarUpDn Strategy triggers trades based on candle price direction relative to a past bar. It enters a long position with a stop order above the high when the current candle closes above its open and its open is higher than the close of a specified lookback

Strategy v4 Candlestick patternsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BarUpDn Strategy

The MACD indicator calculates the difference between two exponential moving averages with fast and slow periods to identify momentum shifts in the market. It plots the MACD line, signal line, and histogram bars in a separate pane below the price chart. The his

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Moving Average Convergence Divergence (MACD)

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