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

Machine Learning: Lorentzian Classification

by artificial-intelligence-edge
75 stars

This indicator classifies the current bar by comparing its feature vector with historical bars using Lorentzian distance and a k-nearest-neighbors vote. Configurable features include RSI, WaveTrend, CCI, and ADX. Optional volatility, regime, ADX, and EMA filte

Indicator v5 AI / machine learningOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Machine Learning: Lorentzian Classification

Key Levels

by cryptorife
75 stars

This indicator plots reference levels and session markers directly on the price chart. It calculates and draws lines for the daily open, weekly open, monthly open, previous day OHLC, and previous week extremes, along with a selectable day-of-week range and ini

Indicator v4 Support & resistanceSessions & time Repaints
Updated 3 years ago · GPL-3.0 GitHub repository of Key Levels

All alert() calls

by be-thomas
65 stars

This indicator calculates a 20-period RSI of the close and plots it in a separate pane with a horizontal line at 50. It marks an RSI cross above 50 with a small up triangle and a cross below 50 with a small down triangle. On those same crosses it calls alert w

Indicator v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of All alert() calls

Higher TF BBands

by PythonForForex
64 stars

This indicator calculates Bollinger Bands from the close, using a chosen length and standard-deviation multiplier, then reads the middle, upper, and lower values from a user-selected timeframe. It plots those three bands on the price chart. The timeframe input

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Higher TF BBands

Nonsense

by frizLabz-FFriZz
59 stars

Nonsense is a mock Pine Script strategy script designed as a syntax testing script within a code editor extension repository. It defines custom type declarations, matrix and array object creations, and placeholder function logic using obfuscated variable names

Strategy v5 Repaints
Updated 1 year ago · MIT GitHub repository of Nonsense

BTC MACD Basic Tests

by iamrichardD
57 stars

BTC MACD Basic Tests implements a Pine Script unit-testing framework designed to validate components of a long-only Bitcoin MACD trading system. It constructs structured test cases to evaluate mock functions for MACD crossover calculations, volume threshold ch

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · Apache-2.0 GitHub repository of BTC MACD Basic Tests

Trading Sessions

by iamc1oud
56 stars

Trading Sessions is an overlay indicator that highlights major market trading sessions such as Tokyo, London, and New York directly on the price chart. It draws customizable session boxes along with optional open and close price lines, average session prices,

Indicator v6 Sessions & time
Updated 2 months ago · None stated GitHub repository of Trading Sessions

Bgcolor Example

by dcaoyuan
55 stars

Bgcolor Example is a minimal demonstration indicator written in Pine Script v6 that visualises bar polarity across the price chart. It checks whether the current close is lower than the open and dynamically tints the chart background red for bearish bars or gr

Indicator v6 Candlestick patterns
Updated 6 months ago · Apache-2.0 GitHub repository of Bgcolor Example
53 stars

This indicator analyzes historical candle direction and price range over a configurable lookback window to gauge market trend. It categorizes trend direction using candle count, price range sum, or both. Signals are filtered using a Simple Moving Average to en

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of Candle Counter + MA + RSI + Mode

EMA

by milocaetano
48 stars

This script calculates and plots an Exponential Moving Average (EMA) directly on the price chart. It uses Pine Script's built-in moving average calculation over a customizable period length and input price source, defaulting to a 9-period close price. The resu

Indicator v5 Moving averagesTrend
Updated 2 days ago · MIT GitHub repository of EMA
47 stars

This indicator calculates and plots Acceleration Bands directly on the main price chart. It computes simple moving averages of high, low, and close prices using circular buffers. The middle line displays the close moving average, while upper and lower envelope

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Acceleration Bands (ACCBANDS)

RSI-VWAP Indicator

by oguzhandilber
47 stars

This strategy calculates a Relative Strength Index (RSI) applied to the Volume Weighted Average Price (VWAP) rather than standard close values. It plots dedicated long and short RSI-VWAP lines with customizable overbought and oversold thresholds, alongside an

Strategy v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of RSI-VWAP Indicator

Daily Floor Pivots

by TamaraKGreen
46 stars

The Daily Floor Pivots indicator calculates standard daily pivot points alongside support and resistance levels up to five tiers. In addition to standard pivot lines, it projects Fibonacci Golden Zone channels between adjacent pivot levels such as PP to R1 or

Indicator v6 Support & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Daily Floor Pivots
43 stars

This indicator measures how extreme current Average True Range is versus recent history. It calculates ATR, converts it to a percentile rank over a lookback window, and smooths that rank with an EMA. Both series plot in a separate pane, with a color gradient f

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

BTC Multiples

by readysetcryptocodes
43 stars

BTC Multiples calculates and displays Bitcoin macro valuation metrics in a separate pane, including the Mayer Multiple, Stock-to-Flow Multiple, Difficulty Multiple, and Puell Multiple. Each valuation multiple features configurable overvalued and undervalued th

Indicator v4 Moving averagesSupport & resistance
Updated 2 years ago · None stated GitHub repository of BTC Multiples

This strategy trades 1-minute futures contracts on Binance. It plots pivot high and low resistance and support levels on the price chart, along with an EMA and a custom Cto indicator. Long and short entries trigger on EMA and Cto crossovers combined with price

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash Futures Strategy 1M Candles

Natal & Transit Planetary Aspect Table

by blueprintresearch-dev
42 stars

Natal & Transit Planetary Aspect Table displays an on-screen table comparing natal planetary positions with live or historical transit positions based on financial astrology principles. It calculates positions using geocentric or heliocentric coordinates and h

Indicator v6 Screeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Natal & Transit Planetary Aspect Table

FVG RSI Strategy (Translated)

by skywalker0803r
42 stars

This strategy overlays two exponential moving averages on the price chart to trade reversals using custom Fair Value Gaps and the Relative Strength Index. It enters long trades when price closes bullishly below both moving averages with an oversold RSI and a g

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 2 months ago · None stated GitHub repository of FVG RSI Strategy (Translated)

COT Net Positions

by ChartsLector
41 stars

This indicator fetches and plots weekly Commitment of Traders (COT) net position data in a separate pane using TradingView's official COT library. It displays positioning breakdowns for selected futures markets under either Legacy or Financial (TFF) reporting

Indicator v6 Volume
Updated 3 days ago · None stated GitHub repository of COT Net Positions

Macro VN Indices Research

by Thanhtran-165
38 stars

This indicator maps a composite macro risk score onto Vietnamese indices and sectors in a separate pane. It combines liquidity stress, curve shape, the international yield spread, and the ten-year versus policy-rate spread, then groups regimes with hysteresis.

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of Macro VN Indices Research

Abandoned Baby - Bullish

by TWODS-CAPITAL
37 stars

This indicator identifies the Bullish Abandoned Baby candlestick pattern directly on the price chart. The three-bar reversal pattern consists of a strong down candle during an established downtrend, followed by a lower gapping doji candle, and completed by an

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Abandoned Baby - Bullish

NostalgiaForInfinityV2

by viktors1982
36 stars

NostalgiaForInfinityV2 is a multi-timeframe mean-reversion strategy derived from the popular Freqtrade algorithmic trading framework. It evaluates price behavior using dual Bollinger Bands, RSI, exponential moving averages, and ATR volatility metrics sampled a

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of NostalgiaForInfinityV2

BB + MA + RSI

by thanhnguyennguyen
33 stars

This overlay indicator plots Bollinger Bands around a simple moving average, three exponential moving averages, and RSI-based markers on the price chart. Triangles mark RSI below the oversold level or above the overbought level, and arrows mark RSI crossing th

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of BB + MA + RSI
33 stars

This indicator marks confirmed swing highs and swing lows on the price chart. It uses TradingView pivot high and pivot low functions with separate strength settings for highs and lows. When a pivot is confirmed, it draws a label above or below the bar showing

Indicator v4 Support & resistance
Updated 5 years ago · Unlicense GitHub repository of [Pirate] Highs and Lows

Bollinger Bands

by modster
32 stars

This indicator plots a Bollinger-style envelope on the price chart. It calculates a simple moving average of the selected source and a standard-deviation band width set by the multiplier. It draws the basis, two lines offset by a small fraction of the basis as

Indicator v4 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bollinger Bands

Hedge Scalp - Open Profit/Loss

by nikita-doronin
30 stars

This indicator tracks and plots open profit and loss in a separate pane for a custom crypto hedge scalping strategy. It calculates an exponential moving average and establishes four long grid levels and one hedged short grid level at user-defined percentage di

Indicator v5 Moving averagesScalping
Updated 2 years ago · Custom licence GitHub repository of Hedge Scalp - Open Profit/Loss

Zen ABR Range Bands

by Zen-Tim
29 stars

The Zen ABR Range Bands indicator calculates an 8-bar average range from high-low differences and an exponential moving average of close prices. It plots the EMA on the price chart along with optional bands at multiples of the ABR (1x, 2x, 3x, 4x) centered on

Indicator v6 Moving averagesVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands
29 stars

This indicator calculates the Amazing Oscillator using 5-period and 34-period simple moving averages of the median price, then applies an RSI-style relative strength formula over a configurable smoothing period. The resulting oscillator fluctuates between -50

Indicator v5 Oscillators & momentumMoving averages
Updated 11 months ago · Custom licence GitHub repository of Amazing Oscillator [Algoalpha]
26 stars

This indicator plots the instrument close in a separate pane. The source imports a user library as Lib but never calls it, so the import does not change the plotted series. There are no inputs, alerts, or trade signals, and it does not define entries, exits, s

Indicator v6
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - library import

Supply & Demand

by stonkpunk
26 stars

Supply & Demand marks pivot highs and pivot lows on the price chart and draws translucent demand and supply boxes when a three-bar price imbalance appears between those pivots. Demand zones form after an upward imbalance when the stored pivot high precedes the

Indicator v4 Support & resistanceSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of Supply & Demand
25 stars

This Pine Script strategy calculates Bayesian probabilities of price breaking up or down relative to Bollinger Bands and a Simple Moving Average. It plots these breakout and breakdown probability lines as oscillators in a separate pane. Long entries trigger wh

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of Bayesian BBSMA Oscillator Strategy

Smart Money Concepts [LuxAlgo]

by GeneralTradingSarl
24 stars

Calculates and plots Smart Money Concepts elements directly on the price chart. It identifies internal and swing market structure shifts, including Break of Structure (BOS) and Change of Character (CHoCH). The indicator plots bullish and bearish order blocks,

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo]

ADX/DMI Strategy

by benso87
24 stars

This strategy calculates ADX and plus and minus directional movement and adds a Bollinger Band Width Percentile filter. It tracks positive or negative DMI, rising or falling ADX, and an optional recent DMI flip within a set lookback. Settings change ADX length

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of ADX/DMI Strategy
23 stars

This indicator builds a global liquidity composite in a separate pane. It requests monthly M2 series for the United States, euro area, China and Japan, normalizes each against a simple moving average, and combines them with user weights. Settings choose whethe

Indicator v6
Updated 3 weeks ago · Custom licence GitHub repository of Global Liquidity Composite

SARs

by pacificbay
22 stars

This indicator implements J. Welles Wilder's Parabolic SAR (Stop and Reverse) methodology directly on the price chart. It calculates the trailing SAR level based on user-defined initial, increment, and maximum Acceleration Factors. In addition to plotting the

Indicator v4 Trend
Updated 6 years ago · MIT GitHub repository of SARs

Imports

by ferranbt
21 stars

This indicator demonstrates a library import. It imports a library named mylib under the alias lib, calls the function add with the constants one and two, and plots the returned value. It does not read price, volume, or time, and it does not produce trading si

Indicator v6
Updated 7 weeks ago · MPL-2.0 GitHub repository of Imports
20 stars

This indicator combines RSI, Awesome Oscillator (AO), and Stochastic readings to calculate divergence and momentum signals. It identifies regular and hidden divergences while analyzing price pivots, momentum thresholds, and AO filters. The script draws in a se

Indicator v6 Oscillators & momentumDivergence
Updated 4 days ago · MIT GitHub repository of zaBor RSI+AO+Stoch indicator
20 stars

This indicator implements John F. Ehlers adaptive stochastic and is declared for a separate pane. It high-pass filters the chosen source to keep shorter cycles, smooths that series with a super smoother, and measures Pearson correlation over lags from zero to

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of Adaptive Stochastic - John F. Ehlers

This indicator detects Smart Money Technique (SMT) intermarket divergences across multiple timeframes, ranging from one minute to one week. It compares the current chart symbol against up to two benchmark symbols to identify non-confirmations in swing highs an

Indicator v6 SMC / ICT / price actionDivergence
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Multi-Timeframe SMT + Timecycle Scanner

Harami Pattern Finder

by shibisuriya
18 stars

The Harami Pattern Finder indicator identifies two-bar bullish and bearish Harami candlestick patterns directly on the main price chart. It calculates pattern validity based on the open and close price relationships between consecutive bars. Optional input set

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Harami Pattern Finder

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy combines Bollinger Bands, Bollinger Band Width, and the Relative Strength Index (RSI) for mean-reversion trades. It enters long when price crosses below the lower band with oversold RSI, or when band width contracts under low volatility. Short en

Strategy v4 Mean reversionOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy

This script plots Vegas Tunnel exponential moving averages directly onto the price chart. It calculates two pairs of EMAs: a fast tunnel using 144 and 169 periods displayed in green, and a slow filter tunnel using 576 and 676 periods displayed in red. Although

Strategy v5 Moving averagesTrend
Updated 3 weeks ago · Apache-2.0 GitHub repository of 第一个指标VeGa隧道交易策略

PHASE 404 v2

by Musyimi97
16 stars

PHASE 404 v2 is a Smart Money Concepts (SMC) indicator that plots structure directly on the main price chart. It identifies Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL) levels, highlights Market Structure Shifts (MSS) after liquidity sweeps, and mark

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of PHASE 404 v2
16 stars

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

P/E, P/BV, EPS

by msongkiet
16 stars

Calculates and plots key financial metrics including the Price-to-Earnings ratio, Price-to-Book Value ratio, and Earnings Per Share in a separate pane. The script retrieves financial data through standard financial requests based on customizable reporting peri

Indicator v5
Updated 2 years ago · None stated GitHub repository of P/E, P/BV, EPS

Alighten Pattern A

by alighten-dev
14 stars

Alighten Pattern A is an overlay indicator that calculates market structure pivots and identifies price patterns directly on the main price chart. It plots a ZigZag line to track price highs and lows, rendering horizontal dashed levels and directional signal m

Indicator v6 Support & resistanceTrend Repaints
Updated 2 weeks ago · None stated GitHub repository of Alighten Pattern A

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