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

BlackSwan Strategy

by hasnocool
106 stars

This strategy detects large single-candle body expansions exceeding approximately 1.91% of price to enter momentum breakouts. It enters long positions on large bullish candles and short positions on large bearish candles. Positions are closed when the 144-peri

Strategy v4 BreakoutMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BlackSwan Strategy

Pivot Points (DeMark)

by mihakralj
99 stars

This indicator plots Tom DeMark pivot levels on the price chart. It reads the prior completed bar of a selected daily, weekly, or monthly timeframe and applies a conditional formula that weights the high, low, and close according to whether that bar closed bel

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Pivot Points (DeMark)
3 stars

Price Action Candles is an overlay indicator that marks simple swing patterns on the price chart. A green triangle appears below a bar when a low two bars earlier is below the lows around it and the next low is higher. A red triangle appears above a bar when t

Indicator v5 Candlestick patternsSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles

Golden Pocket

by regalouisei
2 stars

Golden Pocket indicator identifies potential reversal zones by drawing Fibonacci retracement lines and boxes between pivot highs and lows on the price chart. It applies moving average filters to confirm trend direction for both bull and bear setups. Users can

Indicator v5 Support & resistanceMoving averages
Updated 8 months ago · None stated GitHub repository of Golden Pocket
1 stars

This overlay strategy keeps a bounded deque of one-bar rate-of-change values and measures how many are positive and their average. It enters one long position of two units when the positive share rises through the minimum share, the average return is positive,

Strategy v6 Oscillators & momentumMoving averages
Updated 5 days ago · Apache-2.0 GitHub repository of PineForge — Spectrum Array Deque

PRLB-tracker

by Allen1212
303 stars

This indicator visualizes historical ARK Invest transactions for Proto Labs (PRLB) directly on the price chart. It hardcodes past purchase and sale records based on historical ETF filings and plots green or red labels at specific bar timestamps. The labels ind

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

Bolinger strategy

by hasnocool
106 stars

This long-only strategy combines a five-bar RSI with Bollinger percent B and bandwidth on the current close and the close three bars earlier. It opens a long when a local low around that earlier bar falls inside a bar-count window and current percent B stays i

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bolinger strategy
99 stars

This indicator plots extended traditional floor-trader pivot levels on the price chart. It takes the prior high, low, and close of a selected daily, weekly, or monthly timeframe and calculates the central pivot plus five resistance levels and five support leve

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Pivot Points (Extended)
3 stars

This indicator calculates a 30-period and a 50-period simple moving average of the closing price and plots both lines in a separate pane. It fills the space between them teal when the shorter average is above the longer average and red when it is below. There

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Price Action Candles

Heatmap Volume [xdecow]

by regalouisei
2 stars

This indicator classifies volume by how many standard deviations it sits from a moving average and colors that classification as a heatmap in a separate pane. Extra-high, high, medium, normal, and low bands use multiplier thresholds. Users can color volume bar

Indicator v5 VolumeMoving averages
Updated 8 months ago · None stated GitHub repository of Heatmap Volume [xdecow]

PineForge — Terrace Pyramid

by pineforge-4pass
1 stars

This strategy plots the Trend EMA and Deep Terrace levels on the price chart to identify rising trends. It signals long pyramid entries in staged terraces when price crosses above the first, second, or third ATR-based levels during an upward trend, with up to

Strategy v6 TrendMoving averages
Updated 5 days ago · Apache-2.0 GitHub repository of PineForge — Terrace Pyramid

PRME-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell activity for PRME as labels on the price chart. Green labels below bars mark buys and red labels above bars mark sells, each dated with a timestamp and showing an ETF count such as X1. The ETF input switc

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

The Bollinger %B Candles Strategy evaluates price volatility and momentum by calculating Bollinger Bands %B oscillator values in a separate pane. It incorporates customizable moving average filters, ATR multipliers, and optional higher-timeframe yearly high or

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger %B Candles Strategy
99 stars

This indicator plots Fibonacci pivot levels on the price chart. It takes the previous completed bar's high, low, and close from a daily, weekly, or monthly timeframe and sets the pivot as their average. Resistance and support sit at 38.2 percent, 61.8 percent,

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Pivot Points (Fibonacci)
3 stars

Price Action Candles highlights consecutive range-containing bars on the price chart. It marks a bar when its high is at or above the prior high and its low is at or below the prior low, so the current range contains the previous bar. It paints the background

Indicator v5 Candlestick patterns
Updated 5 months ago · None stated GitHub repository of Price Action Candles
2 stars

This indicator implements Hosoda's Ichimoku Theories directly on the price chart, combining standard Ichimoku Kinko Hyo components (Tenkan-sen, Kijun-sen, Kumo cloud, and Chikou span) with Time Theory and Wave Theory analysis. It detects swing highs and lows,

Indicator v5 TrendSupport & resistance
Updated 8 months ago · None stated GitHub repository of Ichimoku Theories [LuxAlgo]
1 stars

This strategy computes the MACD with user-defined fast, slow, and signal lengths, then plots the MACD line, signal line, and histogram in a separate pane. It generates long entries on MACD crossover and short entries on MACD crossunder, but restricts signals t

Strategy v6 Oscillators & momentumSessions & time
Updated 5 days ago · Apache-2.0 GitHub repository of PineForge — Waypoint Weekday MACD

PRNT Tracker

by Allen1212
303 stars

PRNT Tracker plots historical trade activity of ARK Invest directly onto the price chart. It hardcodes transaction records to display green labels below price bars for buy transactions and red labels above price bars for sell transactions, along with counts in

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

This strategy plots a 20-period simple moving average of the close and Bollinger bands from one through five standard deviations. It draws the basis and each upper and lower band on the price chart, then fills the zones between successive bands in different co

Strategy v4 Volatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger band (band display 5σ)

Pivot Points (Woodie)

by mihakralj
99 stars

This indicator calculates and plots Woodie's pivot points using a weighted closing price formula across daily, weekly, or monthly periods. It computes the central pivot point along with three resistance levels (R1, R2, R3) and three support levels (S1, S2, S3)

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Pivot Points (Woodie)
3 stars

This lightweight indicator calculates a 9-period Exponential Moving Average (EMA) and a 20-period EMA, plotting both directly on the price chart overlay. It also plots a third line in orange that displays the mathematical sum of the two EMAs as a simple trend

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Price Action Candles

Indicators Overlay

by regalouisei
2 stars

Indicators Overlay plots up to ten technical indicators directly on the main price chart using line drawings, avoiding the need for separate sub-panes. It calculates common technical metrics such as RSI, CCI, OBV, Stochastic, MFI, ATR, CMO, CMF, Stochastic RSI

Indicator v5 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Indicators Overlay

Pivot Array Breakout

by pineforge-4pass
1 stars

Pivot Array Breakout is a breakout strategy that tracks dynamic pivot high resistance and pivot low support levels using array buffers. When a new pivot is identified, it is added to a size-limited array while older levels are removed. The strategy enters a lo

Strategy v6 BreakoutSupport & resistance
Updated 5 days ago · Apache-2.0 GitHub repository of Pivot Array Breakout

PSNL Tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest transaction records for Personalis Inc (PSNL) directly onto the price chart. It plots labels on specific historical timestamps where ARK funds initiated buy or sell transactions, displaying trade details such as tr

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

This strategy enters long positions during a specified trading session when multiple technical indicators align. It executes a buy order when the low drops below the lower Bollinger Band while RSI and ADX exceed configurable threshold values, price closes abov

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band + RSI + ADX + MACD
99 stars

This indicator calculates J. Welles Wilder's Plus Directional Indicator (+DI) to measure upward price momentum. It computes Positive Directional Movement (+DM) and True Range (TR), smoothing them using a compensated Running Moving Average (RMA) technique for a

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Plus Directional Indicator (+DI)
2 stars

This indicator provides an interactive framework for validating Elliott Wave motive wave structures directly on the price chart. Users select six anchor points corresponding to wave origins and terminals (points 0 through 5) using interactive chart inputs. The

Indicator v5 Support & resistanceTrend
Updated 8 months ago · None stated GitHub repository of Interactive Motive Wave Checklist

Range Filter

by pineforge-4pass
1 stars

Calculates an exponential moving average of candle ranges scaled by a multiplier to build an adaptive, stateful trend filter. It updates dynamic upper and lower bands that drift with price action and track market direction. The strategy enters long when the fi

Strategy v6 TrendVolatility & bands
Updated 5 days ago · Apache-2.0 GitHub repository of Range Filter

PSTG-tracker

by Allen1212
303 stars

PSTG-tracker plots historical ARK Invest purchase and sale records for Pure Storage on the price chart. The script uses hardcoded timestamp locations to display green buy and red sell labels directly on specific historical bars. An input selector allows filter

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

Bollinger Band Breakout is a positional strategy combining Bollinger Bands with the Relative Strength Index (RSI). It opens long positions when price crosses above the upper Bollinger Band while 14-period RSI is between 60 and 70. Short entries trigger when pr

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band Breakout
99 stars

This indicator calculates Wilder's plus directional movement and plots the smoothed value in a separate pane. On each bar it compares the upward and downward price moves, keeps only a positive up move that exceeds the down move, then applies a compensated RMA

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Plus Directional Movement (+DM)

This indicator plots a linear regression line based on closing prices using a 10-period window. The regression calculates a straight line that best fits the price data points over the specified length. It draws the resulting trend line in a separate pane for v

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Price Action Candles with Linear Regression
2 stars

Intersection Value Functions calculates the exact price level where two series intersect during a crossover or crossunder. It uses linear interpolation based on line slopes between consecutive bars to pinpoint the exact crossover value. The indicator plots two

Indicator v5 Moving averagesSupport & resistance
Updated 8 months ago · None stated GitHub repository of Intersection Value Functions

Regex String Filter

by pineforge-4pass
1 stars

Calculates RSI and MACD indicators to evaluate trade signals parsed dynamically from an input text rule string. It uses regular expression matching to determine whether an RSI threshold rule, a MACD bullish signal line rule, or both must be satisfied. When all

Strategy v6 Oscillators & momentumTrend
Updated 5 days ago · Apache-2.0 GitHub repository of Regex String Filter

PSTI-tracker

by Allen1212
303 stars

PSTI-tracker overlays historical ARK Invest buy and sell transaction records directly on the price chart for PSTI stock. It places green buy labels below bars and red sell labels above bars at specific historical timestamps when ARK funds transacted. Input set

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

This strategy combines Volume Weighted Moving Average (VWMA) Bollinger Bands with 200-period and 50-period Exponential Moving Averages (EMAs). It identifies long trade opportunities when the 50 EMA is above the 200 EMA and price falls to or below the lower Fib

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band with Fib Golden Ratio (0.618)

This indicator plots the Poisson cumulative distribution function of a price series in a separate pane. It min-max normalizes the selected source over a lookback window, scales that value into a Poisson rate lambda, and returns the probability that a Poisson c

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Poisson Distribution CDF (POISSONDIST)

This overlay indicator combines price-action swing structure with a MACD comparison and a dual moving-average filter. It finds pivot highs and lows, labels higher highs, lower highs, higher lows and lower lows, and builds a trend bias from those swings. It rep

Indicator v5 Candlestick patternsOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles with MACD Signals

RSI with Bollinger Bands

by pineforge-4pass
1 stars

Calculates the Relative Strength Index (RSI) and wraps Bollinger Bands directly around the RSI series rather than price. It enters long positions when the RSI drops below its lower band and hooks back upward, and enters short positions when the RSI exceeds the

Strategy v6 Oscillators & momentumVolatility & bands
Updated 5 days ago · Apache-2.0 GitHub repository of RSI with Bollinger Bands

PTC-tracker

by Allen1212
303 stars

PTC-tracker is an overlay indicator that marks historical ARK Invest purchase dates for PTC on the price chart. It places green below-bar labels at fixed timestamps, each reading as a buy with a count of one. The only input selects an ETF filter and currently

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

This strategy plots RSI in a separate pane and combines it with Bollinger Bands calculated on the selected source. It opens a long when RSI is below 30 and price is below the lower band, then closes that long when RSI rises above 70. Percentage take-profit and

Strategy v4 Oscillators & momentumVolatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band with RSI
99 stars

This indicator plots a rolling polynomial regression fitted to a chosen price source over a lookback window. It builds the normal equations, solves them with Gauss-Jordan elimination and partial pivoting, and returns the polynomial value at the current bar. Pe

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Polynomial Fitting (POLYFIT)

This overlay strategy combines swing price structure with MACD structure and two higher-timeframe exponential moving averages. It finds pivot highs and lows over ten bars, labels higher highs, lower highs, higher lows and lower lows, and builds matching states

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles with MACD Signals Strategy
2 stars

Calculates and projects key liquidity levels directly on the main price chart based on volume pivot highs. When a volume peak is detected, the indicator captures the closing price from that period and plots horizontal lines across the chart. It also features o

Indicator v5 Support & resistanceVolume
Updated 8 months ago · None stated GitHub repository of Liquidity Levels [LuxAlgo]

Session islastbar flatten

by pineforge-4pass
1 stars

This strategy enters long positions when a 9-period Simple Moving Average (SMA) crosses above a 21-period SMA during active market session hours. To avoid holding positions overnight, it automatically exits all open trades on the final bar of the session using

Strategy v6 Moving averagesSessions & time
Updated 5 days ago · Apache-2.0 GitHub repository of Session islastbar flatten

PTNR-tracker

by Allen1212
303 stars

This indicator marks recorded ARK Invest purchases of PTNR on the price chart. It draws green labels below the bars at fixed calendar dates, anchored by bar time, with text that shows a buy and a count of one. One input chooses the ETF view, and the only liste

Indicator v4
Updated 2 years ago · None stated GitHub repository of PTNR-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