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

This strategy plots the Rank Correlation Index of close over a fixed 14-bar window in a separate pane. It enters long when RCI crosses above zero and short when RCI crosses below zero, reversing with a fixed quantity of one. There is no stop loss, take profit,

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

Symmetric Price Mirror is an overlay indicator that reflects price candles around Fibonacci extension levels derived from two user-selected prices and a time window. It builds upper and lower slopes from degree angles or from box diagonals, then offsets those

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

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

PF TA isolate - WPR(14) bands

by pineforge-4pass
1 stars

This strategy plots the Williams %R oscillator in a separate pane and generates long entries when it crosses above -80 while generating short entries on crossunder below -20. It uses fixed position sizing of one unit per signal with no stop loss and allows pyr

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - WPR(14) bands
1 stars

The Symmetric Price Mirror indicator calculates mirrored high and low price levels based on user-defined pivot range from lev1 and lev2 with optional time window t0 to t1. It applies slope adjustments using angles ang1 and ang2 or diagonal boxes scaled by bars

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

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

This strategy calculates a 14-period RSI of close and places mean-reversion entries at fixed outer bands. It enters long when RSI crosses up through 30 and enters short when RSI crosses down through 70. Position size is a fixed quantity of one, with commission

Strategy v6 Oscillators & momentumMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 02 - RSI(14) bands 30/70
1 stars

Symmetric Price with MA calculates centered and mirrored price values using moving average midpoints and user-defined slope projections. It allows users to set a time anchor and slope angle to dynamically offset price data, optionally applying Golden Ratio mul

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

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 tests the 55-period Hull Moving Average (HMA) calculation. It enters a long position when the closing price crosses above the HMA(55) line and enters a short position when the closing price crosses below it. The script operates directly on the pr

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA Isolate 04 - Close x HMA(55)
1 stars

Symmetric Range Spiral System projects geometric mirrored price paths and spiral structures directly onto the price chart. It calculates reflection levels and symmetric price polylines relative to a user-selected price level and time window. Storing bar data i

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

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)

Pivot Trendlines

by g-moe
3 stars

This indicator identifies pivot highs and lows using a swing lookback period and connects them with trendlines on the price chart. It generates long and short entry signals when price moves through predefined percentage thresholds in three steps for buy and se

Indicator v5 TrendSupport & resistance
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
2 stars

Christmas Toolkit [LuxAlgo] draws a decorative Christmas tree, garland, stars, and a moving deer on the price chart using labels. Width, offset, and garland rotations change the tree layout, while Static Tree and Deer Speed control whether the tree stays fixed

Indicator v5 Screeners & dashboardsOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Christmas Toolkit [LuxAlgo]
1 stars

This validation strategy tests continuous-state entry and exit logic using a standard 14-period Relative Strength Index (RSI). It opens a long position whenever RSI is above 50 and closes the position whenever RSI drops to or below 50. The script operates in a

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 06 - RSI(14) > 50 Continuous
1 stars

The Symmetrical Golden Shapes indicator draws geometric patterns directly on the price chart overlay within a user-defined time range and price level. It uses Pine Script polylines to plot customizable shapes such as diamonds, triangles, rectangles, polygons,

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetrical Golden Shapes

NXPIN-tracker

by Allen1212
303 stars

This indicator visualizes historical ARK Invest transactions for the NXPIN ticker directly on the price chart. It hardcodes specific trade dates using timestamp-anchored visual labels to indicate institutional buy or sell actions. The script does not calculate

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

BB + ADX Strategy

by hasnocool
106 stars

The BB + ADX Strategy triggers entries when price crosses Bollinger Bands during low-trend market conditions as filtered by the Average Directional Index (ADX). It enters long when price crosses above the lower band and short when price crosses below the upper

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BB + ADX Strategy
3 stars

This indicator plots horizontal support and resistance levels alongside sloping diagonal trendlines based on pivot high and pivot low points directly on the price chart. It provides three independent groups of pivot length settings, allowing traders to monitor

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

CM MacD Ult MTF V2.1

by regalouisei
2 stars

This indicator plots a customizable MACD in a separate pane. It calculates the MACD line from fast and slow SMA or EMA values, a signal line, and a histogram of their difference. An optional indicator timeframe can use another chart resolution. Users can show

Indicator v5 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of CM MacD Ult MTF V2.1
1 stars

This validation strategy evaluates a continuous-state MACD trend condition rather than a crossover event trigger. It calculates standard MACD line, signal line, and histogram values on the closing price using 12, 26, and 9 periods. The strategy enters a long p

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA Isolate 07 - MACD > Sig Continuous
1 stars

Symmetrical Golden Shapes plots customizable geometric shapes, including diamonds, ellipses, polygons, and stars, directly on the price chart. The indicator allows users to define time and price boundaries interactively, adjust center ratios, and mirror or rot

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetrical Golden Shapes

OERL-tracker

by Allen1212
303 stars

OERL-tracker is a Pine Script v4 overlay indicator that marks historical ARK Invest trades on the price chart. In the provided script it places a red label above the bar for 17 January 2020 reading a one-fund sell. An ETF input is present but offers only the A

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

BB+RSI+OBV

by hasnocool
106 stars

This strategy combines Bollinger Bands, the Relative Strength Index (RSI), and On-Balance Volume (OBV) to generate trade signals directly on the price chart. Long entries trigger when price is above the middle SMA band, RSI is over 50, and OBV is rising. Short

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BB+RSI+OBV
99 stars

Normal Distribution CDF (NORMDIST) calculates the cumulative distribution function for a normalized price series in a separate indicator pane. It standardizes price values using a rolling mean and standard deviation over a customizable lookback window, then sc

Indicator v6 Mean reversion
Updated 4 weeks ago · Apache-2.0 GitHub repository of Normal Distribution CDF (NORMDIST)

This overlay indicator plots three moving averages chosen from EMA, SMA, HMA, VWMA, or RMA. Inputs also configure Stochastic RSI and RSI lengths, buy and sell thresholds, and an optional RSI divergence filter with its own lookback. A session window can restric

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

Custom Pattern Detection

by regalouisei
2 stars

This indicator identifies multi-leg custom harmonic or structural patterns on the price chart based on pivot high and low points. It calculates Zigzag trendlines using a configurable lookback period and filters pattern segments (AB, BC, CD, DE, EF) using targe

Indicator v5 Support & resistanceTrend Repaints
Updated 8 months ago · None stated GitHub repository of Custom Pattern Detection

This Pine Script strategy calculates a standard 14-period Relative Strength Index (RSI) to generate simple momentum-based trading signals. It executes a long entry of one fixed unit when the RSI rises above 55 while flat. Open positions close entirely once the

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 09 - RSI>60 entry, RSI<45 exit

OKTA-tracker

by Allen1212
303 stars

OKTA-tracker visualizes historical ARK Invest trade activity for OKTA stock directly on the price chart. It plots green buy labels below price bars and red sell labels above price bars corresponding to historical transaction timestamps recorded for ARK funds s

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

BB-strategy

by hasnocool
106 stars

This strategy executes trades based on Bollinger Bands with optional filter conditions from RSI and MACD oscillators. It overlays on the price chart and plots MACD lines directly across the bars. Entries trigger according to band interactions combined with mom

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BB-strategy

Notch Filter (NOTCH)

by mihakralj
99 stars

Calculates and plots a second-order Infinite Impulse Response (IIR) notch filter directly on the price chart. Based on the RBJ Audio EQ Cookbook design, the filter attenuates a specific cyclic frequency component from the input series while preserving other ma

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

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