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

On Balance Volume

by everget
948 stars

This indicator plots TradingView's On Balance Volume in a separate pane. It optionally overlays an EMA or SMA signal line and colors both lines by whether OBV is above or below that signal. Users can change the smoothing type and length, hide the signal, fill

Indicator v6 Volume
Updated 11 days ago · GPL-3.0 GitHub repository of On Balance Volume

ICT Equal Highs and Lows

by ArunKBhaskar
575 stars

This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows

MTF RSI

by Alorse
330 stars

This strategy enters long when price is above a long moving average and the RSI falls below an oversold level. It closes the long position when the RSI rises above an overbought level or price drops below the moving average. The RSI length, oversold and overbo

Strategy v5 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of MTF RSI
318 stars

This indicator plots three moving averages on the price chart alongside colored fills between the lines to visualize trend structure. Internally, it calculates a Stochastic RSI oscillator to detect oversold reversals. When the Stochastic %K line rises above 10

Indicator v5 Moving averagesOscillators & momentum
Updated 2 months ago · MIT GitHub repository of TVT 3X Scale In Out

4755 Tracker

by Allen1212
303 stars

Plots historical buy and sell transactions made by ARK Invest funds directly on the price chart. The indicator places visual labels above or below price bars on specific timestamps corresponding to trade execution dates, indicating transaction direction and th

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

ArrayOperationsInt

by ricardosantos79
261 stars

This Pine Script v5 library provides basic arithmetic operations for integer arrays. It exports helper functions to add, subtract, multiply, and divide two integer arrays element by element. When the secondary array is shorter than the primary array, operation

Library v5
Updated 4 years ago · None stated GitHub repository of ArrayOperationsInt

AI Trend

by dearvn
257 stars

AI Trend is an indicator that plots pivot points, trend lines, and support and resistance levels directly on the price chart. It marks high and low pivots based on user-defined length, draws trend lines that check for violations at specified points, and identi

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of AI Trend

MACD-V

by harryguiacorn
219 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V
219 stars

This indicator identifies local swing highs and swing lows to construct a Zig Zag pattern on the main price chart. It evaluates pivot points based on a customizable number of surrounding left and right bars. Using persistent variables, the script tracks previo

Indicator v4 Support & resistanceTrend Repaints
Updated 5 years ago · None stated GitHub repository of Teaching: Finding Highs and Lows 6

[TradersPost] Sick Sigma

by TradersPost
218 stars

Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma

Strategy v6 Volatility & bandsMean reversion Repaints
Updated 3 months ago · None stated GitHub repository of [TradersPost] Sick Sigma

This indicator implements an artificial neural network using a single-layer perceptron model trained from scratch directly in Pine Script. It processes price features combined with a custom directional movement index across a rolling sample window to generate

Indicator v5 AI / machine learningTrend
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy 5 (v.2)

This overlay strategy backtests a dollar-cost-averaging bot on the price chart. It opens a long base order when the selected oscillator signals: MACD line cross, MFI or RSI below a threshold, or Stochastic RSI K crossing above D. Further orders average down by

Strategy v5 Oscillators & momentumMean reversion Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Bot DCA Backtester & Signals FREE

This overlay strategy combines a Nadaraya-Watson envelope, an RSI calculation, and an ATR stop-loss finder. With repainting off, it plots yellow upper and lower bands from a Gaussian endpoint estimate; with repainting on, it redraws the envelope on the last ba

Strategy v5 Oscillators & momentumVolatility & bands Repaints
Updated 3 years ago · MIT GitHub repository of Nadaraya-Watson Envelope, RSI, and ATR Stop Loss Finder
99 stars

The Augmented Dickey-Fuller indicator calculates statistical stationarity and tests for unit roots in price series over a rolling window. It performs ordinary least squares regression on differenced historical price data to compute a t-statistic and an estimat

Indicator v6 Mean reversionTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of ADF - Augmented Dickey-Fuller Test

Moon Dev GEX Arrows

by moondevonyt
92 stars

This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow

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

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 5 days ago · GPL-3.0 GitHub repository of CCI DC

Take Profits & Stop Losses

by PythonForForex
64 stars

This educational strategy demonstrates moving average crossovers filtered by RSI momentum, incorporating ATR-based risk management. It calculates a 10-period SMA, a 30-period SMA, a 14-period RSI, and a 14-period ATR. Long entries trigger when the fast SMA cro

Strategy v5 Moving averagesOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Take Profits & Stop Losses

EMA Ribbon MACD v1

by iamrichardD
57 stars

This strategy combines an exponential moving average ribbon with MACD momentum indicators to identify trend-following entry and reversal signals. It draws in a separate pane, tracking MACD signal crossovers, zero-line crosses, and EMA structural alignments. En

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD v1
56 stars

This indicator marks forex trading sessions and opening ranges on the price chart. It can draw Sydney, Tokyo, Frankfurt, London, and New York session boxes or five- and fifteen-minute opening ranges, plus an optional opening channel and a day-open range. Day r

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading Booster by DGT

Ichimoku Cloud

by dcaoyuan
55 stars

The Ichimoku Cloud indicator plots key components of the traditional Ichimoku Kinko Hyo system directly on the price chart. It calculates the Conversion Line over 9 periods and the Base Line over 26 periods using Donchian midpoints. It projects Leading Span A

Indicator v6 TrendSupport & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Ichimoku Cloud
53 stars

Fibonacci Auto Buy/Sell Signals calculates dynamic Fibonacci retracement levels (0.236, 0.382, 0.5, 0.618) and extension levels (1.618, 2.618) based on 50-period swing highs and lows. It plots dotted retracement and extension lines directly on the price chart.

Indicator v6 Support & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Fibonacci Auto Buy/Sell Signals

ZigZag

by milocaetano
48 stars

This Pine Script indicator identifies market structure pivots and plots a ZigZag line on the price chart. It calculates high and low pivot points using built-in pivot functions based on a configurable pivot strength input. When a pivot high or low is confirmed

Indicator v5 Support & resistanceTrend
Updated 2 days ago · MIT GitHub repository of ZigZag

The AFIRMA indicator calculates a weighted moving average via FIR filter coefficients from Hanning, Hamming, Blackman or Blackman-Harris windows. It optionally applies least-squares cubic polynomial fitting for autoregressive prediction. The script plots the A

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of Autoregressive FIR Moving Average (AFIRMA)

This indicator plots the initial balance high, low, midpoint and optional Fibonacci levels for a user-defined session on the price chart. It tracks a separate break session and includes settings groups for extension lines, percentile lines and tables. Users ca

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Initial Balance & Extensions with Z-Scores
43 stars

This indicator evaluates market momentum and risk by calculating trend metrics and volatility stats, displaying them in an on-chart table pane. It measures short-term and long-term trend strength via two MACD configurations built on three customizable EMA leng

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trend Strength & Volatility

This indicator plots a relative strength index in a separate pane. It calculates RSI from the average of the previous ten opens rather than the current bar, so that source does not change during the live candle. A moving average of the RSI is plotted and can b

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of No Repaint - Relative Strength Index

Arnaud Legoux Moving Average

by TWODS-CAPITAL
37 stars

This indicator plots the Arnaud Legoux Moving Average of the closing price on the price chart. It uses TradingView's built-in ALMA calculation with a user-set window size, offset, and sigma. Those three inputs change how much history the average includes and h

Indicator v5 Moving averages
Updated 3 years ago · MIT GitHub repository of Arnaud Legoux Moving Average

RSI + CCI

by thanhnguyennguyen
33 stars

Calculates and plots both the Relative Strength Index (RSI) and the Commodity Channel Index (CCI) together inside a single separate pane. The indicator tracks maximum and minimum RSI values over a customizable lookback window to evaluate bullish and bearish mo

Indicator v4 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI + CCI
29 stars

The Zen Consecutive Bar Streak indicator calculates and tracks consecutive directional candle streaks directly on the main price chart. It determines whether each bar is bullish, bearish, or neutral based on its close relative to its open. When two or more con

Indicator v6 Candlestick patternsTrend
Updated 2 weeks ago · MIT GitHub repository of Zen Consecutive Bar Streak
29 stars

This overlay indicator builds trend ranges from a Donchian midpoint. It takes the highest high and lowest low over a user length, averages them, and holds that basis until the midpoint changes. When the basis updates, it sets a range from the close standard de

Indicator v5 TrendVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Donchian Trend Ranges [AlgoAlpha]

Engulfing Candles - VWMA

by tistaharahap
25 stars

This overlay indicator marks bullish and bearish engulfing candles with teal and orange arrows on the price chart. An optional volume-weighted moving average can filter those marks: a bullish signal requires the close at or below the primary VWMA, and a bearis

Indicator v4 Candlestick patternsMoving averages
Updated 6 years ago · None stated GitHub repository of Engulfing Candles - VWMA
24 stars

This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing

Test Plot Parsing

by jpantsjoha
23 stars

Test Plot Parsing is a minimal test script designed to verify scope detection and syntax parsing in Pine Script v6 development environments. It plots basic price values, including close, open, and high series, in a separate indicator pane. The script intention

Indicator v6
Updated 3 weeks ago · Custom licence GitHub repository of Test Plot Parsing
20 stars

This indicator plots John Ehlers' simple decycler on the price chart. It applies a high-pass filter to the chosen source, subtracts that component from the source, and draws the remaining low-frequency line. The line is green when the decycler rises for two co

Indicator v5 Trend
Updated 1 year ago · None stated GitHub repository of John F. Ehlers - Simple Decycler

HTF Statistical Zones

by samuelharting
18 stars

HTF Statistical Zones plots historical percentile bands around the 18:00 New York day open, plus session boxes, opening-range lines, and projected targets on the price chart. Upper and lower day zones use selectable inner and outer percentiles, with optional p

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 weeks ago · MPL-2.0 GitHub repository of HTF Statistical Zones

Paper umbrella trader

by shibisuriya
18 stars

This indicator marks paper umbrella candles on the price chart. It flags a green or red pattern when the upper wick is small relative to the body side and the body thickness stays between set minimum and maximum percentages of the range. On a match it draws a

Indicator v4 Candlestick patternsSupport & resistance Repaints
Updated 4 years ago · None stated GitHub repository of Paper umbrella trader

Greeffer RSI Strategy

by SammyEnigma
18 stars

The Greeffer RSI Strategy is a basic momentum-based trading strategy that plots a 14-period Relative Strength Index (RSI) in a separate indicator pane. It generates long entry signals when the RSI falls to or below an oversold threshold of 29, and short entry

Strategy v4 Oscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer RSI Strategy
16 stars

A trend-following strategy based on Ed Seykota's Donchian breakout framework, modified to take a single full-risk entry instead of pyramiding multiple units. It enters long or short on 55-bar channel breakouts with ATR-based position sizing and an initial stop

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 15: Single Position
16 stars

This indicator plots RSI, stochastic, and a scaled MACD together in a separate pane. It calculates RSI and stochastic %K and %D, then shifts the stochastic values upward by 100 so they sit above the RSI scale. The MACD line is normalized against its running mi

Indicator v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI, Stochastic, and MACD

SPY 0DTE Scalper - 15min

by chris-c-thomas
14 stars

This intraday overlay establishes directional bias and high-conviction swing setups for SPY on the 15-minute timeframe. It computes a weighted confluence score combining an EMA ribbon, a 50 EMA anchor, session VWAP bands, RSI divergence, ADX, TTM Squeeze, cand

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of SPY 0DTE Scalper - 15min

Crossing EMAs D

by ruckard
13 stars

Crossing EMAs D is a moving average crossover strategy designed to automate trade execution through Zignaly webhook and email integration. It detects simple moving average crossovers (14-period and 28-period) and formats detailed payload alert messages for cry

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Crossing EMAs D
12 stars

This indicator draws custom higher-timeframe period separators and opening price horizontal lines directly on the price chart. Users can select the target timeframe, such as monthly, to display vertical separator lines alongside a horizontal line marking the h

Indicator v5 Support & resistanceSessions & time Repaints
Updated 1 year ago · None stated GitHub repository of My Period Separator All Timeframes

My Strategy

by hirawatt
11 stars

This strategy plots five exponential moving averages of typical price on the price chart and treats a fully ordered stack as a trend signal. It enters long when the averages rise in order or when the 14-period RSI crosses above 60.5, and short on the opposite

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of My Strategy

Portfolio Backtester

by f-cksociety
11 stars

The script is a Pine Script v5 indicator that emulates strategy backtesting directly on the price chart. It evaluates modular entry strategies, trade directions, entry stop-loss types such as ATR multiples or fixed percentages, and a wide variety of trade filt

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Portfolio Backtester

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