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

Bollinger DCA v1

by hasnocool
106 stars

This strategy calculates Bollinger Bands and RSI to trigger dollar-cost averaging buy orders. It enters long positions whenever the closing price dips below the lower Bollinger Band while the RSI is below 50. Order units are calculated dynamically based on a f

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger DCA v1

Quantile (QUANTILE)

by mihakralj
99 stars

This indicator calculates and plots a specified statistical quantile of a price series over a rolling lookback window using linear interpolation. It draws directly on the price chart as an overlay line. Users can adjust the input source, the lookback period, a

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

Psychological Levels is a strategy that plots horizontal grid lines based on whole, half, and quarter psychological price levels directly on the chart. It triggers trades during designated intraday session windows, filtering signals using a multi-timeframe mov

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

VCP probe 02 fvg zones

by pineforge-4pass
1 stars

This strategy detects Fair Value Gaps on the price chart using 3-bar candle imbalances filtered by ATR. It maintains a capped array of active FVG zones with their tops, bottoms, and bullish flags. Long entries occur when the current bar overlaps an active bull

Strategy v6 SMC / ICT / price actionCandlestick patterns
Updated 5 days ago · Apache-2.0 GitHub repository of VCP probe 02 fvg zones

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

The strategy detects smoothed RSI divergences on the price chart. It calculates smoothed RSI as the EMA of 3 applied to the 14-period RSI of close. Bullish divergence signals when smoothed RSI is below 40, with smoothed RSI rising over five bars while close ex

Strategy v6 Oscillators & momentumDivergence
Updated 5 days ago · Apache-2.0 GitHub repository of VCP probe 03 - rsi smooth divergence

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

This strategy calculates synthetic buy and sell volume from candlestick price action and computes a ten-bar rolling cumulative volume delta. It signals long entries with a fixed position size of one unit when the cumulative delta crosses above zero, and closes

Strategy v6 VolumeOscillators & momentum
Updated 5 days ago · Apache-2.0 GitHub repository of VCP probe 05 - cumulative vol delta

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

VCP probe 06 - adx regime

by pineforge-4pass
1 stars

This strategy isolates and tests manual directional movement and ADX calculations plotted directly on the main price chart. It constructs plusDI, minusDI, and ADX without using built-in indicators, entering a long position when ADX exceeds 25 in an uptrend and

Strategy v6 TrendOscillators & momentum
Updated 5 days ago · Apache-2.0 GitHub repository of VCP probe 06 - adx regime

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]

VCP Probe 07 - Session NY

by pineforge-4pass
1 stars

This Pine Script strategy isolates and validates session and timezone filtering using a basic market entry mechanism. It calculates active trading windows using timezone-aware time functions and enters a single long position at the start of the defined session

Strategy v6 Sessions & time
Updated 5 days ago · Apache-2.0 GitHub repository of VCP Probe 07 - Session NY

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

VCP Probe 08 - Integration

by pineforge-4pass
1 stars

This integration strategy combines seven analytical layers into a single system drawn directly on the main price chart. It calculates pivot highs and lows, Fair Value Gaps (FVG) scaled by ATR, smoothed RSI momentum, volume z-score anomalies, cumulative volume

Strategy v6 TrendVolume
Updated 5 days ago · Apache-2.0 GitHub repository of VCP Probe 08 - Integration

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

Volume Breakout

by pineforge-4pass
1 stars

The Volume Breakout strategy identifies directional price movements confirmed by trading volume spikes and Average True Range thresholds. It enters long positions when prices rise beyond a volatility-adjusted distance accompanied by above-average volume, and s

Strategy v6 VolumeVolatility & bands
Updated 5 days ago · Apache-2.0 GitHub repository of Volume Breakout

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

VWMA vs SMA Divergence

by pineforge-4pass
1 stars

This strategy tracks the difference between a Volume-Weighted Moving Average (VWMA) and a Simple Moving Average (SMA) of identical lengths. It enters a long position when the VWMA crosses above the SMA, and enters a short position when the VWMA crosses below t

Strategy v6 Moving averagesVolume
Updated 5 days ago · Apache-2.0 GitHub repository of VWMA vs SMA Divergence

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

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