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 long-biased signal indicator for the price chart built on a Hull moving average. A buy is shown when price is above a rising HMA, provided volume agrees through a price-volume trend filter or a momentum override based on RSI applies. After a buy, a trailing

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of RAPF v21.0 [Balanced Momentum]

Three Bar Reversal Pattern

by feliperazeek
1 stars

This strategy detects three-bar reversal patterns in normal, enhanced or both forms, derives support and resistance from them as levels or zones, and trades the reversals on the price chart. An optional trend filter uses a moving average cloud, Supertrend or D

Strategy v5 Candlestick patternsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Three Bar Reversal Pattern

Screener Template

by NakliTechie
1 stars

This template indicator provides a baseline framework for building custom Pine Script market screeners. It sets up a standard configurable length parameter and offers structured comment blocks for adding calculations, filtering conditions, and outputs. Designe

Indicator v5 Screeners & dashboards
Updated 1 year ago · MIT GitHub repository of Screener Template

Hull Suite by InSilico

by turnupdigital
1 stars

An indicator that plots a Hull moving average on the price chart, with a choice of Hma, Thma or Ehma variants, an adjustable length and multiplier, and an option to take the average from a higher timeframe. The line is coloured by trend direction and can be dr

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Hull Suite by InSilico

TeeLek CDC Action Zone

by theteelek
1 stars

A multi-timeframe overlay indicator that compares an EMA 12 with an EMA 26 on weekly, daily, 6-hour, 4-hour, 2-hour and 1-hour data and shades the area between them on the chart. The fill is green when the fast average is above the slow one and red otherwise.

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TeeLek CDC Action Zone
1 stars

This strategy calculates fast and slow simple moving averages to identify trend direction changes on the price chart. It enters a long position when the fast simple moving average crosses above the slow simple moving average and opens a short position when it

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Two Moving Average Crossover
1 stars

A scalping strategy that goes long when a 9 EMA crosses above a 21 EMA while price crosses above VWAP, and short on the opposite pair of crosses. Exits close the trade at 1.5 ATR from the average entry price or on a MACD cross with a new five-bar extreme. A br

Strategy v5 ScalpingMoving averages
Updated 1 year ago · None stated GitHub repository of S50 TFEX Scalping Strategy
1 stars

This strategy measures volatility as the standard deviation of closes and compares it with its own moving average multiplied by a threshold. When volatility is expanding and the close is beyond a Bollinger Band (20 periods, 2 deviations, fixed in the code), it

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Volatility Breakout Strategy

TSI & Divergences

by munlit
1 stars

A separate-pane indicator that calculates the True Strength Index with fast, slow and signal lengths and detects regular and hidden divergences between price and the oscillator. Pivot lookback and range inputs control how far apart pivots may be, and each dive

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of TSI & Divergences

Request

by ivansoft
1 stars

A Pine Script v6 library that wraps data requests for external series. It supports economic series identified by a code, and Commitment of Traders data selected by metric name, direction and an optional CFTC code, building on the LibraryCOT library for the met

Library v6
Updated 1 year ago · None stated GitHub repository of Request
1 stars

A long-side strategy that combines a Stochastic Momentum Index, a fast and slow EMA pair and MACD histogram. It enters long when the SMI crosses above its EMA while below the overbought level, and exits on the opposite SMI cross or when the fast EMA crosses un

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of SMI-MA Long Strategy

Hello world

by fiji-solutions
1 stars

This indicator demonstrates custom user-defined functions in Pine Script v5 and plots their results in a separate pane. It defines a one-line addition function, a multi-line function that multiplies two numbers and then scales the product by a fixed multiplier

Indicator v5
Updated 2 years ago · None stated GitHub repository of Hello world

Trend Histogram

by JoeTonDev
1 stars

A separate-pane indicator that shows two trend states as colored histogram bars, a slow one from 3, 8 and 20 period simple averages and a fast one from 21, 55 and 89 period averages. Green means the averages are stacked bullishly, yellow a pullback, light red

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Trend Histogram

My strategy 11

by akash-yellgetti
1 stars

A strategy-type script for the price chart built around a fast and slow moving average pair, exponential or simple, whose lines and fill change colour with the direction of the gap. It prints B and S labels at crossovers and builds text messages for an externa

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of My strategy 11
1 stars

This indicator calculates a stochastic momentum reading in a separate pane. It compares the close with the midpoint of the highest high and lowest low over a percent-K lookback, then smooths that relative range with nested exponential moving averages using the

Indicator v4 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of UCS Stochastic Momentum Index
1 stars

This indicator plots Stochastic RSI %K and %D lines over the price chart. It detects bullish and bearish divergences by comparing price highs and lows to those of Stochastic RSI within a lookback period. Users set divergence range (short, medium, long), price

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

A Pine v4 indicator in a separate pane that computes a rolling Sharpe-style ratio over a 200-bar window and compares it with a benchmark symbol, SPY by default. An optional reference interest rate series can be subtracted, a Hull moving average smooths the out

Indicator v4 Volatility & bands
Updated 3 years ago · None stated GitHub repository of Tykhe Rolling Sharpe Ratio Mansfield

Detrending Plot

by JohnsonHsiao
1 stars

This indicator calculates the difference between the current closing price and historical closing prices across six selectable lookback periods. It plots each detrended series in a distinct color along with a zero baseline in a separate indicator pane. Users c

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of Detrending Plot
1 stars

A separate-pane tool that plots a very long RSI, 500 periods by default, with a ribbon of five exponential moving averages of the RSI at 1 to 5 bars. Dashed guide levels are set at 85, 70, 50, 20 and 10 and can be changed. A lookback period setting is also pro

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of RSI+EMAs for Bootsie Strategy

Simple Short Term RSI

by juliencrn
1 stars

Simple Short Term RSI is an unfinished Pine v4 learning strategy, marked as such by its author. It calculates a 2-period and a 14-period RSI and plots both in a separate pane. Its only trading rule is a long entry whenever the 2-period RSI is above 50, which d

Strategy v4 Oscillators & momentumMean reversion Archived
Updated 4 years ago · None stated GitHub repository of Simple Short Term RSI

This indicator combines three tools on the price chart: a Supertrend built from Heikin Ashi data with a one-bar ATR and a multiplier of 1.85, an Ichimoku cloud, and a chop candle colouring based on an arctangent measure of price movement. Each part has its own

Indicator v5 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of Supertrend Ichimoku Chop Combination

EMA Cross Strategy

by tseitz
1 stars

The EMA Cross Strategy calculates an exponential moving average of close prices over a user-defined length. It enters a long position when a green candle opens above the moving average line, simultaneously closing any active short position. Conversely, it open

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

This indicator plots a Sharp Modified Moving Average on the price chart. It calculates the line as three times a weighted moving average minus twice a simple moving average of the selected source. The line turns green when it rises and pink when it falls. Opti

Indicator v6 Moving averages
Updated 11 days ago · GPL-3.0 GitHub repository of Sharp Modified Moving Average
575 stars

This overlay indicator scans a pasted list of symbols for ICT liquidity sweep patterns using prior swing sweeps. The screening method looks back one, two, or three swings and can list long and short signals in a results table with adjustable rows, position, an

Indicator v5 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Sweep Pattern Scanner
330 stars

This indicator plots candle range and open-to-close movement as percentages in a separate pane. Range is the high-low difference divided by the low, and change is the close-open difference divided by the open. Both series draw as columns. Teal columns show ran

Indicator v5 Volatility & bands
Updated 2 months ago · None stated GitHub repository of Percent & Volatility [Alorse]

Vol Box

by namuan
318 stars

Calculates realized volatility by smoothing squared log returns with an exponential moving average annualized by periods per year. It projects expected upper and lower price boundaries across a user-defined forward horizon, plotting them as step lines or displ

Indicator v5 Volatility & bands
Updated 2 months ago · MIT GitHub repository of Vol Box

8473-Tracker

by Allen1212
303 stars

8473-Tracker visualizes historical buying and selling transactions executed by ARK Invest funds for specific stock holdings. It plots green buy labels below price bars and red sell labels above price bars on specific historical trade dates. An input setting al

Indicator v4
Updated 2 years ago · None stated GitHub repository of 8473-Tracker

Color Triangular Gradient

by ricardosantos79
261 stars

This script defines a helper function to generate colors via triangular interpolation using TradingView's color.from_gradient. The function blends between minimum, mid, and maximum color points based on an input value. It applies the function to the RSI indica

Indicator v5 Support & resistance
Updated 4 years ago · None stated GitHub repository of Color Triangular Gradient
257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald - Test Logic Futures

Wick Power Shift

by harryguiacorn
219 stars

Wick Power Shift calculates and plots the smoothed average sizes of upper and lower candlestick wicks in a separate pane. It measures lower wick length (distance from the lower body to the low) and upper wick length (distance from the upper body to the high),

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Wick Power Shift
219 stars

This educational script draws a vertical line on the price chart at 9:30 AM New York time to mark the standard US equity market open. It uses the line.new function to plot a thick, semi-transparent gray vertical line extending from above the bar high to below

Indicator v4 Sessions & time
Updated 5 years ago · None stated GitHub repository of 教學-畫垂直線2-使用line
218 stars

This indicator detects a Bollinger Band squeeze when the bands sit inside Keltner Channels, marking low volatility. It plots red dots during a squeeze and green dots when the bands are outside, in a separate pane. An optional histogram shows momentum as the cl

Indicator v6 Volatility & bandsOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Bollinger Band Squeeze Detector

22-MA Strategy

by capissimo
114 stars

22-MA Strategy plots a selectable center moving average on the price chart and marks upper and lower levels a fixed pip distance from that average. It supports twenty-two average types, from SMA, EMA, and HMA variants through filters such as Kalman and JMA-sty

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of 22-MA Strategy
106 stars

This strategy plots on the price chart and enters when three smoothed moving averages are aligned, RSI is on the matching side of 50, and a Williams fractal appears. An upward stack with RSI above 50 and a down fractal opens a long; the opposite setup opens a

Strategy v5 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 3SmmaCrossUp + Fractal + RSI

Aroon (AROON)

by mihakralj
99 stars

This indicator calculates Aroon Up and Aroon Down from the bars since the highest high and the lowest low inside a chosen period. It plots both series in a separate pane with horizontal lines at 30, 50 and 70. The period input sets the lookback used for those

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Aroon (AROON)

Moon Dev GEX Walls & Trap

by moondevonyt
92 stars

This indicator estimates gamma exposure levels and intraday context for index instruments like SPY and ES. It calculates VWAP with standard deviation bands as a gamma flip proxy, highlighting market regimes through background colors. It plots prior day high, l

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Walls & Trap

Color Picker Showcase

by be-thomas
65 stars

This educational script demonstrates Pine Script dynamic coloring techniques by plotting the closing price in a separate pane. It evaluates whether the current bar is bullish or bearish by comparing the close price to the open price. If the bar is bullish, it

Indicator v5
Updated 5 days ago · GPL-3.0 GitHub repository of Color Picker Showcase

MS+MACD Basic Tests

by iamrichardD
57 stars

This script implements an automated unit testing suite for a 4-hour swing trading system based on market structure and MACD. Utilizing a custom PineUnit framework with user-defined types, it validates mock functions for change of character, break of structure,

Strategy v6 SMC / ICT / price actionOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of MS+MACD Basic Tests

Power Of Index

by iamc1oud
56 stars

This indicator maps Smart Money Concepts (SMC) features directly on the price chart. It detects and visualizes internal and swing market structure breaks (BOS and CHoCH), bullish and bearish order blocks, equal highs and lows, and strong or weak swing points.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Power Of Index
55 stars

This indicator plots the Parabolic SAR on the price chart as crosses. It computes SAR with a start of 0.02, an increment of 0.02, and a maximum of 0.2, then colors each point green when the SAR value sits below the close and red otherwise. Those acceleration v

Indicator v6 Trend
Updated 6 months ago · Apache-2.0 GitHub repository of Parabolic SAR & ATR/CMF
53 stars

This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · MPL-2.0 GitHub repository of Larry Connors 2-Period RSI Strategy

Calculates and plots a second-order Butterworth low-pass infinite impulse response filter on the price chart. It smooths price series data by attenuating high-frequency market noise according to a specified cutoff period. Users can adjust the length setting an

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Butterworth 2nd Order Filter (BUTTER)

NQ Stats - Initial Balance

by TamaraKGreen
46 stars

NQ Stats - Initial Balance calculates and displays the Initial Balance range, including the session high, low, and midpoint, for a customizable intraday time window. Once the defined calculation period ends, the indicator overlays a shaded box and a midpoint l

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats - Initial Balance

RSI-VWMA

by Zettt
43 stars

This indicator calculates the Relative Strength Index using a volume-weighted moving average of the closing price as its source. It plots the resulting oscillator in a separate pane alongside configurable overbought and oversold threshold lines. The plot line

Indicator v4 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of RSI-VWMA

This overlay strategy is written for the SOLUSDT perpetual on the one-minute chart. It tracks confirmed pivot highs and lows as resistance and support circles, then marks strong buy or sell states when close crosses those levels. Long and short conditions comp

Strategy v5 Support & resistanceBreakout Repaints
Updated 2 years ago · None stated GitHub repository of SOLUSDTPERP 1m - Strategy Candle Bar

Planetary Retrograde Periods

by blueprintresearch-dev
42 stars

Planetary Retrograde Periods calculates and visualizes planetary retrograde motion directly on the price chart using geocentric ephemeris speed algorithms. It supports planets from Mercury through Pluto and divides retrograde cycles into two distinct phases wi

Indicator v6
Updated 2 weeks ago · None stated GitHub repository of Planetary Retrograde Periods

1-Month RS

by ChartsLector
41 stars

This indicator calculates the relative strength of the current asset compared to a benchmark symbol such as SPY. It stores the price ratio across a configurable lookback window, ranks the current ratio as a percentile from 0 to 100, and plots the result as a c

Indicator v5 Oscillators & momentumTrend
Updated 3 days ago · None stated GitHub repository of 1-Month RS

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