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

This strategy calculates standard Bollinger Bands using a Simple Moving Average and standard deviation multiplier to identify entry conditions. It triggers pending stop orders and outputs formatted alert messages compatible with TradingConnector for automated

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands Strategy with TradingConnector Alerts

This indicator estimates the dominant cycle period of a price series using John Ehlers' homodyne discriminator. It smooths the source, builds in-phase and quadrature components, and converts the phase angle into a cycle length. The result is rate-limited by ab

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Homodyne Discriminator (HOMOD)

Example 7

by be-thomas
65 stars

This script illustrates how to request non-standard chart data within Pine Script v4. It creates a Renko ticker identifier using a 10-period ATR calculation for brick size, requests the low price of the Renko bars via the security function, and plots the resul

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

Calculates the detrended synthetic price using dual Super Smoother Filters (SSF) derived from a user-defined dominant cycle period. The indicator computes a fast SSF based on a quarter-cycle period and a slow SSF based on a half-cycle period, then plots the di

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of SSF-Based Detrended Synthetic Price

Morning Star - Bullish

by TWODS-CAPITAL
37 stars

Morning Star - Bullish is a price chart indicator that automatically identifies three-candle bullish Morning Star candlestick patterns. It filters pattern occurrences using optional trend context defined by 50-period or 200-period simple moving averages. When

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Morning Star - Bullish

Ruckard Random A004

by ruckard
13 stars

Ruckard Random A004 is a strategy that executes entries in a random manner to evaluate the effect of risk management rules on trading results. It controls positions using customizable stop loss, take profit, trailing stops, and break-even settings, alongside o

Strategy v5 Moving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Random A004
9 stars

This indicator quantifies the risk of a prevailing market structure break by combining trend context, structure, and momentum into a composite 0–100 risk score. It plots an RSI oscillator with momentum divergence lines in a separate pane while projecting key b

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · MIT GitHub repository of Structure Break Risk

Trend Line Methods

by eddiebelaval
7 stars

Trend Line Methods draws optional trend geometry on the price chart. The pivot span method stores recent pivot highs and lows using left and right confirmation bars, a pivot count, and a lookback length, then plots a high trend line and a low trend line with a

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Trend Line Methods
3 stars

This indicator draws horizontal price levels and bands anchored to recent price points directly on the main chart. It calculates a central midline along with inner and outer symmetrical boundary lines offset by specified multiples of the instrument's minimum t

Indicator v5 Support & resistanceVolatility & bands Repaints
Updated 5 months ago · None stated GitHub repository of Horizontal Line Bands

Average Volume Profile

by regalouisei
2 stars

This indicator draws an Average Volume Profile on the price chart. It calculates the profile based on average volume across the selected timeframe and sensitivity setting. The Point of Control appears in bright blue while the Value Area High and Low display in

Indicator v5 VolumeSupport & resistance
Updated 8 months ago · None stated GitHub repository of Average Volume Profile

Volume Rate of Change (VROC)

by mushroom-men-Trading
2 stars

This indicator measures the speed at which volume changes over a specified number of periods. It calculates either the simple point difference or the percentage change between current volume and historical volume from a set lookback period. The resulting line

Indicator v6 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Volume Rate of Change (VROC)
1 stars

This strategy computes a session-gated RSI value using a deep history reference of 500 bars on a source that is NA outside the session window. It signals long entries on RSI crossover above 30 with valid session and closes positions on crossover below 70. The

Strategy v6 Oscillators & momentumSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF na-chain probe 01 - deep history int na

S_pyramiding_fifo

by GammaExpansion
1 stars

This strategy fixture cycles every forty bars and places timed long and short entries, closes, and raw orders to exercise TradingView pyramiding and FIFO fill rules. It opens up to three long entries, ignores a fourth, closes by identifier, reduces size with a

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

This indicator computes a confluence score from Gann angles and Fibonacci retracements anchored to a user base price, step size, swing low and high. It layers in RSI for oversold conditions and Bollinger Bands distance for additional context. The score increme

Indicator v5 Support & resistanceOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Gann Time Machine Signal Engine

HV+D PBJ Bearish v2

by nishpa800
1 stars

Second revision of the bearish half of a split HV+D and PBJ indicator, drawn on the price chart. It plots 36 sell-side markers built from high-volume candles, standard deviation displacement and a PBJ trend filter. Visibility toggles control patterns such as D

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

This overlay strategy builds long and short signals from a fast EMA crossing a slow EMA. Optional filters require elevated volume versus a volume average, a set number of confirmation bars, alignment with a higher-timeframe EMA, and a minimum bar move versus A

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter v6

Price Alert 2024 V3

by mikeyhu70
1 stars

An overlay that places up to ten percentage price levels above and below the last close, or the current open, and triggers alerts when price crosses them. Levels can be drawn as plots or price lines, colored by position relative to price, dimmed or hidden once

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Price Alert 2024 V3

Volatility Stop

by ivansoft
1 stars

An indicator on the price chart that plots a trailing stop line offset from a chosen source by a multiple of the Average True Range. Settings set the source, the ATR length and the ATR factor. The line can be drawn as a line, circles, diamonds or arrows in one

Indicator v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Volatility Stop

DIS-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of Disney on the price chart. It does not calculate an oscillator or generate live signals. When the ETF input is ALL, it places green buy labels below bars and red sell labels above bars o

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

[RS]Standardized Trend Map

by ricardosantos79
261 stars

Standardized Trend Map calculates series momentum relative to active price range across 40 distinct lookback periods ranging from 2 to 80 bars on an exponential moving average source. Each standardized calculation rounds to an integer values of -1, 0, or 1 to

Indicator v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of [RS]Standardized Trend Map
114 stars

This indicator evaluates Relative Strength Index (RSI) and Stochastic RSI conditions across eight customizable higher timeframes simultaneously. For each timeframe, ranging from 5 minutes to 12 hours, it checks whether RSI and Stochastic %K or %D cross specifi

Indicator v4 Oscillators & momentumScreeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Overbought RSI and Stoch MTF Mod
106 stars

This strategy initiates momentum breakout positions when the Relative Strength Index reaches extreme levels and Bollinger Band standard deviation is expanding. Long trades open when RSI is above the overbought threshold and bands are not contracting, while sho

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

Ehlers Laguerre Filter

by mihakralj
99 stars

The Ehlers Laguerre Filter is a smoothing indicator designed by John F. Ehlers that utilizes a four-element cascaded infinite impulse response filter. It applies time-warped Laguerre polynomials to the chosen price source to achieve low-lag trend filtering. Tr

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Laguerre Filter

Example 8

by be-thomas
65 stars

This indicator demonstrates how to request and display non-standard chart data in Pine Script v4. It builds a three-line break ticker identifier for the current instrument and fetches the line break close price using a security call at the current chart resolu

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

Calculates the rolling Z-score of an input price series over a specified lookback window. It uses a sliding window array to maintain rolling sums and calculate the sample mean and sample standard deviation incrementally, accounting for missing values. The resu

Indicator v6 Mean reversionOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Standardization (Z-score)

Moving Average

by TWODS-CAPITAL
37 stars

This indicator plots a simple moving average of a chosen price source on the price chart. Length, source, and a horizontal offset control the main blue line. A second smoothing line applies SMA, EMA, RMA, WMA, or VWMA to that average, with its own length, but

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

This strategy evaluates moving average squeezes and Squeeze Momentum section height changes to identify potential entry signals. It opens trades based on momentum comparisons across moving average thresholds. The script features customizable risk management co

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

This indicator identifies support and resistance levels on the price chart using an integrated detector engine. It combines pivot clusters, multiple price tests, supply and demand bases, order blocks, fair value gaps, and equal high or low liquidity. Detected

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 days ago · MIT GitHub repository of Support & Resistance Zones [WavesUnchained]

Tuoppi Entries

by eddiebelaval
7 stars

This overlay indicator calculates a WaveTrend oscillator from the typical price using two exponential averages and a short simple average. It marks a long when the fast and slow lines cross bullishly below the oversold level, and a short when they cross bearis

Indicator v6 Oscillators & momentum Repaints
Updated 3 months ago · None stated GitHub repository of Tuoppi Entries

ICT ORB Strategy

by alboogycOdR
6 stars

This strategy backtests opening-range breakouts on the price chart for New York, London, Asia, or a custom session. Simple mode follows the opening-range direction when relative volume is high enough. ICT mode can require a fair value gap, displacement, and an

Strategy v5 BreakoutSMC / ICT / price action Repaints
Updated 7 months ago · None stated GitHub repository of ICT ORB Strategy
3 stars

This indicator plots horizontal line bands on the price chart using lower timeframe data. It requests 1-minute high, low, and close values from security to calculate anchor points. Horizontal lines are drawn at specific levels with options for multiple lines i

Indicator v5 Support & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Horizontal Line Bands

This indicator estimates Black-Scholes call and put prices and selected Greek values from the chart's spot price. It runs only on the daily timeframe and overlays its output on the price chart. Users set the strike, expiry date and time, implied volatility, an

Indicator v5 Volatility & bandsMoving averages
Updated 8 months ago · None stated GitHub repository of Black Scholes Option Pricing Model w/ Greeks [Loxx]
1 stars

This strategy detects RSI momentum crossovers to enter long positions with fixed size. When holding a position it places a bracket exit using ATR-based stop and limit levels. The OCA name ensures any filled side cancels the other. The script verifies that stra

Strategy v6 Oscillators & momentumVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF OCA probe 01 - exit bracket cancel

S_risk

by GammaExpansion
1 stars

S_risk is a test strategy designed to demonstrate and verify Pine Script strategy risk management functions. It applies built-in risk rules to restrict order direction to long-only (converting short orders into position closures), caps maximum position sizes,

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

The script detects pivot highs and lows on the price chart using user-defined left and right bars. It projects future price paths with the golden ratio and calculates intersection points between paths. These intersections are stored in an array for geometric b

Strategy v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Geometric Path Backtest with BG
1 stars

Bullish-only overlay indicator that plots 38 buy-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 switch

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

This price-chart strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, provided optional filters pass. Volume must exceed a multiple of its average, price must sit on the matching side of a higher-timeframe EMA, and the

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fakeout v6
1 stars

This indicator uses the Goertzel algorithm to find a dominant cycle, then projects it as a sine wave to estimate future prices and dates. It also scans past bars for a similar pattern of set length within a lookback window. Results appear in a dashboard table

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

Volatility Stop MTF

by ivansoft
1 stars

An indicator on the price chart that plots an ATR-based volatility stop taken from a higher timeframe. The higher timeframe is picked in discrete steps, as a multiple of the chart timeframe, or as a fixed timeframe. It can detect when chart bars breach the hig

Indicator v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Volatility Stop MTF

DOCU-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest purchase and sale marks for DocuSign on the price chart. Green labels below bars mark buys and red labels above bars mark sells, each tied to a fixed calendar date. A multiplier such as X2 or X3 shows how many selecte

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

Algo AVT

by ricardosantos79
261 stars

This indicator calculates an outlier-filtered moving average based on statistical filtering concepts. It stores close prices in a rolling array over a user-defined length, calculates the mean and standard deviation, and excludes values falling within a specifi

Indicator v4 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of Algo AVT

Bollinger Breakout

by hasnocool
106 stars

This strategy buys when price breaks above the upper Bollinger Band and exits by trailing a stop on the lower band. Trades can execute on a wick or a candle close, and an optional fixed-percentage stop can set a tighter initial exit until the lower band catche

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

Calculates John Ehlers' Linear Predictive Filter based on the Griffiths Least Mean Squares adaptive predictor algorithm. It processes the source price through a roofing filter combining a highpass filter and SuperSmoother lowpass filter, followed by automatic

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Linear Predictive Filter (LPF)

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