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

This script monitors opening gap conditions and breakout behavior relative to the first candle's range across up to twenty configurable stock tickers. It detects whether following bars remain inside the opening range before breaking out, displaying the status

Strategy v4 Screeners & dashboardsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 1St Bar GAP+BkOut Screener v2 by RM

HA: Heikin-Ashi

by mihakralj
99 stars

This indicator calculates and plots Heikin-Ashi smoothed candlesticks directly on the price chart. It derives the smoothed close from standard price averages and recursively computes the open, high, and low values. The script does not issue trade signals or al

Indicator v6 Candlestick patternsTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of HA: Heikin-Ashi

My Script

by be-thomas
65 stars

This indicator draws a single persistent label on the price chart. It creates the label once above the bar at the close, then moves that same label to the current bar index on every bar and sets a tooltip. It does not calculate an oscillator, moving average, o

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Supertrend

by TWODS-CAPITAL
37 stars

This indicator plots the Supertrend line on the price chart using TradingView's built-in Supertrend calculation. It derives the line from the average true range and a multiplier, then colors an uptrend green and a downtrend red. A light fill sits between the c

Indicator v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Supertrend

Trailering C002

by ruckard
13 stars

This strategy evaluates price excursion using Curie closing moving averages on the price chart to trigger trades and manage positions. It supports both long and short positions with configurable strategy date ranges and strict mode conditions. Built as an auto

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering C002

This overlay indicator draws prior month, week, and day reference levels on the price chart, plus current month levels. It plots prior month high and low, open and close, and point of control, current month high and low and point of control, prior week high an

Indicator v5 Support & resistanceSessions & time

ORB + Fib + MACD Strategy

by alboogycOdR
6 stars

This strategy builds a timed opening range and tracks session high and low on the price chart. It flags bullish and bearish breakouts of that range and uses Fibonacci levels for an entry zone, a default stop, and an optional take-profit extension. Take profit

Strategy v5 BreakoutSupport & resistance
Updated 7 months ago · None stated GitHub repository of ORB + Fib + MACD Strategy

MACD Signals

by g-moe
3 stars

The MACD Signals indicator plots dual Exponential Moving Averages (EMAs) and generates buy and sell signals directly on the price chart based on MACD crossovers filtered by trend context. Users can configure independent EMA and MACD parameter settings for long

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

HTF Liquidity Levels

by regalouisei
2 stars

This indicator tracks and draws higher-timeframe liquidity levels directly on the price chart using customizable horizontal lines. It plots upper and lower liquidity reference boundaries across up to five user-configured timeframes, ranging from monthly down t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of HTF Liquidity Levels
1 stars

This strategy probes trading engine behavior on the price chart. It places time-based pending entries with stops: at 2:00 it adds a short with stop at half the low if flat; during the 2:00-2:45 window it adds a long with stop above the high plus tick if flat;

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 79 - far opposite pending
1 stars

Reflects past swing pivots across a chosen time axis on the price chart. The user selects a mirror time and a ratio; the script records confirmed pivot highs and lows that occurred before that time, using adjustable left and right lengths of five bars. When a

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirrored Pivots - Time Reflection
1 stars

A short price-chart indicator that plots a 20 and a 50 period EMA and waits for a pullback after each crossover. After the 20 crosses above the 50, it looks for price to touch the 50 and then prints a buy triangle on the next green-closing candle. After a down

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of Terilss EMA20-EMA50 Pullback Alert

Naga Disp v2.1 (Tick)

by nishpa800
1 stars

Marks a candle when a very high volume reading and a large displacement happen on the same bar. Volume tiers compare the bar against lookbacks of 1000, 2000, 3000 and 4000 bars, and displacement compares the candle range to a standard deviation multiple with a

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Naga Disp v2.1 (Tick)
1 stars

This strategy tracks the high and low price levels established during the Tokyo trading session (00:00–08:00 UTC) and seeks breakout entries during the London and New York sessions. Long trades trigger when price breaks above the Tokyo high, confirmed by price

Strategy v6 BreakoutSessions & time
Updated 2 months ago · None stated GitHub repository of TN Tokyo Breakout Refined v6

MD Range Finder 3 (V2)

by mikeyhu70
1 stars

A Pine Script v4 indicator, a second variant of the range finder, that locates a price range over a 500-bar period and draws baselines at 0, 0.5 and 1 on the price chart, with Fibonacci-style extension lines projected from it. Lines extend to the right by defa

Indicator v4 Support & resistance
Updated 6 months ago · None stated GitHub repository of MD Range Finder 3 (V2)

HLAN-tracker

by Allen1212
303 stars

The HLAN Tracker visualizes ARK Invest trading activity directly on the price chart for the HLAN ticker. It draws historical buy and sell labels positioned by exact bar timestamps to display when ARK funds transacted the stock. Each label indicates the transac

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

Test-023-Mdim

by ricardosantos79
261 stars

This indicator calculates a flattened one-dimensional index from up to three array coordinates and their dimension limits. A function walks matching index and limit arrays and combines them into a single offset, returning na when the arrays are empty or of dif

Indicator v4
Updated 4 years ago · None stated GitHub repository of Test-023-Mdim

2 Candles Inside ATR

by hasnocool
106 stars

2 Candles Inside ATR is an overlay script that measures volatility compression across two consecutive candles. It calculates a smoothed Average True Range (ATR) and compares it against the combined high and low range of the current and previous bars. When the

Strategy v4 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of 2 Candles Inside ATR

Hann FIR Filter (HANN)

by mihakralj
99 stars

This indicator calculates a finite impulse response filter using Hann window coefficients and plots the smoothed series on the price chart. It weights the selected source with a raised-cosine window over the chosen length and divides by the sum of the weights.

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Hann FIR Filter (HANN)

My Script

by be-thomas
65 stars

This script calculates the time difference between consecutive bars to project label placement into the future. On the final bar of the chart, it evaluates the bar interval duration and draws a label three bars ahead of the current bar at the close price using

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Supertrend Strategy

by TWODS-CAPITAL
37 stars

This strategy uses the built-in Supertrend calculation to generate long and short trade entries based on trend reversals. It triggers a long position when the Supertrend direction flips to indicate an uptrend and a short position when it flips to indicate a do

Strategy v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Supertrend Strategy

Trailering D002

by ruckard
13 stars

Trailering D002 is an execution strategy template designed for automated crypto trading on price charts. It evaluates High and Low Curie moving average closing lines to identify potential entry conditions across customizable time windows. The strategy manages

Strategy v5 Moving averages
Updated 1 year ago · None stated GitHub repository of Trailering D002
6 stars

This Pine Script indicator calculates the Opening Range Breakout (ORB) high and low within user-defined New York or London session times. It plots a colored box on the price chart marking the ORB range and its start bar index. After the session ends it detects

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ORB + ICT Hybrid Indicator

MACD Signals

by g-moe
3 stars

MACD Signals overlays buy and sell labels on the price chart by combining MACD crossovers with RSI conditions. A buy signal is generated when a bullish MACD crossover occurs within a user-defined bar limit after the RSI dips below an oversold threshold, while

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of MACD Signals
2 stars

This indicator tracks and visualizes cyclical turning points based on Hurst cycle principles in a separate pane. It identifies confirmed pivot highs or lows across multiple harmonic lengths ranging from half-cycle to 32x cycles. For each cycle length, it calcu

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Hurst Diamond Notation Pivots
1 stars

This validation strategy tests broker execution priority when opposing pending stop orders are active simultaneously. At scheduled times (02:45 and 14:45), when flat, it places paired long and short stop orders at percentage offsets from the closing price. Pos

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 80 - Dual Stop Priority
1 stars

Mirrored Price Polyline reflects price action across an interactive reference line drawn directly on the price chart. Users select two anchor points with custom time and price coordinates. The script calculates the slope between these points to define a centra

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirrored Price Polyline

The Bear Crossover

by vedkanani123
1 stars

A simple moving average crossover indicator drawn on the price chart. It plots an 11-period and a 51-period exponential moving average. A BUY label appears when the fast line crosses above the slow line on a bullish candle, and a SELL label appears when it cro

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of The Bear Crossover

MD Range Finder 3 (V3)

by mikeyhu70
1 stars

A Pine Script v4 indicator, a third variant of the range finder, that locates a price range over a 500-bar period and draws baselines at 0, 0.5 and 1 on the price chart, with Fibonacci-style extension lines projected from it. Lines extend to the right by defau

Indicator v4 Support & resistance
Updated 6 months ago · None stated GitHub repository of MD Range Finder 3 (V3)

HO-tracker

by Allen1212
303 stars

HO-tracker is an overlay indicator that places dated labels for historical ARK Invest purchases and sales on the price chart. Green labels below bars mark buys and red labels above bars mark sells, each showing a same-day ETF count such as X1. The ETF input sw

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

Test-024-Newfu

by ricardosantos79
261 stars

This indicator is a developer test of Pine Script v4 integer-array helpers rather than a market signal. It builds a small integer array, then applies unshift, reverse, index lookup, shift, last index, includes, average, standard deviation, variance, copy, sort

Indicator v4
Updated 4 years ago · None stated GitHub repository of Test-024-Newfu

255 EMA Strategy

by hasnocool
106 stars

255 EMA Strategy combines an exponential moving average with Average True Range bands and standard MACD crossovers to generate entry signals. Drawn directly on the price chart, it plots the central 255 EMA along with upper and lower volatility envelopes. Trade

Strategy v4 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 255 EMA Strategy
99 stars

This indicator calculates the harmonic mean of a source series over a rolling lookback and plots the result in a separate pane. It stores recent values in a circular buffer, updates a running sum of reciprocals, and returns the count of valid samples divided b

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Harmonic Mean (HARMEAN)

My Script

by be-thomas
65 stars

This strategy places orders only when the bar year is after 2014 and before 2016. It enters a long using one-cancels-all reduce, then attaches an exit with a profit target of 100 and a stop loss of 200. It also submits a short entry using OCA cancel and a shor

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Technical Ratings

by TWODS-CAPITAL
37 stars

This indicator scores price using moving averages, oscillators, or both, then maps the result to buy, sell, and neutral ratings. It compares several simple and exponential averages, a Hull average, a volume-weighted average, and Ichimoku lines with price, and

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Technical Ratings

Trailering E002

by ruckard
13 stars

Trailering E002 is a trading strategy that uses moving average closing lines to optimize entries, take profit levels, and stop loss execution. Applied directly on the main price chart, it tracks price excursion to refine trades and includes date filtering for

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trailering E002

SMC Strategy Hub + Alerts

by eddiebelaval
7 stars

This indicator marks market structure shifts when price closes beyond the prior lookback high or low, then labels a buy or sell with an ATR-based stop and a take-profit distance set by the TP multiplier. Optional boxes highlight bullish and bearish fair value

Indicator v5 SMC / ICT / price actionBreakout
Updated 3 months ago · None stated GitHub repository of SMC Strategy Hub + Alerts
6 stars

This indicator tracks opening range breakout (ORB) windows for the London and New York sessions and identifies ICT-style liquidity grabs. It calculates the high and low boundaries during the configured session periods and plots visual boxes directly on the pri

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ORB + ICT Hybrid Indicator

MACD Signals with Alert System combines multiple technical indicators into a unified signal and alert generator overlaid on the price chart. It calculates a Hull Moving Average, MACD histogram, three Exponential Moving Averages, Slow Stochastic, and Time Segme

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of MACD Signals with Alert System

Ichimoku Kinkō Hyō

by regalouisei
2 stars

This indicator plots an enhanced version of the traditional Ichimoku Kinkō Hyō on the main price chart. It calculates adaptive Tenkan-Sen and Kijun-Sen lines using dynamic lookback periods adjusted by volume, ATR volatility, and Chikou trend filters. Users can

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Ichimoku Kinkō Hyō
1 stars

This Pine Script v6 strategy is a validation probe that places competing stop entries close to price. At 02:45, while flat, it submits a long stop slightly above the close and a short stop slightly below the close. At 06:15, if a position is open, it closes ev

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 81 - dual stop near only

TL Range X V3

by vedkanani123
1 stars

An indicator for the price chart that builds a ladder of resistance and support levels from a daily range divided by a divisor, measured from the daily, weekly or monthly open, with extra levels unlocking on strong runs and optional Fibonacci lines inside each

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of TL Range X V3

Proximity GZI HV

by nishpa800
1 stars

Detects fair value gaps on the price chart and flags two proximity signals. The GZI signal appears when opposite fair value gaps overlap within a set number of bars, and the HV signal appears when a gap forms on a bar with the highest volume of the last 63, 25

Indicator v5 SMC / ICT / price actionVolume
Updated 2 months ago · None stated GitHub repository of Proximity GZI HV

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