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 identifies severe close-to-close volatility shocks and triggers an immediate exit from any open long position. It enters long when the rate of change of close crosses above a user-defined momentum threshold and the close sits above the trend EMA.

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Flashpoint Immediate Close

RKLB-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest buy and sell activity for Rocket Lab on the price chart. Green labels sit below the bar on purchase dates and red labels sit above the bar on sale dates, with a count of how many selected ETFs traded that day.

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

Booz Strategy

by hasnocool
106 stars

Booz Strategy is a price-chart strategy that opens longs when a fast EMA crosses above a slow EMA and shorts when it crosses below, provided an optional longer moving-average trend filter agrees. SMA or EMA choices and lengths change the filter and a plotted s

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

Quantile Loss (Pinball Loss) calculates the pinball loss between an actual series and a predicted series on each bar, then averages those losses with a simple moving average. It plots that rolling mean as a yellow line in a separate pane, with a dotted zero re

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Quantile Loss (Pinball Loss)
3 stars

Psychological Levels is a chart overlay indicator that draws horizontal quarter, half, and whole round-number levels. It marks buy and sell signals when volume crosses user thresholds near those levels, with an optional moving-average filter, a delay between s

Indicator v5 Support & resistanceVolume
Updated 5 months ago · None stated GitHub repository of Psychological Levels

PineForge Gatekeeper Risk Cap

by pineforge-4pass
1 stars

This Pine Script v6 strategy gates long trades to a user-defined session window (default 0900-1700 Asia/Taipei) and enforces a maximum daily filled orders limit. It generates entries solely on fast EMA crossover above the slow EMA while inside the session. Pos

Strategy v6 Sessions & timeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Gatekeeper Risk Cap

RKUNY-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of RKUNY on the price chart. It places green buy labels below bars and red sell labels above bars on specific dates, each labeled with an X1 count of funds trading that day. The ETF input o

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

Bottom Catch Strategy

by hasnocool
106 stars

This strategy attempts to capture temporary market dips by identifying high-volume spikes during oversold conditions. It enters a long position when volume exceeds a upper standard deviation channel based on its simple moving average while the RSI remains belo

Strategy v4 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Bottom Catch Strategy

This indicator plots Quantitative Qualitative Estimation in a separate pane. It computes Wilder RSI from the chosen source, smooths it with an exponential moving average, and derives a dynamic average range from a double EMA of absolute RSI changes. A trailing

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Quantitative Qualitative Estimation (QQE)
3 stars

Psychological Levels is a price-chart strategy that draws quarter, half, and whole rounded price levels. A rounding value sets the level spacing, and each level type can be toggled with its own color, line style, and width. Buy and sell volume thresholds, a pr

Strategy v5 Support & resistanceVolume
Updated 5 months ago · None stated GitHub repository of Psychological Levels
2 stars

Market Manipulation Index plots a composite oscillator from 0 to 1 in a separate pane. It averages a sine-wave fit error, a two-lag linear prediction residual, and a high-versus-low frequency variance ratio, each limited by price variance. An ATR-scaled window

Indicator v5 Volatility & bands
Updated 8 months ago · None stated GitHub repository of Market Manipulation Index (MMI)

PineForge Harbor Stop Limit

by pineforge-4pass
1 stars

A long-only breakout strategy that uses a stop-limit style entry. It tracks the highest high of the previous 35 bars and the range midpoint, and arms an order when the close is above the midpoint but below an activation level set a fraction of ATR above that h

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Harbor Stop Limit

ROK-Tracker

by Allen1212
303 stars

ROK-Tracker visualizes historical buy and sell transactions made by ARK Invest funds for Rockwell Automation (ROK). The script plots green and red labels directly on the price chart corresponding to specific trade timestamps, indicating buy or sell actions alo

Indicator v4
Updated 2 years ago · None stated GitHub repository of ROK-Tracker
106 stars

Breakout Trend Follower V2 is a price-chart strategy that enters long when price breaks a recent swing high. It uses the recent swing low as the stop and moves that stop up as higher lows form, exiting when a higher low is breached. Users set the backtest date

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Follower V2
99 stars

This indicator calculates the fractional Rate of Change (ROCP) between the current price and the price N periods ago. Unlike standard percentage-based momentum oscillators, it expresses the price difference as a decimal fraction. The indicator draws in a separ

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Rate of Change Fractional (ROCP)
3 stars

Psychological Levels calculates and overlays key rounded price thresholds on the main chart, distinguishing between whole, half, and quarter price levels. It identifies potential trade setups filtered by defined session time windows, prior-day range conditions

Indicator v5 Support & resistanceSessions & time
Updated 5 months ago · None stated GitHub repository of Psychological Levels

MC Bias Strategy Example

by regalouisei
2 stars

MC Bias Strategy Example is a Pine Script strategy designed to demonstrate automated trade execution driven by an external Markov Chain bias indicator. The script accepts a user-selected data source to determine directional bias and executes trades based on th

Strategy v5 AI / machine learningTrend
Updated 8 months ago · None stated GitHub repository of MC Bias Strategy Example
1 stars

This strategy calculates a linearly weighted moving average centerline explicitly using a while loop, accompanied by a standard deviation upper band. It enters a long position when the close crosses over the upper band. Exits occur when the price crosses back

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Heliograph While Channel

RSW-tracker

by Allen1212
303 stars

RSW-tracker is an overlay indicator that marks ARK Invest activity for the RSW ticker on the price chart. The shown script creates a red downward label dated 17 January 2020 with the text Sell X1 when the ETF input is ALL. That input is the only setting and of

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

Breakout Trend Trading

by hasnocool
106 stars

This strategy trades breakouts, pullbacks, and reversals in the chosen direction on the price chart. Entries can require new long-term highs or lows and recent moving-average alignment, with optional weekly or monthly Supertrend filters. Exits can follow an op

Strategy v4 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading
99 stars

The ROC indicator calculates the percentage change in price from the current bar to N bars ago. It draws the resulting values in a separate pane on the chart. The main setting allows selection of a price source such as close and a length parameter that control

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Rate of Change Percentage (ROC)
3 stars

Psychological Lines draws a grid of horizontal round-number levels on the price chart. It rounds a baseline price by the Rounding Value, then plots whole, half, and quarter steps above and below that baseline, up to ten steps on each side. Each group can be tu

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of Psychological Lines
2 stars

The McDonald's Pattern indicator detects specific price patterns on the chart by finding top and bottom points using highest and lowest values over a user-defined length. It plots fries above top points and hamburgers below bottom points, then connects selecte

Indicator v5 Support & resistanceCandlestick patterns
Updated 8 months ago · None stated GitHub repository of McDonald's Pattern [LuxAlgo]
1 stars

A long-only strategy that enters when the close crosses above a 34-period simple moving average. Each trade has an ATR-based protective stop and is closed after a fixed number of bars if still open. Inputs set the average length, hold period, ATR length and st

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Horizon Next-Bar Close

RTP Tracker

by Allen1212
303 stars

RTP Tracker visualizes historical buy and sell trades executed by ARK Invest funds on the RTP ticker. The script draws green labels below price bars for buy orders and red labels above bars for sell orders directly on the price chart, showing the relative fund

Indicator v4
Updated 2 years ago · None stated GitHub repository of RTP Tracker
106 stars

This Pine v4 strategy draws on the price chart and filters breakouts with a fixed Supertrend, ATR length, volume moving-average markup, and moving-average alignment, plus short and long high-low periods. Trade direction defaults to long and can include shorts.

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading - V1
99 stars

This indicator calculates a rate of change ratio: the current source value divided by the source value a set number of bars earlier. It plots that ratio as a yellow line in a separate pane and does not mark entries, exits, or price levels. The source defaults

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Rate of Change Ratio (ROCR)
3 stars

This strategy trades swing high breakouts on lower timeframes in alignment with higher-timeframe moving average trends. It evaluates price highs using a configurable lookback period and applies higher-timeframe moving average filters along with an optional ATR

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Qullamaggie Breakout Fixed

PineForge Loopback Method For

by pineforge-4pass
1 stars

The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Loopback Method For

RUBY Tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell trade records directly onto the price chart using visual labels. It identifies the dates on which ARK funds bought or sold shares of the stock, indicating transaction counts and trade activity above or

Indicator v4 SMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of RUBY Tracker

BT-5M-1H

by hasnocool
106 stars

BT-5M-1H is a mean-reversion strategy designed for 5-minute charts that simulates 1-hour Bollinger Bands to identify overbought and oversold conditions. It takes positions when price crosses standard deviation multiplier levels and exits using configurable log

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BT-5M-1H

This indicator calculates the Range Action Verification Index as the absolute percentage difference between a short simple moving average and a long simple moving average of close. It plots that value in a separate pane with a dashed threshold line and a dotte

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of RAVI: Chande Range Action Verification Index

The Range Percent Breakout Strategy identifies range contraction and inside bar patterns where the current bar's range is within a specified percentage threshold of the previous bar. When this condition is met while flat, breakout levels are established above

Strategy v5 BreakoutVolatility & bands
Updated 5 months ago · None stated GitHub repository of Range Percent Breakout Strategy
2 stars

The Moving Regression Prediction Bands indicator calculates polynomial regression bands from historical price data using a moving window. It fits a polynomial curve of specified degree to generate upper and lower bands representing expected price ranges with p

Indicator v5 Moving averagesVolatility & bands
Updated 8 months ago · None stated GitHub repository of Moving Regression Prediction Bands

PineForge Plumbline PVT VWMA

by pineforge-4pass
1 stars

The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Plumbline PVT VWMA

RXRX-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest funds for RXRX stock directly on the main price chart. It hardcodes transaction records and creates labeled markers indicating the direction and the number of participating ARK fu

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

BTC 15 min

by hasnocool
106 stars

This strategy combines percentage-based moving average channels, a linear regression curve, and an external timeframe Hull moving average variant to generate trade signals. Buy entries trigger when the linear regression crosses above the smoothed moving averag

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

This indicator applies the rectified linear unit to the difference between the selected source and a 20-period simple moving average. Positive deviations plot in green and negative deviations plot in red in a separate pane. The only input changes the price ser

Indicator v6 Moving averagesAI / machine learning
Updated 4 weeks ago · Apache-2.0 GitHub repository of Rectified Linear Unit (ReLU)

This multi-filter strategy triggers intraday entries by combining Relative Strength Index (RSI) range conditions with Volume Weighted Moving Average (VWMA) crossovers, Simple Moving Average (SMA) price alignment, and volume oscillator filters. Users can restri

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Rising Bars 30 Sec RSI SMA VWMA Exit Strategy
2 stars

Plots normalized percentage changes for groups of multiple assets in a separate pane to create a comparative spaghetti chart. It tracks relative performance using price, on-balance volume (OBV), or open interest, anchored to customizable periods or timestamps.

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Multi-Asset Performance Spaghetti
1 stars

This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Quarry ALMA Correlation

SAND-tracker

by Allen1212
303 stars

SAND-tracker is an overlay indicator that marks recorded ARK Invest activity on the SAND price chart. The visible script places one red label above the bar dated 17 January 2020, with the text Sell and X1. An ETF setting is present but only offers ALL, so this

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

BTC Bot

by hasnocool
106 stars

BTC Bot is a trading strategy designed for cryptocurrency charts. It calculates Weekly Pivot Points and a smoothed momentum oscillator based on RSI and EMA. Long entries trigger when the oscillator crosses above zero, while short entries trigger when price bre

Strategy v4 Oscillators & momentumSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Bot

This indicator applies a recursive least squares adaptive FIR filter to a chosen price source and plots the resulting smoothed series on the price chart. Each bar it predicts from past source values, updates a weight vector from the prediction error, and refre

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Recursive Least Squares Adaptive Filter (RLS)
3 stars

A momentum scalping strategy designed for 5-minute charts that combines the Relative Strength Index (RSI) with fast and slow Simple Moving Averages (SMA). It triggers long entries when the 14-period RSI exceeds 70 while the 5-period SMA is above the 20-period

Strategy v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of RSI MA Scalp Strategy

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