Synced with GitHub · updated yesterday

Free TradingView Pine Scripts

8,340 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
8,340 scripts

Environment Check

by Alaamo7
1 stars

This indicator serves as a basic test to verify that the TradingView Pine Script v6 runtime compiles properly. It plots the closing price directly on the main price chart as a simple line overlay. The script contains no user-configurable inputs, generates no t

Indicator v6
Updated 2 months ago · Custom licence GitHub repository of Environment Check
1 stars

This overlay indicator requests footprint volume rows for the current bar and reads the point of control, value-area high, and value-area low. It draws a purple box over the point-of-control price range when the mode is point of control or both, and on the las

Indicator v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of TeleNexus Footprint Explorer v6

GrimmHAbacktest

by GreyssonEnterprises
1 stars

This indicator plots four smoothed moving averages of lengths 21, 50, 100 and 200 on the price chart. It fills the area between a two-period EMA and the 200-period SMMA to highlight trend direction. It marks bullish and bearish 3-line strike patterns with arro

Indicator v4 Moving averagesCandlestick patterns
Updated 2 months ago · MIT GitHub repository of GrimmHAbacktest
1 stars

This price-chart strategy builds a prior-day floor pivot from yesterday’s high, low, and close, plus the related resistance and support levels. It looks for a break above that pivot when the prior close was within a set percentage below it, and can require pri

Strategy v6 Support & resistanceBreakout
Updated 4 months ago · None stated GitHub repository of Pivot Breakout (NON-REPAINT)
1 stars

This indicator maps Smart Money Concepts (SMC) elements directly onto the price chart. It identifies swing highs and swing lows to track market structure (HH, HL, LH, LL), Break of Structure (BoS), and Change of Character (CHoCH) using either pivot or session

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of SMC Market Structure Indicator
1 stars

This indicator assists intraday breakout execution on KLSE stocks. It plots VWAP, EMA 9, EMA 21 on the price chart along with an opening range from the first 30 minutes of the session and a buy zone band above the daily pivot price. Settings control the pivot

Indicator v5 Moving averagesSupport & resistance
Updated 4 months ago · None stated GitHub repository of KLSE Intraday Execution Helper
1 stars

This strategy executes long trades based on directional candle signals fetched from a custom secondary timeframe. It evaluates bullish or bearish candle alignment on the requested timeframe and enters a long position when the state turns bullish. Position sizi

Strategy v6 Trend
Updated 4 months ago · MIT GitHub repository of MTF LTF Position State
1 stars

This indicator toolkit analyzes cryptocurrency price action on TradingView charts. It computes and plots Volume Profile with user-adjustable lookback bars, row count, and value area percentage; VWAP lines anchored to daily/weekly/monthly sessions plus optional

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT v7.2 Spec Watch
1 stars

This Bitcoin trading strategy analyzes golden cycle phases using halving dates and custom lengths for pre- and post-halving rises and drops. It plots a rainbow ribbon, supply and demand zones, Ichimoku cloud, geometric mean indicator, and ZigZag lines on the p

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle v5
1 stars

ORB - Opening Range Breakout calculates the highest high and lowest low during a configurable opening session and trades breakouts during the subsequent trading session. When the closing price crosses above the opening range high, it enters a long position; cr

Strategy v5 BreakoutSessions & time
Updated 7 months ago · None stated GitHub repository of ORB - Opening Range Breakout

RSI Indicator

by haydarkadioglu
1 stars

The RSI Indicator plots the Relative Strength Index on a separate pane to measure momentum. It calculates RSI with a user-defined length (default 14) and displays horizontal lines for oversold (default 40), overbought (default 60), and middle (50) levels. Back

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Indicator
1 stars

Volume Profile Advanced calculates session-based volume distribution across customizable lookback periods on the main price chart. It determines key market profile metrics, including the Point of Control (POC), Value Area High (VAH), Value Area Low (VAL), and

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · MIT GitHub repository of Volume Profile Advanced

RSI Divergence Detector

by knectardev
1 stars

This indicator detects divergences between the RSI oscillator and price action. It calculates the RSI value using a user-defined length and identifies pivot highs and lows on both the price series and the RSI itself. The script plots bull divergences as potent

Indicator v6 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of RSI Divergence Detector

VuManChu B Divergences

by matlaenousse
1 stars

Calculates and plots a multi-oscillator panel inspired by Market Cipher B, combining a WaveTrend oscillator, fast WaveTrend line, Money Flow Index (MFI) area, and RSI. It automatically identifies regular and hidden bullish and bearish divergences, plotting sig

Indicator v4 Oscillators & momentumDivergence
Updated 10 months ago · None stated GitHub repository of VuManChu B Divergences
1 stars

This strategy records the high and low during a configurable opening session, defaulting to 09:30–10:00 exchange time, then locks the range when the session ends. It enters long when price closes above the range high and short when price closes below the range

Strategy v5 BreakoutSessions & time
Updated 11 months ago · None stated GitHub repository of Open Range Breakout Strategy
1 stars

Kurutoga Screener Timing Fix calculates price divergence from highest-high and lowest-low midpoints across three lookback horizons. By assessing divergence consistency across base, double, and quadruple lengths, it identifies synchronized momentum conditions.

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Kurutoga Screener Timing Fix
1 stars

This overlay indicator simulates a date-bounded Bitcoin dollar-cost average and separate long and short value-averaging books. Inside the start and end dates it adds a fixed USDT amount each bar, converts it at the close into BTC, and updates average price and

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 04 Long/Short DCA+VA

TOTAL MTPI STRAT M_K

by Mikelkulla
1 stars

This strategy overlays the price chart to determine macro market direction by aggregating signals from an ensemble of up to 26 trend, momentum, and moving-average indicators. It incorporates an Augmented Dickey-Fuller (ADF) market regime filter to detect rangi

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI STRAT M_K

VolumeSpikeTest

by ivansoft
1 stars

This indicator calculates and visualizes statistical volume thresholds across dynamic, time-based lookback windows. It converts multi-hour and multi-day periods into bar counts based on the active timeframe to compute rolling volume medians, simple moving aver

Indicator v5 Volume
Updated 1 year ago · None stated GitHub repository of VolumeSpikeTest

TD RSI Strategy

by zhuzp98
1 stars

This strategy combines a TD Sequential close comparison, RSI with a moving-average Bollinger envelope, MACD, and the Stochastic Momentum Index. It allows long, short, or both directions and sizes orders from a percentage of equity. Inputs set RSI and MACD leng

Strategy v5 Oscillators & momentumBreakout
Updated 1 year ago · None stated GitHub repository of TD RSI Strategy
1 stars

This indicator identifies support and resistance turning points on the price chart using higher-order momentum analysis. It calculates a double-smoothed exponential moving average, derives its first momentum, and detects zero-crossings of its second momentum t

Indicator v4 Support & resistanceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Support and Resistance Levels v3

Hello World

by fiji-solutions
1 stars

This educational script calculates and plots 50-bar highest high and lowest low levels directly on the price chart. It highlights breakout conditions by coloring the chart background green when the closing price exceeds the previous 50-bar high, and red when t

Indicator v5 Support & resistanceBreakout
Updated 2 years ago · None stated GitHub repository of Hello World
1 stars

This indicator compares the current chart with a user-selected reference market in a separate pane. It converts both series into percentage changes, stores them in rolling arrays of a chosen lookback, and plots covariance as a filled area and the correlation c

Indicator v4
Updated 2 years ago · None stated GitHub repository of PSMC - Correlation Meter

RSI Divergence+

by krosenfeld7
1 stars

This indicator plots the Relative Strength Index (RSI) on the price chart with customizable overbought and oversold bands at 70 and 30. It detects divergences between price highs and lows versus RSI pivots using lookback periods and tolerance settings. The mai

Indicator v4 Oscillators & momentumDivergence Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of RSI Divergence+

Bband Pinch & Expand

by JohnsonHsiao
1 stars

Bband Pinch & Expand calculates Bollinger Bands width and compares it against its simple moving average to detect periods of volatility expansion and contraction. The script plots a histogram of the difference between the current band width and its moving aver

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bband Pinch & Expand

MACD Test VWAP

by tseitz
1 stars

This strategy combines standard Moving Average Convergence Divergence (MACD) crossovers with Volume Weighted Average Price (VWAP) level interactions. It enters long positions when the MACD line sits above its signal line and short positions when below. Positio

Strategy v4 TrendOscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of MACD Test VWAP

RSI-ADI-Combo

by DT021
1 stars

This indicator combines the Average Directional Index (ADX) for trend strength, Money Flow Index (MFI) for volume flow analysis, and Relative Strength Index (RSI) for momentum signals. The ADX is plotted as colored columns with background coloring indicating u

Indicator v4 TrendOscillators & momentum
Updated 6 years ago · GPL-3.0 GitHub repository of RSI-ADI-Combo

Parabolic SAR

by everget
948 stars

This indicator plots the Parabolic SAR on the price chart using TradingView's built-in SAR function. Direction is long when the SAR sits below the close and short when it sits above. Circles mark the SAR and are colored by that direction. Optional buy and sell

Indicator v6 Trend
Updated 11 days ago · GPL-3.0 GitHub repository of Parabolic SAR
575 stars

This indicator detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult

Indicator v5 Support & resistanceTrend
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows with Screener
330 stars

This indicator calculates the Supertrend direction across multiple selected symbols on the active timeframe using custom ATR length and multiplier settings. When the trend switches between bullish and bearish for any enabled asset, the script triggers formatte

Indicator v5 Trend
Updated 2 months ago · None stated GitHub repository of Multi Supertrend [Alorse]
318 stars

This indicator plots three moving averages on the price chart using lengths of 8, 21 and 50 by default. It colors the first average blue, the second maroon and the third red. A translucent fill between the first and second averages turns lime when the first is

Indicator v5 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TVT 3X Scale In Out

6060-tracker

by Allen1212
303 stars

The 6060-tracker draws historical ARK Invest purchase marks for this stock on the price chart. With the ETF input set to ALL, it places green below-bar labels reading Buy X1 on many fixed calendar dates from June through late November 2020. The only setting sw

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

ArrayStatistics

by ricardosantos79
261 stars

ArrayStatistics is a Pine Script v5 library of exported functions that compute descriptive statistics on numeric arrays. It returns root mean square, Pearson first and second skewness coefficients, the Pearson correlation between two samples, and kurtosis from

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

This strategy overlays the price chart and builds Ichimoku-style Tenkan, Kijun, Chikou, and Senkou values from a ten-bar average of opens. It plots pivot highs and lows as resistance and support circles and reconstructs Heikin-Ashi-like prices from recent open

Strategy v5 TrendSupport & resistance Repaints
Updated 6 weeks ago · None stated GitHub repository of Dev - Futures No repaint

STRG One Bar Pursuit

by harryguiacorn
219 stars

The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po

Strategy v5 Candlestick patternsMean reversion
Updated 1 year ago · None stated GitHub repository of STRG One Bar Pursuit

扣抵草稿

by TaichiS
219 stars

This indicator plots a visual reference directly on the main price chart. It checks whether the current bar is the last bar on the chart and displays text below the candle with a twenty-bar negative offset. Designed as an educational draft for moving average d

Indicator v4 Moving averages
Updated 5 years ago · None stated GitHub repository of 扣抵草稿

ATR Forward Box

by TradersPost
218 stars

This overlay indicator draws a one-bar-wide box a chosen number of bars ahead of the current bar. The box is centered on the selected price—current close, high, low, or HL2—and extends one ATR above and below that level. It deletes the previous box and creates

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of ATR Forward Box

This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.

Strategy v5 AI / machine learningTrend
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy [5] (v.3)
106 stars

This strategy simulates a dollar-cost averaging (DCA) trading bot that enters positions when a short moving average crosses over or under a long moving average. It manages trades by placing scaled safety orders as price drops, lowering the average position ent

Strategy v5 Moving averagesMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Visible DCA Strategy
104 stars

The ABC and Parabolic SAR Strategy calculates ABC chart patterns using a ZigZag structure alongside Fibonacci retracement levels and a trend cloud formed by six moving averages. It visualizes trend direction and pattern signals directly on the main price chart

Strategy v4 TrendSupport & resistance Repaints
Updated 3 years ago · MIT GitHub repository of ABC and Parabolic SAR Strategy

The AMFM indicator decomposes price movements into amplitude and frequency components using Ehlers' digital signal processing methods. It whitens the derivative as close minus open, then computes AM as the smoothed envelope of the absolute difference over 4 pe

Indicator v6 Volatility & bandsMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of AMFM - Ehlers AM Detector / FM Demodulator
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap

CCI line gradient

by be-thomas
65 stars

This indicator calculates the Commodity Channel Index from a user-selected source and length, then plots that oscillator in a separate pane. It colors the CCI line with a gradient that shifts from the bear color toward the bull color as the value moves from ne

Indicator v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of CCI line gradient

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