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

Trend Persistence Score calculates a composite trend-efficiency oscillator plotted in a separate pane, grading trend strength and durability on a 0 to 100 scale. It integrates four distinct metrics: linear regression R-squared, Kaufman Efficiency Ratio, ADX wi

Indicator v6 TrendVolatility & bands
Updated 2 days ago · MIT GitHub repository of Trend Persistence Score [WavesUnchained]
6 stars

This indicator tracks a configurable ICT sequence on the price chart. It advances through optional stages: Asian range bias, manipulation, New York macro windows, liquidity sweep, market structure shift, CISD, fair value gap, and retracement into that gap. Pre

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of ICT State Machine Sequential Entry
3 stars

Inner Outer Risk Zones plots horizontal price levels and risk boundary zones directly on the main price chart. The indicator allows traders to input manual target and support levels—including Outer Top, Inner Top, Inner Bottom, and Outer Bottom—along with risk

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of Inner Outer Risk Zones
2 stars

This indicator visualizes recent market price action on a circular polar coordinate system in a separate pane. It normalizes bar open, high, low, and close values across a specified lookback length into angular degrees and renders circular candlestick bodies a

Indicator v5
Updated 8 months ago · None stated GitHub repository of Circular Candlestick Chart

PF Probe 104 - Supertrend Flip

by pineforge-4pass
1 stars

This strategy calculates the Supertrend indicator using a configurable ATR length and factor to identify trend reversals. It plots directly on the main price chart. When the Supertrend direction flips from bearish to bullish, the strategy closes any open short

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 104 - Supertrend Flip

M_time

by GammaExpansion
1 stars

M_time is a utility test script designed to evaluate Pine Script built-in time and environment variables. It calculates and plots various date components, timestamps, session flags, timeframe properties, symbol metadata, and bar state indicators in a separate

Indicator v5
Updated 6 days ago · MIT GitHub repository of M_time

GOLDEN-PIVOT φ v2

by morindok
1 stars

GOLDEN-PIVOT φ v2 is a Pine Script strategy that plots on the price chart. It calculates a golden pivot region using Fibonacci retracement at 0.618 of a swing high-low range spanning 96 candles. The script applies a volume filter requiring current volume to ex

Strategy v5 Support & resistanceSMC / ICT / price action
Updated 7 weeks ago · None stated GitHub repository of GOLDEN-PIVOT φ v2

NO.1 Perfect Buy/Sell

by vedkanani123
1 stars

A price-chart indicator that stays always in one direction after the first confirmed mark: a buy exits shorts and holds long until the next sell, and the reverse. It uses a causal trail, trend, range and shock regime detection, a score threshold and an optiona

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Perfect Buy/Sell
1 stars

A long-only strategy built on fair value gaps. A bullish gap is detected when a bar's low is above the high two bars back. Depending on the confirmation setting, it enters on the gap alone, on the gap plus a high-volume breakout candle used as a simple order b

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN Sovereign FVG and OB
1 stars

Draws supply and demand zones on the price chart from engulfing candle patterns. An algorithm mode setting switches between looser and strict engulfing definitions, and a threshold separates big from small candles. Other settings set the maximum number of engu

Indicator v5 Support & resistanceCandlestick patterns
Updated 6 months ago · None stated GitHub repository of Supply and Demand Zones V2

ATR Range

by ivansoft
1 stars

Plots two step-line levels on the price chart at the previous bar's midpoint plus and minus a moving average of ATR measured over about 15 minutes of bars. When price closes beyond a level while making a new extreme, the matching line is drawn thicker in red.

Indicator v5 Volatility & bandsBreakout
Updated 1 year ago · None stated GitHub repository of ATR Range

DYNS-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of DYNS on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, with an X1 count of how many ARK ETFs traded that day. An ETF input

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

Function Polynomial Regression

by ricardosantos79
261 stars

This script defines a function that performs polynomial regression on arrays of points. It maintains two arrays of size given by the length input, storing recent high prices and bar indices at pivot highs as well as low prices and bar indices at pivot lows. Th

Indicator v4
Updated 4 years ago · None stated GitHub repository of Function Polynomial Regression
106 stars

Breakout Trend Follower is a price-chart strategy that enters long when price breaks a recent swing high. It places the stop at the recent swing low and trails that stop upward as higher lows form, exiting when a higher low is breached. A pivot lookback sets h

Strategy v5 BreakoutTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Follower
99 stars

Calculates John Ehlers' Reflex indicator to measure price cycle reversal tendencies and trend direction with low lag. The script pre-filters price data using a two-pole Super Smoother Filter, measures linear extrapolation slope deviations over a lookback windo

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Reflex Indicator

f_print()

by be-thomas
65 stars

This debugging utility script demonstrates how to create a print helper function in Pine Script using persistent labels. It defines a function that creates a single label on the first bar and continuously updates its coordinates and text content on subsequent

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of f_print()

TTM Trend

by mihakralj
47 stars

This indicator calculates a short-term trend filter based on an exponential moving average and its slope. It identifies upward, downward, or neutral states by evaluating bar-to-bar changes in the average, coloring the plotted line accordingly. It also calculat

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of TTM Trend

MovingAvg2Line Cross

by TWODS-CAPITAL
37 stars

This strategy calculates two Simple Moving Averages (SMA) with fast and slow length inputs. It generates a long signal when the fast SMA crosses above the slow SMA, and a short signal when it crosses below. Reversal signals automatically close existing trades

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of MovingAvg2Line Cross

Ruckard Swim Waves

by ruckard
13 stars

Ruckard Swim Waves is a Pine Script v5 strategy that trades long, short, or both on the price chart. It opens positions according to the selected side and exits with a percentage stop loss, take profit, and optional trailing take profit. After two consecutive

Strategy v5 Scalping
Updated 1 year ago · None stated GitHub repository of Ruckard Swim Waves

This indicator scans price action for symmetric, ascending, and descending triangle chart patterns using a sliding window of confirmed swing pivots. It fits upper and lower boundary trend lines across swing highs and lows, rating each pattern with a composite

Indicator v6 BreakoutSupport & resistance
Updated 2 days ago · MIT GitHub repository of Triangle Compression Scanner Pro [WavesUnchained]

Institutional CRT Engine

by alboogycOdR
6 stars

Calculates Candle Range Theory (CRT) ranges using specific one-hour or four-hour New York session candles. The indicator draws CRT range boxes directly on the price chart and plots entry signals based on Market Structure Shifts (MSS) with Fair Value Gaps (FVG)

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Institutional CRT Engine

Inside Extended

by g-moe
3 stars

Inside Extended tracks inside bar patterns and projects their initial breakout ranges on the price chart. When a candle body falls completely within the high-low range of the prior candle, the indicator marks the inside bar in yellow and establishes the mother

Indicator v5 Candlestick patternsBreakout
Updated 5 months ago · None stated GitHub repository of Inside Extended

Cup & Handle Final

by regalouisei
2 stars

This overlay indicator searches price history for cup and handle shapes using left and right pivot lengths and a lookback of prior pivots. It draws the cup fill, border, and retrace on the price chart. Settings limit how steep the top line may be, how tall the

Indicator v5 BreakoutSupport & resistance
Updated 8 months ago · None stated GitHub repository of Cup & Handle Final
1 stars

This strategy draws Bollinger-style bands on the price chart using ta.sma and ta.stdev of close. It plots upper and lower bands based on the baseline SMA and a multiplier applied to standard deviation. Entries trigger when close breaks above the upper band for

Strategy v6 Volatility & bandsMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 105 - volty expansion close

Mincontract Version Probe

by GammaExpansion
1 stars

The Mincontract Version Probe indicator measures and plots the minimum contract size allowed for the current symbol using the syminfo.mincontract variable. Rendered in a separate pane below the main price chart, this utility script serves as a test probe to in

Indicator v5
Updated 6 days ago · MIT GitHub repository of Mincontract Version Probe

HTF Sessions

by morindok
1 stars

Splits the chart into periods of a chosen higher timeframe, daily by default, and draws on the price chart. At each new period it adds a vertical line, a box around the most volume-heavy stretch of recent candles, and an orange running average of closes since

Indicator v5 Sessions & timeVolume Repaints
Updated 7 weeks ago · None stated GitHub repository of HTF Sessions

NO.1 Perfect Buy/Sell v2

by vedkanani123
1 stars

A price-chart indicator for lower timeframes that draws EMA 9, 21, 50 and SMA 200 clouds and prints always-in buy and sell flips. Signals combine EMA stack or cross, RSI, ADX and DI, relative volume and a lock that blocks tiny sideways ranges. The higher-timef

Indicator v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Perfect Buy/Sell v2
1 stars

Overlay indicator that combines many named combo signals on the price chart. Groups include relative volume extremes, double displacement and stack patterns, Katana session signals, whale high-volume markers with pocket pivot combos, SAAB and KRATOS squared pa

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Jumbo CIA First Bar Only Fauna

TN Sovereign HMA

by raybird
1 stars

A strategy based on 21 and 55 period Hull moving averages. A long needs the fast line rising and above the slow line, price above a 200 EMA and volume above its 20-bar average times a multiplier; a short needs the opposite. Each entry has an ATR-based stop at

Strategy v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign HMA
1 stars

Draws supply and demand zones on the price chart from engulfing candle patterns. Algorithm modes range from looser to strict engulfing, with a threshold separating big from small candles. Settings limit how many zones and how much history are kept, with a sepa

Indicator v5 Support & resistanceCandlestick patterns
Updated 6 months ago · None stated GitHub repository of Supply and Demand Zones V2

ATR Test

by ivansoft
1 stars

Shows bar range statistics in a separate pane: one-bar true range, candle body range and rolling percentile levels such as the median, 75th, 90th and 95th percentiles of true range. The lookback length is chosen from the chart timeframe. Blue columns mark bars

Indicator v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of ATR Test

EB-tracker

by Allen1212
303 stars

This indicator plots labels on the price chart to mark ARK Invest sell events for selected ETFs. Users choose the ETF type via input settings. Labels show sell information with share volumes and stock weights in the ETF. It draws on the price chart overlay. Th

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of EB-tracker

Function: Complex Numbers

by ricardosantos79
261 stars

Function: Complex Numbers is a Pine Script v4 utility script that provides custom functions for handling complex numbers stored in two-element float arrays. It enables developers to construct complex numbers from real and imaginary parts, extract individual co

Indicator v4
Updated 4 years ago · None stated GitHub repository of Function: Complex Numbers

Brrrrr Strategy

by hasnocool
106 stars

The Brrrrr Strategy is a macro-based breakout strategy designed for crypto markets. It tracks the Glassnode total USDT supply daily metric and calculates a Donchian Channel over a user-defined lookback period. The strategy enters a long position when the USDT

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Brrrrr Strategy

Ehlers Reverse EMA

by mihakralj
99 stars

Calculates John F. Ehlers' Reverse Exponential Moving Average (EMA) designed to eliminate lag from traditional exponential smoothing. The indicator computes a warmup-compensated base EMA and subjects it to an 8-stage cascaded Z-transform inversion. The resulti

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Reverse EMA

Fill Example

by be-thomas
65 stars

This Pine Script v4 indicator plots three series on a price chart: the sine of high prices, the cosine of low prices, and the sine of close prices. It uses the fill function to shade the area between the first and third plot in red and between the second and t

Indicator v4 Support & resistance
Updated 5 days ago · GPL-3.0 GitHub repository of Fill Example
47 stars

This indicator calculates the two-argument arctangent function to compute the angle in radians between the positive x-axis and a point defined by two inputs. It handles all four quadrants correctly, bounding results between negative pi and positive pi. The use

Indicator v6
Updated 8 months ago · MIT GitHub repository of Two-Argument Arctangent (ATAN2)

Multi-Time Period Charts

by TWODS-CAPITAL
37 stars

This overlay indicator draws a box for each completed higher-timeframe period on the price chart. Box height follows High/Low Range, True Range, or Heikin Ashi Range, and the fill is growth or fall color according to that period’s open-to-close change. Auto ti

Indicator v5 Support & resistanceVolatility & bands
Updated 3 years ago · MIT GitHub repository of Multi-Time Period Charts

This trend-following scalping strategy combines a moving average trend filter with the Absolute Strength Histogram indicator. It opens long positions when price is above a selectable baseline moving average and the histogram signals bullish momentum, and short

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone Absolute Strength Histogram ATR
9 stars

This indicator calculates an advanced True Strength Index momentum oscillator plotted in a separate pane. It evaluates price momentum using double-smoothed price changes, offering multiple signal line smoothing algorithms such as EMA, SuperSmoother, and JMA ap

Indicator v6 Oscillators & momentumTrend
Updated 2 days ago · MIT GitHub repository of TSI Advanced [WavesUnchained]
7 stars

This indicator calculates a Volume Weighted Average Price (VWAP) reset across selectable anchor periods, including daily sessions, weekly, monthly, yearly, YTD, half-year, or a custom manual date. It plots the main VWAP line on the price chart alongside option

Indicator v6 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of VWAP Enhanced (Visual Feedback)

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