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

Parabolic SAR

by g-moe
3 stars

Parabolic SAR is a price-chart strategy that reads Commodity Channel Index and Parabolic SAR values from four user-selected timeframes. It opens a long when every timeframe’s CCI is above the entry level and price is below every SAR, and it closes that long wh

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR

RSI Past

by regalouisei
2 stars

RSI Past is an indicator that plots the bar difference between the last overbought and oversold readings of a custom RSI. It calculates the distance in bars from the most recent time the RSI crossed above the overbought threshold to the last time it dropped be

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Past
1 stars

PF session-dst probe 01 - NY spring forward is a validation strategy designed to test session time calculation and Daylight Saving Time transition behavior. It evaluates the New York equity session hours from 09:30 to 16:00 in the America/New_York time zone. T

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF session-dst probe 01 - NY spring forward

NIU-tracker

by Allen1212
303 stars

NIU Tracker overlays historical ARK Invest buy and sell transactions for Niu Technologies directly on the price chart. It plots markers indicating share volume changes and the number of participating ARK funds on specific trading dates. Traders can filter tran

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

Atrend by OTS

by hasnocool
106 stars

Atrend by OTS combines MACD histogram crossovers, RSI threshold crosses, and an ATR-based trailing trend indicator on the main price chart. The strategy triggers long entries when the MACD signal delta crosses above zero or when RSI crosses above the oversold

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Atrend by OTS
99 stars

This indicator plots the rolling midpoint of the close as an overlay on the price chart. For each bar it takes the highest and lowest close over a user-set period and draws their average, matching the TA-Lib midpoint definition of the center of that range. The

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MIDPOINT: Rolling Midpoint

V4 Essential Colors 08

by be-thomas
65 stars

This script plots the bar high, median price, and low in a separate pane using varying levels of transparency and line widths. It demonstrates the use of the color.new function in Pine Script to create visual depth and glow styling across price points. The scr

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of V4 Essential Colors 08

Parabolic SAR

by g-moe
3 stars

This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR

Volume Dots

by regalouisei
2 stars

This indicator highlights high volume and open interest (OI) extremities directly on the price chart. It identifies potential support and resistance zones, naked levels, and liquidation ranges using visual dots, lines, and boxes. An optional on-screen table di

Indicator v5 VolumeSupport & resistance
Updated 8 months ago · None stated GitHub repository of Volume Dots
1 stars

This Pine Script strategy calculates the accumulation/distribution line with ta.accdist and its 21-period EMA. It plots these in a separate pane. The strategy issues long entries on ta.crossover of the accumulation/distribution line above its EMA and short ent

Strategy v6 VolumeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - accdist EMA(21) cross

NNDM-tracker

by Allen1212
303 stars

This indicator visualizes historical ARK Invest trade activity for Nano Dimension (NNDM) directly on the price chart. It plots green buy labels below bars and red sell labels above bars using hardcoded timestamped trade records, showing transaction counts or f

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

This strategy detects a pivot range using a user-defined length to calculate multiple Fibonacci retracement levels. It enters long market orders when price touches a selected retracement level. Take profit is set as a percentage of entry price, and DCA activat

Strategy v4 Support & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Automated - Fibs with Market orders
99 stars

The Midpoint Price over Period indicator calculates the center of the highest high and lowest low price range over a user-defined lookback period. It averages the maximum high and minimum low values across the chosen window, providing a TA-Lib compatible basel

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MIDPRICE: Midpoint Price over Period

Vertical line

by be-thomas
65 stars

This indicator plots a vertical line on the price chart at the most recent bar. It checks whether the current bar is the latest bar on the chart and renders a tall histogram bar using an extreme numeric value to span the chart height. Because the indicator use

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

Period VWAP

by g-moe
3 stars

Period VWAP calculates a rolling volume-weighted average price over a chosen number of bars. It multiplies the typical price by volume, sums both that product and volume across the period, and divides them to plot one line on the price chart. The period input

Indicator v5 Volume
Updated 5 months ago · None stated GitHub repository of Period VWAP

3Commas Bot

by regalouisei
2 stars

This strategy draws two moving averages on the price chart and uses their bias to open long or short trades. It places the stop beyond a swing high or low using an ATR risk multiple, then sets a limit exit from the reward-to-risk ratio. An optional ATR trail c

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of 3Commas Bot
1 stars

This validation strategy calculates a 9-period Chande Momentum Oscillator (CMO) on the closing price to isolate zero-line crossing behavior. It enters a long position when the CMO crosses above zero and opens a short position when it crosses below zero, revers

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - CMO(9) zero cross
1 stars

This indicator plots the original simple moving average, a symmetric moving average calculated from the highest and lowest moving averages over the window length, and a dynamic midline. It generates buy signals when the deviation from the symmetric moving aver

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Symmetric MA Reversal Signals

NRIX-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest transaction records directly on the price chart for NRIX. It displays green Buy labels below bars and red Sell labels above bars based on hardcoded transaction dates and ETF execution counts. The primary input setting

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

An automated trend-following investment strategy designed for Bitcoin. It compares two customizable trend lines (such as TEMA, LSMA, EMA, or SMA) to detect crossovers and filters entries using an ATR-based trailing stop channel. Positions are exited when the p

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Automated Bitcoin (BTC) Investment Strategy
99 stars

This overlay indicator plots a channel of the highest high and the lowest low over a rolling lookback. It updates both extremes with a monotonic deque so each bar is handled in amortized constant time, then draws the upper and lower lines on the price chart an

Indicator v6 Support & resistanceVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Min-Max Channel (MMCHANNEL)

Visible OHLC

by be-thomas
65 stars

Visible OHLC is a Pine Script version 4 indicator drawn on the price chart. It stores the close series and plots that value only. There are no inputs, conditions, or extra calculations. Open, high, and low are not plotted, even though the title mentions OHLC.

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

Pivot Trendlines

by g-moe
3 stars

Pivot Trendlines marks confirmed pivot highs and pivot lows on the price chart and tracks small pivot highs and lows from consecutive red or green candles. It plots the count of green bars since the last pivot low and red bars since the last pivot high, and it

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

3D Sine Wave

by regalouisei
2 stars

This indicator plots a 3D sine wave in a separate pane. It calculates wave values using bar index, wave height and duration inputs. Lines form a wave shape with top, bottom, left and right fills based on coloring style. Regular or irregular shape option change

Indicator v5 Support & resistanceVolatility & bands
Updated 8 months ago · None stated GitHub repository of 3D Sine Wave
1 stars

This strategy calculates the Ehlers Center of Gravity oscillator of length 10 on close and an exponential moving average of length 5 of that oscillator. It enters long when the oscillator crosses above the signal and enters short when it crosses below. Positio

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - COG(10) signal cross

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 strategy calculates a 14-period Money Flow Index using typical price and volume data. It triggers a long entry when the indicator crosses above the oversold threshold of 20 and a short entry when it crosses below the overbought threshold of 80. Displayed

Strategy v6 Oscillators & momentumVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - MFI(14) bands 20/80

Symmetric Price

by morindok
1 stars

This indicator plots a mirrored copy of the close around a user-chosen symmetry price. For each bar it stores a point at twice the level minus the close, then draws those points as one orange polyline on the price chart when the last bar has at least two point

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetric Price

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

This strategy plots the Positive Volume Index and Negative Volume Index in a separate pane and compares each with its own exponential moving average of length 255. It opens a long when PVI crosses above its EMA and opens a short when NVI crosses below its EMA.

Strategy v6 VolumeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - NVI/PVI vs EMA255 cross

Symmetric Price - Invertible System calculates geometric trend baselines, symmetric moving averages, and Fibonacci wave oscillations overlaid directly on the price chart. Users select two anchor points with custom timestamps and prices to define a central slop

Indicator v5 Moving averagesSupport & resistance

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

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