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

A strategy that implements the Parabolic SAR calculation in code, with start, increment and maximum acceleration settings. It plots the current and next bar SAR values as crosses on the price chart. On each confirmed bar it places a stop order at the next SAR

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Parabolic SAR Strategy

An indicator component that computes a slow stochastic oscillator with 14, 3 and 3 settings and checks it for regular bullish and bearish divergence against price pivots. The stochastic plot and the divergence labels are commented out in the visible code, so l

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 24 Stochastic
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of OMGBTC EMA Cross Strategy
948 stars

This indicator counts down to a fixed Litecoin halving timestamp in August 2019, using Greenwich Mean Time. It subtracts the current time from that stamp and formats the remaining days, hours, minutes, and seconds. The day, hour, and minute of the target are u

Indicator v4 Sessions & time
Updated 11 days ago · GPL-3.0 GitHub repository of Litecoin Halving UTC Countdown
330 stars

2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the

Strategy v4 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of 2 EMA/SMA + RSI Strategy [Alorse]

AYLA-tracker

by Allen1212
303 stars

AYLA-tracker visualizes ARK Invest trade activities for AYLA directly on the price chart. It plots historical execution labels at specific timestamps, indicating dates when ARK Invest bought or sold shares of the stock. The indicator does not compute technical

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

MathComplexOperator

by ricardosantos79
261 stars

MathComplexOperator is a Pine Script v5 library of utility functions for pseudo complex numbers stored as two-element float arrays of real and imaginary parts. It computes the conjugate by flipping the imaginary sign, adds two complex values, and subtracts one

Library v5
Updated 4 years ago · None stated GitHub repository of MathComplexOperator
257 stars

Williams Strategy - Alert is a Pine Script v5 strategy that plots three-bar simple moving averages of high and low prices directly on the price chart. It detects upward and downward trend reversals by comparing the current bar's low and high with those from th

Strategy v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of Williams Strategy - Alert

Risk Manager Template

by TradersPost
218 stars

This overlay indicator estimates position size from account equity, a per-trade risk percentage, and a chosen stop distance. Stops can use ATR, a percent of price, fixed points, or a swing high or low. It derives stop and optional take-profit prices from a ris

Indicator v6 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Risk Manager Template
114 stars

This strategy plots a base Jurik moving average and the average of three longer Jurik averages on the price chart. Long and short signals come from crossovers of those lines, or, when pivoting is enabled, from the averaged line stopping a fall or a rise over a

Strategy v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of 4 JMA Crossover Strategy

Astor SMA20/60 TW

by hasnocool
106 stars

This strategy calculates 20-period and 60-period simple moving averages (SMAs) plotted directly on the price chart. It executes long entries when the closing price crosses above either SMA, provided the bar is on or after the configured backtest start date. Po

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Astor SMA20/60 TW

Cointegration

by mihakralj
99 stars

Calculates the statistical cointegration between the current chart instrument and a user-selected secondary ticker using the Engle-Granger method. It evaluates the stationarity of the regression residuals and plots the Augmented Dickey-Fuller test statistic in

Indicator v6 Mean reversion
Updated 4 weeks ago · Apache-2.0 GitHub repository of Cointegration

array.reverse()

by be-thomas
65 stars

This indicator demonstrates the Pine Script array.reverse function. It creates an empty float array, appends the values zero, one, and two, and on the last bar reverses that array in place. A label then displays the reversed contents next to the last bar. The

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of array.reverse()

Calculates the Hilbert Transform In-Phase and Quadrature components of a price series to measure underlying cyclic behavior. It processes the input source through smoothing, detrending, and Hilbert phase calculation steps to generate two orthogonal component l

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of HT_PHASOR: Hilbert Transform Phasor Components
46 stars

NQ Hourly Retracement Levels highlights NY, London, and Asia trading sessions directly on the price chart. It plots hourly open prices and midpoint retracement levels at the New York session open, filtering levels based on a configurable minimum hit rate thres

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Hourly Retracement Levels

Double EMA

by TWODS-CAPITAL
37 stars

This indicator plots a double exponential moving average on the price chart. It first smooths the chosen source with an exponential moving average, then smooths that result again with the same length, and combines the two so the line responds faster than a sin

Indicator v5 Moving averages
Updated 3 years ago · MIT GitHub repository of Double EMA
16 stars

This strategy enters long or short when price breaks a Donchian channel and RSI confirms the same direction. It sizes each unit from a risk percent of equity and can add units after a set ATR advance, up to a unit limit. An initial ATR stop and a trailing stop

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 45: Dual Momentum
13 stars

This overlay indicator is a reusable template for Ruckard indicators meant to work with Zignaly. The implemented logic sections are empty, so it does not plot signals or manage trades. It exposes a higher-timeframe trend filter built from a fast and a slow mov

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of IndicatorTemplate A002

The Market Tradability Engine calculates multi-factor tradability, balance, compression, and direction scores to evaluate market regime quality. It classifies market conditions into eight distinct states, including Balance, Compression, Ready, Breakout, Trend,

Indicator v6 TrendVolatility & bands
Updated 2 days ago · MIT GitHub repository of Market Tradability Engine [WavesUnchained]

CVD Momentum Divergence

by eddiebelaval
7 stars

This indicator approximates cumulative volume delta from each bar's volume and candle body, then detrends and normalizes both price and CVD so they can be compared in a separate pane. It plots the two smoothed series and an optional histogram of their differen

Indicator v6 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of CVD Momentum Divergence
6 stars

This Pine Script v5 indicator is an SMC trading engine that plots order blocks, fair value gaps, break of structure markers, market structure shifts, and Fibonacci retracements on the price chart. It supports customizable higher and lower timeframes along with

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol The SMC Engine

This short-only trading strategy combines the Relative Strength Index (RSI), Slow Stochastic, and MACD to identify bearish setup entries. A short position triggers when the RSI drops below 50, the Slow Stochastic crosses down while overbought, and the MACD lin

Strategy v4 Oscillators & momentumTrend
Updated 3 years ago · Apache-2.0 GitHub repository of RSI + Slow Stochastic + MACD Short Strategy
4 stars

This indicator computes a momentum value via linear regression on the difference between close price and a mid-value average that blends highest-lowest range and high-close average over the Keltner Channel length. It overlays Bollinger Bands and Keltner Channe

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · MIT GitHub repository of Squeeze Momentum [trugurpala]
3 stars

This indicator tracks the low of day and high of day during the specified RTH session hours in the New York timezone. It calculates the high at the current low of day (lod_h) and the low at the current high of day (hod_l). Horizontal lines are drawn at these l

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of Day Trading Reversal System
3 stars

This Pine Script indicator plots Smart Money Concepts market structure directly on the price chart. It identifies swing highs and lows, internal market structures, Break of Structure events, Change of Character shifts, and EQH/EQL levels. Breaker blocs are hig

Indicator v5 SMC / ICT / price actionCandlestick patterns Repaints
Updated 12 months ago · None stated GitHub repository of SMC & Breaker Blocs [Krishna]

LiquidityFinderLibrary

by alvinng214
2 stars

This Pine Script library exports a liquidity line detection function designed for Smart Money Concepts analysis. It identifies static and dynamic pivot highs and lows over customizable lookback periods, normalizing price differences between consecutive swing p

Library v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of LiquidityFinderLibrary

VWMA 1hr + WF

by avatar-lavventura
2 stars

This script calculates a 1-hour 24-period Volume Weighted Moving Average (VWMA) and plots it directly on the price chart with customizable upper and lower percentage offset bands. It combines Williams Fractals for local swing highs and lows with a 14-period Re

Indicator v4 Moving averagesOscillators & momentum
Updated 7 months ago · None stated GitHub repository of VWMA 1hr + WF
2 stars

Calculates and projects Bitcoin price trajectory using a power law model displayed as a clock layout in a separate pane. It maps historical price movements, average power law curves, and Bitcoin halving cycles over time. Users can toggle spiral visualization m

Indicator v6 TrendSupport & resistance
Updated 8 months ago · None stated GitHub repository of Bitcoin Power Law Clock [LuxAlgo]

Least Squares Moving Average (LSMA)

by mushroom-men-Trading
2 stars

This indicator calculates and plots the Least Squares Moving Average (LSMA) directly on the price chart. It fits a linear regression line over a user-selected lookback period and source series to project the prevailing price trend. By using an optimized circul

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Least Squares Moving Average (LSMA)

Fractal Engulfing Candles

by Web3Degenerate
2 stars

This indicator identifies bullish and bearish engulfing candlestick patterns filtered by fractal swing points and RSI momentum levels. It detects swing highs and lows over a configurable lookback period, requiring bullish signals to coincide with a swing low a

Indicator v5 Candlestick patternsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Fractal Engulfing Candles

Momentum ROC Combo

by pineforge-4pass
1 stars

A strategy that combines the Momentum and Rate of Change indicators, shown in a separate pane with a zero line. It enters long when momentum crosses above zero while rate of change is positive, and short when momentum crosses below zero while rate of change is

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Momentum ROC Combo

P_fmt_comment_before_version

by GammaExpansion
1 stars

P_fmt_comment_before_version is a basic test script created to demonstrate and verify Pine Script formatting and parsing capabilities. The indicator calculates and plots the closing price of the active instrument in a separate chart pane. It contains no config

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_fmt_comment_before_version
1 stars

An overlay indicator that classifies the market into regimes such as trend, chop and squeeze using ADX, range efficiency, relative volume, ATR expansion and VWAP slope. It also measures how far price is from VWAP and an EMA to flag rich, cheap or extreme readi

Indicator v6 Volatility & bandsMean reversion
Updated 7 days ago · GPL-3.0 GitHub repository of Regime Engine + TCO Gatekeeper

DEPV2 DEBUG S25

by YuceSezar89
1 stars

The script is a multi-symbol crypto indicator that computes trading signals across twenty major pairs including BTCUSDT, ETHUSDT and others. It evaluates four core methods for signals: trend based on price levels, momentum using rate of change, volatility via

Indicator v6 TrendOscillators & momentum Repaints
Updated 12 days ago · None stated GitHub repository of DEPV2 DEBUG S25

Apex Nexus Flip Engine v9

by vedkanani123
1 stars

An overlay indicator that builds a zero-lag trailing line from an ATR multiple and flips between buy and sell labels when price breaks it for a set number of closes. Gates for choppiness, baseline slope, volatility expansion, efficiency and ADX can block weak

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Apex Nexus Flip Engine v9

E3 F2 Cluster Signals

by nishpa800
1 stars

Overlay indicator that extracts six signal types from a larger signal study: cluster, E3 and First Two momentum-bar patterns, each in a bullish and bearish version, plus combined any-bull and any-bear markers. Visibility, alert switches and marker colours are

Indicator v5 Oscillators & momentumVolume
Updated 2 months ago · None stated GitHub repository of E3 F2 Cluster Signals
1 stars

A strategy that trades liquidity sweeps confirmed by order flow. It takes the highest high and lowest low of a prior window of 10, 20 or 50 bars, depending on a rigor setting. A bullish sweep is a low below the prior low that closes back above it with positive

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN Footprint Liquidity Sweep

Setup Backtest

by GreyssonEnterprises
1 stars

A Pine v4 indicator that shades a trading session window on the chart, with an earlier analysis start and a later session start and end, all set in a chosen time zone that defaults to Chicago. Individual weekdays can be switched on or off and the label and col

Indicator v4 Sessions & time
Updated 2 months ago · MIT GitHub repository of Setup Backtest

A Pine Script v5 indicator in a separate pane, version A3.0 of a Hurst spectral oscillator. It fetches a selectable source, hl2 by default, with lookahead on and runs it through bandpass filters for cycles from 1 day to 18 years. Bandwidth and period are set f

Indicator v5 Oscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of Hurst Spectral Analysis Oscillator A3.0
1 stars

This indicator calculates regular and hidden divergences across multiple momentum and volume oscillators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, and MFI, as well as an optional external input. It scans for pivot highs and lows using

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combined Indicators Fixed

Performance Table

by ivansoft
1 stars

Shows a table of percentage price changes for a list of symbols over a list of periods, such as one week, one to twelve months, year to date and five years. Both lists are text inputs, with the chart symbol optionally included. Cells are coloured green or red

Indicator v6 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Performance Table
1 stars

An indicator component that calculates 20-period Bollinger Bands with a 2.0 deviation multiplier and plots the basis, upper and lower bands with a shaded fill. It also converts band contact into a weighted score: a score when the close is below the lower band

Indicator v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 31 Bollinger
1 stars

A Pine v4 strategy that plots a 23-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of REPBTC EMA Cross Strategy
948 stars

Mean Absolute Deviation Bands is a volatility indicator that plots bands around a moving average basis line calculated from a user-selected source. It draws upper and lower bands using a multiplier on the mean absolute deviation, with the background between th

Indicator v4 Volatility & bandsMoving averages
Updated 11 days ago · GPL-3.0 GitHub repository of Mean Absolute Deviation Bands

Flawless Victory Strategy is a mean-reversion overlay that combines Bollinger Bands, RSI, and Money Flow Index (MFI) to identify trade entries and exits. The script provides three preset configuration modes: Version 1 executes signals without target exits, whi

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Flawless Victory Strategy [Alorse]

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