Synced with GitHub · updated today

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

CSTL-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell events for CSTL on the price chart. It places green labels below bars for buys and red labels above bars for sells, each dated with a fixed timestamp and marked with an ETF count such as X1. The ETF input

Indicator v4
Updated 2 years ago · None stated GitHub repository of CSTL-tracker
261 stars

This indicator tracks and analyzes custom candlestick bar sequences in a separate pane. Users can define a pattern sequence of up to ten consecutive bars using specific criteria such as inside bar, outside bar, up bar, down bar, pin bar, or any bar type. The s

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of [RS] Bar Pattern Statistics Tool
114 stars

This indicator calculates normalized percentage bounds around price highs and lows to anticipate local trend reversals. It oscillates within a fixed -1 to 1 channel and plots two boundary tracking curves alongside a background Karobein oscillator histogram for

Indicator v4 Mean reversionOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Mean Reversion Indicator
106 stars

This strategy trades breakouts beyond Bollinger Bands on the main price chart. It features optional trend filters using various moving average types, a volatility filter based on standard deviation relative to its moving average, and a daily rate-of-change fil

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands - Breakout Strategy

Calculates the dominant cycle period of a price series using John Ehlers' Hilbert Transform algorithm, cross-checked against the TA-Lib implementation. It applies weighted price smoothing, FIR detrending, in-phase and quadrature component processing, and a hom

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Hilbert Transform Dominant Cycle Period

Educational Pine Script v4 indicator demonstrating how to request symbol data using the session settings of the main chart symbol. The script builds a custom ticker ID for a target ticker while inheriting the current session type, requests closing prices via t

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of Example 4: Same as Main Symbol Session Type Data
47 stars

Calculates the linear regression slope for a selected price source over a configurable rolling lookback window. It tracks running sums using ring buffers to determine the rate of price change per bar. Configurable settings include the lookback period and price

Indicator v6 Trend
Updated 8 months ago · MIT GitHub repository of Slope, Linear Regression (SLOPE)

Momentum

by TWODS-CAPITAL
37 stars

This indicator calculates momentum as the difference between the selected source and its value a chosen number of bars earlier. It plots that difference as a single line in a separate pane. The Length input sets the lookback, and the Source input selects which

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Momentum

This strategy connects TradingView signals to Zignaly crypto trading platform with risk management. It plots a Noro TrendRibbon on the price chart to generate trend signals for entries. Long and short positions open based on ribbon conditions using specified M

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Laddered C001

This indicator plots a double-smoothed Supertrend baseline on the price chart, combining a Supertrend midline with WMA and EMA smoothing to show trend direction. Direction uses an ATR-scaled baseline slope with hysteresis, while percentile-ranked slope magnitu

Indicator v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of Smooth Trend Radar [WavesUnchained]
7 stars

This multi-timeframe indicator calculates Stochastic oscillator directional bias across three user-defined timeframes. It compares %K and %D to determine whether momentum is bullish or bearish on each timeframe. When all three timeframes align in the same dire

Indicator v6 Oscillators & momentumTrend Repaints
Updated 3 months ago · None stated GitHub repository of Stoch MTF 3 TF Direction Only

Gold Centered Key Zones

by alboogycOdR
6 stars

This indicator plots horizontal dotted lines at evenly spaced key prices and a translucent rectangle centered on each line. The user sets the first and last level, the spacing between them, and how far each zone extends above and below its line. Drawing runs o

Indicator v5 Support & resistance
Updated 7 months ago · None stated GitHub repository of Gold Centered Key Zones

Highlight Month

by g-moe
3 stars

Highlight Month is a simple chart overlay indicator that shades the chart background during the first five weeks of the calendar year. It checks whether the current bar falls within week numbers one through five, highlighting the period corresponding to Januar

Indicator v5 Sessions & time
Updated 5 months ago · None stated GitHub repository of Highlight Month

Calculates and plots Anchored VWAP curves on the price chart based on specific user-selected event timestamps or standard periodic intervals such as daily, weekly, and monthly levels. It features customizable bands around the VWAP lines, configurable using per

Indicator v5 VolumeSupport & resistance Repaints
Updated 8 months ago · None stated GitHub repository of Anchored VWAP Pinch & Handoff, Intervals, and Signals

PF MTF Probe 06 60m Volume Sum

by pineforge-4pass
1 stars

A test strategy from a reference corpus that requests 60-minute volume and its 20-bar average from a lower-timeframe chart, with lookahead off. It enters one long unit when hourly volume is more than twice its average and closes the position when that conditio

Strategy v6 Volume
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF Probe 06 60m Volume Sum

S_exit_partial

by GammaExpansion
1 stars

This strategy is a deterministic test fixture that repeats a 48-bar cycle based on bar index. It opens fixed-size long entries at set phases and attaches limit and stop exits that reserve quantity, split size by percent, apply to later entries when no entry id

Strategy v6
Updated 6 days ago · MIT GitHub repository of S_exit_partial

HV Roll Multi Rare

by nishpa800
1 stars

A rolling high-volume event counter that marks clusters of rare volume peaks on the price chart. It tracks five rare tiers, from all-time high volume to 4000, 3000, 2000 and 1000 bar highs, across three lanes each, and signals when a set number of events occur

Indicator v5 Volume
Updated 2 months ago · None stated GitHub repository of HV Roll Multi Rare
1 stars

This strategy adapts the Chandelier Exit indicator to build a trend-following system with added audit filters. It calculates trailing stop levels using ATR and highest highs or lowest lows to determine directional shifts. Entries are filtered through a long-te

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Chandelier

Historical Bar Match

by mikeyhu70
1 stars

This indicator compares the colour pattern of the latest bars, green or red by close, with up to a thousand bars of history. It looks for earlier matches and shows what followed them in a dashboard table on the chart, listing the matched dates and bars. Lookba

Indicator v5 Candlestick patternsScreeners & dashboards
Updated 6 months ago · None stated GitHub repository of Historical Bar Match

Time

by ivansoft
1 stars

A Pine Script v5 library of time helper functions. It formats a timestamp into time, date and weekday strings, and measures how many seconds a condition has stayed true, with an optional reset on each new bar. Settings in the demo code cover tick counts, hold

Library v5 Sessions & time Repaints
Updated 1 year ago · None stated GitHub repository of Time

CYBR-tracker

by Allen1212
303 stars

This overlay indicator marks ARK Invest activity on the CYBR price chart. With the ETF input set to ALL, it draws a green buy label below the bar dated 16 January 2020, using the text Buy and a same-day count of X1. The script does not calculate price indicato

Indicator v4
Updated 2 years ago · None stated GitHub repository of CYBR-tracker
261 stars

This indicator plots multiple auto-multiplying Keltner Channels across different lookback lengths (5, 10, 25, 50, 100, and 200 periods) directly on the main price chart. It calculates exponential moving averages and range-based band offsets, dynamically adjust

Indicator v4 Volatility & bandsMoving averages
Updated 4 years ago · None stated GitHub repository of [RS] Simple Forecast - Keltner Worms
114 stars

Calculates normalized reversal metrics across up to ten Forex currency pairs using user-selected moving average methods, including HarmonicMA, EMA, SMA, or WMA. The indicator identifies overbought, oversold, and mean-crossing conditions using a configurable th

Indicator v4 Screeners & dashboardsMean reversion
Updated 1 year ago · None stated GitHub repository of Multi-Pair Trend Reversal Widget
106 stars

This strategy executes short trades based on Bollinger Bands and the Relative Strength Index (RSI). It plots the Bollinger Bands on the price chart and enters a short position when the closing price crosses above the upper band while RSI remains below 70. An e

Strategy v5 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands and RSI Short Selling

This indicator computes the InPhase and Quadrature components of the Hilbert Transform Phasor using Ehlers' FIR filter algorithm. It processes the input source (default HLC3) through smoothing, detrender, and phase shift steps to generate the components. Plots

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Hilbert Transform Phasor Components

Example 5

by be-thomas
65 stars

This indicator retrieves Heikin Ashi candle data for the current symbol and plots the low price of the Heikin Ashi candles directly on the price chart. It uses the security function to fetch the low value from a Heikin Ashi ticker for the chart's active timefr

Indicator v4 Candlestick patterns
Updated 5 days ago · GPL-3.0 GitHub repository of Example 5
47 stars

This indicator calculates the Spearman rank correlation coefficient between two series: a selected price source from the active chart and a price source from a secondary ticker symbol. Over a customizable lookback period, it ranks the values within a sliding w

Indicator v6
Updated 8 months ago · MIT GitHub repository of Spearman Rank Correlation (SPEARMAN)

Momentum Strategy

by TWODS-CAPITAL
37 stars

This strategy measures price momentum as the difference between the close and the close a set number of bars earlier, then measures the one-bar change of that momentum. It places a long stop order just above the bar high when both values are positive, and a sh

Strategy v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Momentum Strategy
13 stars

Ruckard Noro TrendRibbon N003 is a trend-following strategy designed to generate long and short trade signals based on side changes in the Noro Trendribbon indicator. It calculates upper and lower moving average corridors alongside ADX smoothing to identify ch

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon N003
9 stars

Smooth Trend Radar Strategy calculates a double-smoothed Supertrend baseline using WMA and EMA to identify trend direction and sideway regimes. It plots baseline rejection signals on flips, trend slope filters, and statistical overextension highlights with can

Strategy v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of Smooth Trend Radar Strategy
7 stars

This Pine Script strategy implements the Supertrend Elite Trend System for crypto markets. It combines signals from ten indicators including Supertrend, ALMA smoothing, CTI correlation, STC trend catcher, Gunxo sniper, DEMA with DMI, MM percentile, and DMI loo

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Supertrend Elite Trend System

ICT ORB

by alboogycOdR
6 stars

ICT ORB draws the opening range for a chosen session and marks breakout conditions on the price chart. It can require relative volume, a volume spike, a liquidity sweep, displacement, trend alignment, an order block, and higher-timeframe bias before a fair-val

Indicator v5 SMC / ICT / price actionBreakout
Updated 7 months ago · None stated GitHub repository of ICT ORB

The Historical Vol MA Band Indicator calculates volatility bands around a simple moving average using 52-week high and low data from the weekly timeframe. It plots upper, middle, and lower bands on the main price chart along with optional trailing stop-loss le

Indicator v5 Volatility & bandsMoving averages
Updated 5 months ago · None stated GitHub repository of Historical Vol MA Band Indicator

AR Forecast Scatterplot

by regalouisei
2 stars

This indicator plots an AR forecast on the price chart using the selected source. It computes autocorrelation between close and time across multiple lookback lengths to identify the strongest trend, then generates forecast results. Results appear as a scatter

Indicator v5 Trend
Updated 8 months ago · None stated GitHub repository of AR Forecast Scatterplot

Volume Accumulation (VA)

by mushroom-men-Trading
2 stars

This indicator calculates and plots a cumulative volume accumulation line in a separate pane. For each bar, it computes the bar midpoint between high and low, subtracts the midpoint from the close price, and multiplies the difference by the bar volume before a

Indicator v6 Volume
Updated 9 months ago · None stated GitHub repository of Volume Accumulation (VA)
1 stars

This strategy analyzes closing prices from three simultaneous multi-timeframe security feeds: 60-minute, 240-minute, and daily. It identifies confluence when all three closes are rising (allUp) or falling (allDown) from the prior bar. When allUp and no long po

Strategy v6 TrendSMC / ICT / price action
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF probe 07 - triple TF close

S_margin

by GammaExpansion
1 stars

S_margin is a strategy designed to test margin rules, leverage calculations, and liquidation price tracking in Pine Script v6. Operating on a repeating 40-bar cycle, it enters a long position sizing at 300% equity on phase 0, exits on phase 18, enters a short

Strategy v6
Updated 6 days ago · MIT GitHub repository of S_margin

Fractal Mirror Levels

by morindok
1 stars

Fractal Mirror Levels identifies swing highs and swing lows using multi-bar fractal logic and projects mirrored horizontal support and resistance levels across the price chart. Users select two interactive points directly on the chart to establish a reference

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Fractal Mirror Levels
1 stars

Bearish-only overlay indicator that plots 36 sell-side detection markers on the price chart. It combines high-volume candles, standard deviation displacement and a PBJ trend filter, with a revised price-spike relative volume ladder in this build. Toggles switc

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ Bearish New RVOL v1.0
1 stars

This strategy identifies pivot-based Darvas Box levels on the price chart and trades re-entries following box sweeps. A long position arms when the price dips below the lower boundary and triggers when it closes back inside, provided the price is above a highe

Strategy v6 Support & resistanceBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Darvas Box v6

Key Levels

by mikeyhu70
1 stars

A Pine Script v5 indicator that draws support and resistance zones on the price chart from recent pivot highs and lows. Zone width is based on ATR times a multiplier, capped by a maximum percentage, and overlapping zones can be aligned and extended to the righ

Indicator v5 Support & resistanceVolatility & bands
Updated 6 months ago · None stated GitHub repository of Key Levels

Value

by ivansoft
1 stars

An indicator in a separate pane that works with traded value, volume times the mid price. It shows single bar values, levels derived from them, values from higher timeframes of one day and one week, cumulative volume over eight, twenty-four and forty-eight bar

Indicator v5 VolumeSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Value

DANE-tracker

by Allen1212
303 stars

DANE-tracker is a Pine Script v4 overlay that marks dated purchase events on the DANE price chart. With the ETF input set to ALL, the only available choice, it places green labels below the bars on 16 January 2020 and 22 January 2020, each reading a buy with a

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

Browse by Category

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

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