Synced with GitHub · updated today

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

Golden Buy

by hasnocool
106 stars

This strategy runs on the price chart under the title golden buy. It sets cash order size and a percent commission. Traders adjust an ATR stop-loss multiplier and a risk-reward ratio, and they can enable shorts or divergence filters. The visible inputs configu

Strategy v4 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Golden Buy

Calculates and plots the Stoller Average Range Channel directly on the price chart. It constructs a middle baseline using a Simple Moving Average and projects upper and lower envelope bands based on the Average True Range scaled by a user-defined multiplier. I

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Stoller Average Range Channel (STARCHANNEL)
3 stars

This indicator modifies traditional Donchian Channels by applying a weighted moving average to the highest high and lowest low over a customizable period, expanding the bands using twice the 14-period Average True Range. It calculates and plots upper, lower, a

Indicator v5 Volatility & bandsBreakout
Updated 5 months ago · None stated GitHub repository of Donchian Channels

SURF-tracker

by Allen1212
303 stars

SURF-tracker is an overlay indicator that plots buy and sell labels directly on the price chart to visualize ARK Invest trades. It marks historical purchase and sale dates with text labels indicating buy or sell actions along with share volume counts. The prim

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of SURF-tracker

Highs and lows

by hasnocool
106 stars

Calculates dynamic entry and exit price levels based on rolling lowest and highest bars with optional Average True Range (ATR) offsets. It places limit orders to enter long positions at the lowest price level and exits at the highest price level. An optional t

Strategy v4 Mean reversionSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Highs and lows
99 stars

This indicator plots the cumulative distribution function of Student's t-distribution in a separate pane. It min-max normalizes the chosen source over a lookback period, maps the result to a t-statistic, and evaluates the CDF through the regularized incomplete

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Student's t-Distribution CDF (TDIST)
3 stars

EMA Crossover 8/15 plots fast and slow moving averages directly on the price chart and detects crossover events. Users can switch between seven moving average types, including EMA, SMA, RMA, WMA, VWMA, SWMA, and ALMA, alongside custom period lengths. An option

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of EMA Crossover 8/15

SYK-tracker

by Allen1212
303 stars

This indicator marks recorded ARK Invest activity for SYK directly on the price chart. The visible code creates one green below-bar label dated 17 January 2020 that notes a buy with a one-fund count. An ETF input is exposed, but its only choice is ALL, so it d

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

This strategy enters long trades based on standard Stochastic oscillator conditions combined with a 60-minute higher-timeframe trend filter. It opens positions when lower-timeframe Stochastic %D is below a buy threshold and both lower and higher-timeframe %D l

Strategy v4 Oscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of IK 60-15 Stochastic Strategy
99 stars

This indicator calculates SuperTrend-style upper and lower bands from the high-low midpoint, offset by an average true range times a multiplier. A rolling buffer keeps the true-range sum over the chosen period, and the bands only tighten until the source close

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Super Trend Bands (STBANDS)

This indicator calculates Time Segmented Volume (TSV) by accumulating price-change weighted volume over a specified window. It plots TSV as a colored histogram alongside its simple moving average signal line and a secondary 20-period moving average in a separa

Indicator v5 VolumeOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Enhanced Time Segmented Volume

SYRS-tracker

by Allen1212
303 stars

SYRS-tracker plots recorded ARK Invest purchases and sales of SYRS on the price chart. It marks buy and sell activity with share volume and shows the stock weight in the selected ETF. A same-day count notes how many ARK funds traded the stock together. The ETF

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

Line Break Strategy

by hasnocool
106 stars

Line Break Strategy generates trading signals by fetching Line Break chart data using a synthetic ticker context. It plots custom Line Break candlesticks in a separate pane and checks whether the line break bar closed higher or lower than its open. The strateg

Strategy v4 TrendCandlestick patterns Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Line Break Strategy

SuperTrend

by mihakralj
99 stars

This indicator calculates SuperTrend from an ATR-smoothed band around the midpoint of high and low. It plots the active band on the price chart, green in an uptrend and red in a downtrend. Trend flips when close crosses the opposite band and otherwise holds. A

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of SuperTrend

GAIN28

by g-moe
3 stars

This indicator calculates an impulse momentum value by summing candle body differences (close minus open) divided by the minimum tick over a user-defined period. On the most recent bar, it draws forward projection lines into future time coordinates using timef

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of GAIN28

TAK-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell events for TAK directly on the price chart. Green labels sit below bars for buys and red labels sit above bars for sells, each marked with a same-day ETF count such as X1. The ETF input switches between A

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

MA5X_L

by hasnocool
106 stars

MA5X_L is a long-only trend-following momentum strategy built on weighted and simple moving averages combined with an ATR trailing exit. It calculates four moving averages (short, medium, long, extra-long WMA/SMA) and enters long trades when the short WMA cros

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of MA5X_L
99 stars

Swing High/Low Detection identifies local price peaks and troughs by comparing a central bar against surrounding bars within a user-defined lookback window. Once a pivot point is confirmed after the required lookback period, the indicator updates and plots con

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Swing High/Low Detection

GM VWAP

by g-moe
3 stars

This overlay indicator plots a volume-weighted average price from a chosen source, defaulting to the average of high, low, and close. It resets the cumulative volume sums at a selectable anchor such as the session, week, month, quarter, year, decade, century,

Indicator v5 VolumeVolatility & bands
Updated 5 months ago · None stated GitHub repository of GM VWAP

TARO-tracker

by Allen1212
303 stars

TARO-tracker plots historical ARK Invest transactions for TARO stock directly on the price chart. It renders buy and sell labels positioned on specific dates using bar timestamps, indicating the direction of ARK's trade along with an ETF participation multipli

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

Order At Specified Time is a TradingView strategy that executes trades at a designated time of day within a specified backtest date range. At the user-configured UTC hour and minute, the strategy enters a short market position while simultaneously placing a lo

Strategy v4 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Order At Specified Time

This indicator measures symmetric mean absolute percentage error between a chosen price source and an exponential moving average of that source. Each bar it computes a symmetric percentage error, then averages those errors over the selected lookback with a cir

Indicator v6 Moving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Symmetric Mean Absolute %Error (SMAPE)

Hercules Srategy

by g-moe
3 stars

This strategy detects momentum breakouts identified as lightning candles where the absolute candle body size exceeds a user-defined tick threshold. It enters long positions on large bullish candles and short positions on large bearish candles, with an option t

Strategy v5 BreakoutOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Hercules Srategy

TCEHY-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of Tencent Holdings (TCEHY) directly on the price chart. When the ETF input is ALL, it places green buy labels below bars and red sell labels above bars on fixed dates, with text such as Bu

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

Prototype

by hasnocool
106 stars

This strategy overlays Supertrend-style ATR trailing stop levels on the price chart alongside multi-period moving averages, volume metrics, and Bollinger Bands. It flags trend direction changes using an ATR offset channel, plotting buy and sell signals directl

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Prototype

TD Sequential (TD_SEQ)

by mihakralj
99 stars

TD Sequential calculates Tom DeMark's exhaustion counting system to identify potential trend reversals. It operates in two phases: Phase 1 Setup tracks consecutive price comparisons against historical closes up to a 9-count, while Phase 2 Countdown tracks non-

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of TD Sequential (TD_SEQ)
3 stars

Ichimoku Cloud Weight calculates an aggregated quantitative score based on multiple Ichimoku Cloud components from a chosen timeframe. It assigns weighted bullish and bearish points to Tenkan and Kijun crosses, price and Kijun crosses, Kumo breakouts, Senkou S

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Ichimoku Cloud Weight

TCS Tracker

by Allen1212
303 stars

TCS Tracker is an overlay indicator that visualizes historical purchase and sale transactions made by ARK Invest funds for TCS stock. It plots color-coded buy labels directly on the price chart on specific historical dates corresponding to trade execution time

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

Rapid Fire

by hasnocool
106 stars

This strategy draws on the price chart and enters long when the open crosses above the Parabolic SAR and is above a 50-period simple moving average of close. It enters short on the opposite cross below that average. Offset prices of 0.5 percent and 1.5 percent

Strategy v4 TrendMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Rapid Fire

Theil's U Statistic

by mihakralj
99 stars

Theil's U Statistic measures forecast accuracy by comparing actual and predicted data series over a rolling length. It calculates a normalized error ratio where zero indicates perfect accuracy and one represents predictive quality equal to a naive forecast. Us

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Theil's U Statistic

This indicator renders Ichimoku cloud components consisting of conversion line, base line, leading span A and leading span B. It tracks Tenkan-Kijun crosses and assigns a numeric score to each based on whether the cross occurs below, inside or above the Kumo c

Indicator v5 Moving averagesSupport & resistance
Updated 5 months ago · None stated GitHub repository of Ichimoku Cloud Weight Original

TDY Tracker

by Allen1212
303 stars

TDY Tracker plots historical buy and sell transactions executed by ARK Invest funds for Teledyne Technologies (TDY) directly on the main price chart. It creates visual labels at exact historical timestamps to show institutional trade activity and volume count.

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

Simple MA 200 Cross

by hasnocool
106 stars

This strategy calculates a simple moving average of closing prices and executes a basic trend-following system on the main chart. It enters a long position when the closing price crosses above the moving average and exits the position when the price crosses be

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Simple MA 200 Cross
99 stars

This indicator calculates the third finite difference, or jerk, of a selected data series. By applying binomial expansion coefficients across four consecutive bars, it measures the rate of change of price acceleration. Users can customize the source input seri

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Third Derivative / Jerk (JERK)

TEAM-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest trade marks for the TEAM ticker on the price chart. It places green buy labels below bars and red sell labels above bars at hardcoded dates, each marked with an X1 count. The ETF input switches between ALL and ARKW

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

This strategy overlays buy and sell signals on the price chart by combining selectable RSI conditions, ADX trend rules, and EMA pullback filters. Users can configure the RSI mode, toggle global EMA trend filtering, enforce EMA pullback requirements, and limit

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of SirPoggy Simple and Effective RSI Strategy
99 stars

This indicator calculates the Triple Exponential Average oscillator as the percentage rate of change of a triple exponential moving average of the chosen source. It plots the resulting series as a single line in a separate pane. The period input sets the smoot

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Triple Exponential Average (TRIX)
3 stars

Kane Bollinger Bands calculates and plots traditional Bollinger Bands alongside a percentage change plot for upper band movement directly on the main price chart. It establishes a Simple Moving Average basis line and generates upper and lower channel boundarie

Indicator v5 Volatility & bandsMoving averages
Updated 5 months ago · None stated GitHub repository of Kane Bollinger Bands

TEVA-tracker

by Allen1212
303 stars

TEVA-tracker overlays historical ARK Invest trade labels on the TEVA price chart. The visible script places green buy markers below bars at dated timestamps, with text showing a buy and an X1 count. An ETF input is present but offers only ALL, so it does not f

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

Spread Entry Strategy

by hasnocool
106 stars

This strategy overlays bull and bear setup filters on the price chart. It compares a reference symbol, QQQ by default, on the daily timeframe with hot and cool percent-change levels, then combines RSI, DMI, three simple moving averages, Bollinger Bands, and Ke

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Spread Entry Strategy
99 stars

Calculates the True Strength Index oscillator and its exponential moving average signal line using custom double-smoothing on price momentum and absolute momentum. The indicator measures trend strength and direction by normalizing smoothed price variations, pl

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of True Strength Index (TSI)
3 stars

This Pine Script v5 indicator demonstrates the matrix.new function for creating custom types. It plots a single label containing the text Hello world at the high price on the chart. The script is set to overlay mode with no input settings and serves as a minim

Indicator v5
Updated 5 months ago · None stated GitHub repository of Matrix New Type Example 1

TMO-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell labels for the TMO stock on the price chart. An ETF setting chooses ALL or ARKG, and matching dates receive green buy labels below the bar or red sell labels above it, each marked X1. It does not calculat

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

This strategy evaluates trade entries by combining Stochastic RSI crossovers with MACD momentum and three exponential moving averages (8, 15, and 50 EMAs). Positions are filtered by directional alignment across indicators and date ranges. Exits are managed via

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Stoch RSI Crossover Strat + EMA

TTM Scalper Alert

by mihakralj
99 stars

TTM Scalper Alert marks three-bar pivot highs and lows on the price chart. It treats the prior bar as a pivot high when its high exceeds both neighboring highs, and as a pivot low when its low is below both neighboring lows. An optional setting uses closes ins

Indicator v6 Support & resistanceScalping Repaints
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Scalper Alert

TOST-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest buy and sell dates for Toast on the price chart. When the ETF input is ALL, it places green labels below bars for buys and red labels above bars for sells, each reading X1. The ETF setting offers ALL, ARKF, an

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

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