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

RSI Divergence Detector

by knectardev
1 stars

This indicator calculates the RSI and detects regular and hidden divergences between price and RSI pivots. It plots the RSI on the price chart overlay and marks bullish regular, bearish regular, bullish hidden and bearish hidden divergences with labels. Horizo

Indicator v6 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of RSI Divergence Detector
1 stars

This strategy plots the Relative Strength Index in a separate pane and fades extremes. It opens a long when RSI crosses back above the oversold level and a short when RSI crosses back below the overbought level. Open trades exit at a percentage stop loss or ta

Strategy v5 Oscillators & momentumMean reversion
Updated 11 months ago · None stated GitHub repository of RSI Mean Reversion Strategy

RSI Divergences

by feliperazeek
1 stars

This indicator finds regular and hidden divergences between price and a 14-period RSI, together with a stochastic of the RSI, and draws divergence lines and labels on the price chart. A margin setting from zero to two controls how large a divergence it accepts

Indicator v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergences

New Indicator Template

by NakliTechie
1 stars

This script serves as a starter template for building custom TradingView Pine Script indicators. It defines basic input settings including a length value and source selection, then provides empty sections for adding calculations and plot statements. The script

Indicator v5 Screeners & dashboards
Updated 1 year ago · MIT GitHub repository of New Indicator Template

EZ Algo Trader (Beta)

by turnupdigital
1 stars

A strategy on the price chart that turns external indicator signals into entries. Up to five signals can be enabled, each with long and short source inputs, a name and a usage mode. Position size is a fixed number of contracts, and an ATR length and an optiona

Strategy v6
Updated 1 year ago · None stated GitHub repository of EZ Algo Trader (Beta)

PAXG Best Position

by theteelek
1 stars

A long-only strategy for the gold-backed PAXG token that buys near the lower edge of a smoothed channel. The channel is an EMA of the highest high and lowest low over an adjustable range, and a buy needs price at the lower line with RSI turning up from oversol

Strategy v6 Mean reversion
Updated 1 year ago · None stated GitHub repository of PAXG Best Position

Slow Stochastic Strategy

by Studentcodee
1 stars

A Pine v6 strategy built on a slow stochastic oscillator and drawn on the price chart. The %K line is the stochastic smoothed by a three-bar average, and %D is a further three-bar average. It enters long when %K crosses above %D while %K is below the oversold

Strategy v6 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of Slow Stochastic Strategy

Financial YoY

by lumduan
1 stars

A fundamentals indicator that pulls company financial data such as revenue, net income, EBITDA, EPS, debt, cash flow and margin ratios, and shows two chosen items in a table on the chart. It can display quarter-on-quarter, year-on-year and compound growth for

Indicator v5 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Financial YoY
1 stars

This strategy trades stochastic crossovers in extreme zones. It enters long when %K crosses above %D with both below the oversold level, and short when %K crosses below %D with both above the overbought level. Each entry carries an ATR-based stop loss and take

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of Stochastic Oscillator Strategy
1 stars

A separate-pane oscillator based on market structure ranges at three scales: short, intermediate and long. Each scale has a weight input, and the combined value is smoothed and shown as a gradient or a cycle histogram. Optional structure lines and tags for eac

Indicator v5 SMC / ICT / price actionOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Market Structure Oscillator
1 stars

An indicator on the price chart that smooths price with a Kalman filter, builds a band around it from a weighted average of bar ranges multiplied by a deviation setting, and runs a SuperTrend on the filtered line. Trend is set when the close moves outside the

Indicator v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Range Filtered Trend Signals
1 stars

A price-chart overlay that measures how fast an exponential moving average is turning. It takes the bar-to-bar change of a 20-bar EMA as its slope and the change in that slope as acceleration. When both exceed adjustable thresholds in the same direction, it ti

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Slope Acceleration

An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke

Indicator v5 Candlestick patternsDivergence
Updated 1 year ago · None stated GitHub repository of Price Action Signals and Filters

Hello World

by fiji-solutions
1 stars

Demonstrates symbol information functions alongside basic Average True Range (ATR) conversions. It calculates a 14-period ATR, converts the values into mintick points and pips, and plots each metric in a separate pane. Additionally, on the most recent historic

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of Hello World

Floor Trader Pivots

by JoeTonDev
1 stars

An overlay that plots classic floor trader pivot levels: a pivot point, with support and resistance pairs one to three, as circles. The inputs come from the previous day, the previous week or the previous custom intraday session, chosen in a menu. Toggles show

Indicator v5 Support & resistanceSessions & time
Updated 2 years ago · None stated GitHub repository of Floor Trader Pivots

algo-trade-v111

by akash-yellgetti
1 stars

A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by end hour and minute inputs. It then plots pivot-based support and resistance from left and right bar counts, shows labels where price bre

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of algo-trade-v111

This indicator calculates the Relative Strength Index (RSI) applied to various volume-weighted indicators, including Accumulation/Distribution, Elder's Force Index, Money Flow Index, On Balance Volume, and Price Volume Trend. The resulting volume-RSI values ar

Indicator v4 Oscillators & momentumVolume
Updated 2 years ago · None stated GitHub repository of Relative Strength of Volume Indicators by DGT
1 stars

This educational script demonstrates basic plotting syntax and the overlay parameter in Pine Script v4. It calculates and plots the closing price in a separate pane below the price chart using the default plot function. The source code serves as an instruction

Indicator v4
Updated 2 years ago · None stated GitHub repository of Pinescript - Plotting overlay=false

This strategy detects divergence strength across multiple indicators including RSI and MACD on the price chart. It evaluates regular and hidden divergences using user-defined weights for price and indicator changes along with lookback parameters for pivots and

Strategy v5 DivergenceOscillators & momentum
Updated 2 years ago · MPL-2.0 GitHub repository of Strength of Divergence Across Multiple Indicators on Tradingboat
1 stars

This strategy goes long when a 13-period EMA crosses above a 34-period EMA and short on the opposite cross, closing each side on the reverse cross. A percentage trailing stop, set separately for longs and shorts, ratchets behind the close and is plotted as cir

Strategy v5 Moving averagesTrend Repaints
Updated 2 years ago · None stated GitHub repository of Verge EMA Crossover + Trailing Stop

RSI Failure Swings

by krosenfeld7
1 stars

This indicator detects RSI failure swing patterns and projects corresponding support, resistance, and swing levels onto the chart. It calculates a standard Relative Strength Index across a configurable lookback window to identify pivot highs and lows, drawing

Indicator v4 Oscillators & momentumSupport & resistance
Updated 3 years ago · Apache-2.0 GitHub repository of RSI Failure Swings

TEMA Smoothing

by nvFede
1 stars

A Pine v4 overlay that plots three triple exponential moving averages of the close, with lengths of 10, 20 and 50 by default, drawn in red, blue and green. Each average is passed through a simple moving average controlled by a smoothing factor, which defaults

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of TEMA Smoothing

Bias

by JohnsonHsiao
1 stars

The indicator computes bias and mbias curves from typical price relative to highest and lowest closes across periods 3, 6, 9, 12, and 20. It sums the positive and negative biases then negates and plots them as b (red) and s (green) lines in a separate pane to

Indicator v5 Support & resistanceMean reversion
Updated 3 years ago · None stated GitHub repository of Bias

RSI Oscillator (Hotch)

by rajatjpatel
1 stars

A separate-pane trend oscillator built from two smoothed moving averages, 21 and 315 bars by default. Each average is passed through a weighted filter and then an RSI, and the result is scaled to a range of roughly 0 to 200. Two lines are drawn with dynamic gr

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of RSI Oscillator (Hotch)

Simple Moving Average

by juliencrn
1 stars

Simple Moving Average is a minimal overlay indicator that plots two simple moving averages of the close on the price chart: a 20-period line in orange and a 50-period line in blue. The lengths are fixed in the code and there are no inputs, signals, fills or al

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · None stated GitHub repository of Simple Moving Average

Modified ADX

by hayashi19
1 stars

This indicator computes the standard ADX from directional movement, subtracts twenty so that zero becomes the usual trend-strength threshold, and draws the result as columns in a separate pane. Positive columns are green, brighter when rising, and negative col

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Modified ADX
1 stars

A Pine v4 strategy that plots a 10-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of CRVBTC EMA Cross Strategy
1 stars

The RSI-ADI-Combo indicator combines Relative Strength Index (RSI), Money Flow Index (MFI), and Average Directional Index (ADX) into a single separate pane visualizer. It plots RSI and MFI line graphs along with a color-coded ADX column histogram that highligh

Indicator v4 Oscillators & momentumVolume
Updated 6 years ago · GPL-3.0 GitHub repository of RSI-ADI-Combo [Numchuck]
948 stars

This indicator measures the chart symbol’s percentage change from the opening price at the start of each US presidential term and plots those values as histogram columns in a separate pane. Columns are offset so each administration appears separately, with a s

Indicator v6 Screeners & dashboards
Updated 11 days ago · GPL-3.0 GitHub repository of Presidents Performance

This indicator plots ICT Fair Value Gaps and internal external range imbalances on multiple high timeframes. It detects liquidity pools and potential reversal zones by analyzing range structures. Three customizable timeframes allow selection of colors and bar

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT External and Internal Range Liquidity Multi-timeframe

Omar Edited WF

by Alorse
330 stars

Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Omar Edited WF
318 stars

This indicator calculates and plots two moving averages, which can be configured as either exponential or simple, along with a shaded fill between them to highlight trend direction. It also derives and plots upper and lower deviation levels using a customizabl

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of TVT Short Term (1h)

6301-Tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell activity for ticker 6301 on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, with each label showing a one-ETF count. The ETF input switche

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

ArrayStatisticsPearsonR

by ricardosantos79
261 stars

This Pine Script library provides a helper function to calculate the Pearson correlation coefficient between two numeric datasets stored as float arrays. It evaluates the linear relationship between the samples by dividing their covariance by the product of th

Library v5
Updated 4 years ago · None stated GitHub repository of ArrayStatisticsPearsonR
257 stars

This overlay indicator smooths a rolling highest low and lowest high with a rational quadratic kernel, then holds a step line that switches between those two smoothed levels when the selected source crosses them. It plots that line as crosses on the price char

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Donald - Highest-Lowest Visual

STRG-BBForce

by harryguiacorn
219 stars

STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of STRG-BBForce
219 stars

This educational indicator demonstrates the usage of built-in time variables and timestamp calculations in Pine Script. It computes a UNIX timestamp based on the current bar's year, month, and day of the month using the built-in timestamp function and plots th

Indicator v4
Updated 5 years ago · None stated GitHub repository of 教學-時間變數解說
114 stars

This indicator compares two user-selected symbols by plotting the z-score of their log-price ratio in a separate pane. It averages the ratio with a chosen moving average, measures standard deviation over the same period, and marks a buy when the ratio falls be

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of Pair Trading - Cointegration

This strategy identifies bullish and bearish Three Line Strike candlestick patterns combined with a dual moving average cloud and Volume Spread Analysis (VSA). It triggers long or short entries when a strike formation confirms in alignment with the moving aver

Strategy v5 Candlestick patternsTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3LS 3 Line Strike Strategy [Kintsugi Trading]
99 stars

Calculates Vitali Apirine's Slow Relative Strength Index (SRSI), which measures price changes relative to an Exponential Moving Average rather than the previous bar close. It computes the distance between the source price and its EMA, then applies Wilder's smo

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Apirine Slow RSI (SRSI)

CCI Line Gradient

by be-thomas
65 stars

Calculates the Commodity Channel Index (CCI) and plots it in a separate pane using dynamic color gradients. The script adjusts the signal line color smoothly across values ranging from -200 to +200. Additionally, it fills the background between the +100 and -1

Indicator v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of CCI Line Gradient
57 stars

Implements an automated testing framework designed to validate an EMA Ribbon and MACD hybrid strategy. It verifies indicator calculations, trend context filters, signal generation, suppression rules, and cooldown mechanics using custom assertions. Test results

Strategy v6 Moving averagesOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon Test Suite v1.5
56 stars

This indicator identifies fractal-based pivot highs and lows to map out market structure directly on the price chart. It detects bullish and bearish structure breaks, automatically labeling Break of Structure (BOS) and Change of Character (ChoCH) events when p

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure (Fractal)

KDJ

by dcaoyuan
55 stars

This indicator plots a KDJ oscillator in a separate pane. It calculates a stochastic K value from the close, high, and low over the K period, then smooths it with a simple moving average. The D line is a simple moving average of K, and the J line equals three

Indicator v6 Oscillators & momentum
Updated 6 months ago · Apache-2.0 GitHub repository of KDJ

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