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

Example 9

by be-thomas
65 stars

This script retrieves non-standard Kagi chart data for the active symbol using a fixed reversal threshold of one. It extracts the closing price of the Kagi bars through the security function and plots the resulting values directly onto the main price chart pan

Indicator v4 Trend Repaints
Updated 5 days ago · GPL-3.0 GitHub repository of Example 9

The Stoller Average Range Channel (STARCHANNEL) plots volatility-based bands around a central baseline directly on the price chart. It calculates a middle line using a simple moving average of the selected price source and constructs upper and lower boundaries

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Stoller Average Range Channel (STARCHANNEL)
37 stars

This indicator plots a MACD oscillator in a separate pane. It subtracts a slow moving average of the source from a fast one, then smooths that difference into a signal line and draws the gap as a histogram. Fast and slow lengths, source, signal length, and SMA

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Moving Average Convergence Divergence
13 stars

Ruckard Squeezed B004 is a trading strategy based on Squeeze Momentum indicator transitions. It tracks section height changes across momentum color cycles using high and low closing moving averages. Entries fire when momentum values breach key threshold levels

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Squeezed B004

Swing Conviction Radar measures the strength of individual price swings by calculating a composite conviction score from 0 to 100 at confirmed pivots. It evaluates three swing components: ATR-normalized speed, trend cleanliness (fraction of on-trend bars), and

Indicator v6 Oscillators & momentumVolume
Updated 2 days ago · MIT GitHub repository of Swing Conviction Radar [WavesUnchained]
6 stars

Identifies ICT Silver Bullet setups by tracking fair value gaps and market structure shifts across specific London and New York trading sessions. Plots session windows, liquidity highs and lows, fair value gap boxes, and projected entry levels with dynamic or

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of ICT Silver Bullet NuburoFX02
3 stars

HTF Condition Strategy is a multi-timeframe trading strategy that evaluates market structure conditions on both a higher timeframe and the current chart timeframe. Users can configure entry rules combining conditions such as bullish bias, higher lows, or lower

Strategy v5 TrendScreeners & dashboards
Updated 5 months ago · None stated GitHub repository of HTF Condition Strategy

This indicator tracks Bitcoin market sentiment by comparing 28-day price changes against 28-day percentage changes in unique active addresses retrieved via Quandl. It plots the daily active address rate of change alongside price momentum and surrounds it with

Indicator v5 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Blockchain Fundamentals: Active Address Sentiment Oscillator [CR]

Volume Weighted Average Price (VWAP)

by mushroom-men-Trading
2 stars

This indicator calculates the Volume Weighted Average Price (VWAP) based on the provided source price series, typically hlc3, weighted by volume. The VWAP resets at the beginning of the specified session type, such as daily (1D), hourly (1H), or custom interva

Indicator v6 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of Volume Weighted Average Price (VWAP)
1 stars

A test strategy from a reference corpus that checks independent exit brackets. It goes long two units when a 9-period EMA crosses above a 21-period EMA and RSI is below 60. Two exit orders each handle one unit, one with a stop and target one ATR from the avera

Strategy v6 Volatility & bandsMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF OCA Probe 02 Multi-Bracket Isolation

S_risk_allow_entry_in

by GammaExpansion
1 stars

This Pine Script v6 strategy fixture tests a long-only entry restriction. It splits bars into cycles of 16, enters long at phase 0, tries short entries at phases 4 and 8, closes every position at phase 12, and cancels pending orders at phase 15. An opposing sh

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

NIFTY 5m Supertrend Scalper

by vedkanani123
1 stars

A price-chart indicator designed for the one-minute chart of Indian index instruments. It computes a Supertrend with ATR length 10 and multiplier 3 on confirmed five-minute bars, so a flip signal appears on the first one-minute bar after the five-minute close.

Indicator v6 TrendScalping
Updated 2 months ago · None stated GitHub repository of NIFTY 5m Supertrend Scalper

HV+D PBJ Bullish v1

by nishpa800
1 stars

Bullish half of a split HV+D and PBJ indicator, drawn on the price chart. It plots 38 buy-side markers that combine high-volume candles, standard deviation displacement and a PBJ moving average and Supertrend filter. Each pattern, such as the UUUU, UUU, Foxtro

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ Bullish v1
1 stars

A Fibonacci pullback strategy on the price chart. It finds the highest high and lowest low over a lookback, then draws long and short retracement levels at a chosen ratio from 0.236 to 0.786. A trade is only considered at one specific hour, in the direction of

Strategy v6 Support & resistanceTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fibonacci
1 stars

This indicator estimates a dominant cycle with the Goertzel algorithm, then scans a set number of past bars for similar patterns to project future prices and dates. A dashboard table on the price chart lists the results. Cycle length, forecast periods, lookbac

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Price and Date Forecast V2

This indicator marks volume spikes and growing-volume conditions on the price chart. A spike is flagged when volume reaches a chosen multiple of the median over a selected lookback. Growing volume is flagged when a short recent median exceeds a longer median b

Indicator v5 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Volume Spikes & Growing Volume Signals With Alerts

DOYU-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of DOYU on the price chart. When the ETF input is ALL, it places green buy labels below the bar and red sell labels above the bar on fixed calendar dates, each labeled with an X1 count. The

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

Double Size Every Bar

by ricardosantos79
261 stars

Double Size Every Bar is an experimental Pine Script v4 indicator that demonstrates array size manipulation across price bars. The script initializes a persistent floating-point array and dynamically inserts new elements on each bar execution, causing the arra

Indicator v4
Updated 4 years ago · None stated GitHub repository of Double Size Every Bar

Price Divergence

by capissimo
114 stars

This indicator detects regular and hidden divergences across multiple technical factors plotted directly on the price chart. It evaluates price highs and lows against peaks and troughs identified by a five-bar fractal mechanism on RSI, RSI Stochastic, MACD, re

Indicator v4 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Price Divergence
106 stars

This strategy calculates standard Bollinger Bands and plots the basis, upper band, and lower band directly on the price chart. It places breakout stop orders, entering long when price crosses above the upper band and short when price falls below the lower band

Strategy v5 Volatility & bandsBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Stop Strategy
99 stars

Calculates John F. Ehlers' MESA Stochastic oscillator by processing price data through a roofing filter before applying stochastic logic. The roofing filter combines a high-pass filter to remove low-frequency trend components and a super smoother filter to fil

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers MESA Stochastic (MSTOCH)

Example security 1

by be-thomas
65 stars

This indicator plots the 15-minute close of NYSE:IBM on the current chart. It calls the security function with a fixed symbol, the 15-minute timeframe, and the close, then draws that series as one overlay line. There are no inputs, alerts, or trade entries and

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

This indicator calculates a two-pole IIR Butterworth-style supersmooth lowpass filter and plots the resulting smoothed curve directly on the price chart overlay. It filters out high-frequency noise from market data with minimal lag. The user can adjust the cal

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Supersmooth Filter (SSF)

Moving Average Exponential

by TWODS-CAPITAL
37 stars

This indicator plots an exponential moving average of a chosen price source on the price chart. The length input sets the EMA period and the offset input shifts the plotted line forward or backward. A second line smooths the EMA with a selectable method: SMA,

Indicator v5 Moving averages
Updated 3 years ago · MIT GitHub repository of Moving Average Exponential
13 stars

Ruckard Squeezed C005 is a strategy that identifies divergence patterns based on section height changes in the Squeeze Momentum indicator. It evaluates transitions between histogram color phases to detect momentum peaks for long and short entries. Trades are m

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Squeezed C005

This indicator evaluates market structure events, including breaks of structure, liquidity sweeps, and order blocks, by calculating reaction speed, validation, and volatility activity scores. It plots composite scores in a separate pane while offering optional

Indicator v6 Volatility & bandsSMC / ICT / price action
Updated 2 days ago · MIT GitHub repository of Time-to-React + Volatility-Time (BOS / Sweep / OB)

Visual Trading Zones

by eddiebelaval
7 stars

Visual Trading Zones draws evenly spaced price zones on the chart from the highest and lowest prices over a configurable lookback. It spaces levels by a step in ticks or forex pips, optionally inserts sublevels, and can show filled zones, level lines, and pric

Indicator v6 Support & resistance
Updated 3 months ago · None stated GitHub repository of Visual Trading Zones

This indicator overlays multiple technical analysis tools onto the main price chart to establish multi-filter trend confluence. It calculates dual anchored VWAPs, dual Supertrend indicators, moving averages, Kijun-sen Donchian midlines, and weekly pivot points

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Ichimoku Cloud with Donchian Channels

Bull Vs. Bear Market Intraday Sessions partitions the trading day into multiple custom time intervals to analyze session-specific volume and market behavior. Plotted directly on the main price chart, the indicator tracks buying and selling dynamics across up t

Indicator v5 Sessions & timeVolume
Updated 8 months ago · None stated GitHub repository of Bull Vs. Bear Market Intraday Sessions [Kioseff Trading]

PF poc exit-while-flat false

by pineforge-4pass
1 stars

PF poc exit-while-flat false is an overlay strategy designed to test Pine Script execution engine parity. It calculates 9-period and 21-period Exponential Moving Averages (EMA). When a bullish crossover occurs while flat, it places a limit buy order 2% below t

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF poc exit-while-flat false

S_risk_max_position_size

by GammaExpansion
1 stars

This strategy tests TradingView’s maximum position size risk limit in a separate pane. Every 20 bars it tries a long entry of 40 units, a second long entry, and a long order of 10, then closes all trades, repeats the same idea on the short side, and cancels re

Strategy v6
Updated 6 days ago · MIT GitHub repository of S_risk_max_position_size
1 stars

Golden Ichimoku by BITMOON618 calculates and plots dynamic Ichimoku clouds directly on the price chart based on a user-selected time range between two timestamps. The script determines a custom bar length from the range and generates three scaled cloud structu

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Golden Ichimoku by BITMOON618

NIMOV6 + THT Volume Pro

by vedkanani123
1 stars

A price-chart indicator that plots several EMAs with a coloured 8 and 21 cloud, Bollinger Bands, and an optional VWAP. Buy and sell triangles mark 8 and 21 EMA crossovers, and further intraday patterns use three higher lows or three lower highs. An optional vo

Indicator v6 Moving averagesVolume
Updated 2 months ago · None stated GitHub repository of NIMOV6 + THT Volume Pro
1 stars

Tick-chart-safe bullish half of a split HV+D and PBJ overlay indicator. It plots 38 buy-side markers that combine high-volume candles, standard deviation displacement and a PBJ moving average and Supertrend filter. An input sets a fallback bar length in second

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ Bullish v1 Tick-Friendly
1 stars

This strategy pairs the Fisher Transform oscillator with a long-term exponential moving average trend filter to execute trend-aligned reversal entries. It enters long when the Fisher line crosses above its trigger line while price remains above the EMA, and en

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fisher v6
1 stars

This indicator applies an RSI-style oscillator smoothed with a cyclic filter, based on the dominant cycle idea from a published trading book. A Fast Fourier Transform library measures cycle strength, and a table lists the strongest cycle periods. The cycle len

Indicator v5 Oscillators & momentum
Updated 6 months ago · None stated GitHub repository of RSI Cyclic Smoothed Auto

Watermark

by ivansoft
1 stars

An indicator that places a small coloured text box on the price chart as a watermark. It shows one text string, and if a second text is set it alternates between the two on each live update, which gives a simple blinking effect. Settings control both texts, th

Indicator v5 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Watermark

DRNA-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions executed by ARK Invest for the stock DRNA directly on the price chart. It renders green upward labels below price bars for purchase events and red downward labels above price bars for sales events, disp

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

This indicator demonstrates an experimental graph-style scatter visualization within a separate pane using Pine Script arrays. It tracks two features across recent bars: the single-bar price change and a scaled 14-period Relative Strength Index. Values are loa

Indicator v4 Oscillators & momentum
Updated 4 years ago · None stated GitHub repository of Example: Graph Style - 4th Dimension RSI

This strategy combines three technical indicators: the Boom Hunter Pro oscillator, the Hull Suite moving average, and a Volatility Oscillator. It calculates trade entries from indicator conditions, using recent swing high and low lookbacks to set stop loss lev

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Boom Hunter + Hull Suite + Volatility Oscillator Strategy

This indicator plots the Ehlers moving average difference with Hann windowing in a separate pane. It runs two Hann FIR filters on the chosen source: a short window and a longer window whose length is the short length plus half the dominant cycle. The oscillato

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Moving Average Difference with Hann (MADH)

exit Demo

by be-thomas
65 stars

This strategy demonstrates TradingView exit and entry calls on the price chart. It opens a first long position of five units when flat, then adds a second long of ten units with a stop order ten percent above the average price once size reaches five. When size

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of exit Demo

Theil Index (THEIL)

by mihakralj
47 stars

The Theil Index indicator measures statistical inequality and distribution entropy in a price series over a specified lookback period. It iterates through recent bars, calculates the mean price, and computes the sum of logarithmic price-to-mean ratios. Higher

Indicator v6 Volatility & bands
Updated 8 months ago · MIT GitHub repository of Theil Index (THEIL)

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.

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