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

Rolling VWAP

by regalouisei
2 stars

The Rolling VWAP indicator calculates and overlays a rolling volume-weighted average price directly on the price chart. Unlike anchored or daily reset VWAPs, it calculates volume-weighted price over a continuous rolling time window defined by days, hours, and

Indicator v6 Moving averagesVolume
Updated 8 months ago · None stated GitHub repository of Rolling VWAP

HMA sweete

by mushroom-men-Trading
2 stars

The HMA sweete indicator computes multiple variants of the Hull Moving Average including standard HMA THMA EHMA and custom z- versions with added momentum. Users can select the source series MA type length multiplier and history bars for up to three MAs. It pl

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of HMA sweete

Fair Value Gap Strategy

by wynnforthework
2 stars

This strategy identifies and plots Fair Value Gaps (FVG) and Balanced Price Ranges (BPR) directly on the price chart. It generates trading signals when price retraces into active gap zones using a customizable entry ratio coefficient. Stop loss levels are plac

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Fair Value Gap Strategy
2 stars

This educational indicator calculates and visualizes market gap sizes in a separate pane. It computes two distinct metrics: the absolute percentage gap between the current bar open and the previous close, and the percentage gap distance between the current bar

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Candlesticks - Calculating Gaps

My Script

by majixai
1 stars

This indicator draws price data on the chart. It uses a plot budget function to limit the number of plots and displays close, high, and low prices. The script also provides functions to draw dynamic boxes and lines on the price chart. Arrays manage these objec

Indicator v5 Support & resistanceScreeners & dashboards
Updated yesterday · None stated GitHub repository of My Script

This strategy implements the classic Turtle Trading breakout rules on the price chart. It enters positions when price breaks above or below highest high or lowest low channel levels. Position size is dynamically calculated using ATR volatility so that one ATR

Strategy v6 BreakoutTrend
Updated 3 days ago · MPL-2.0 GitHub repository of Turtle Breakout (Dennis & Eckhardt) [JR]
1 stars

This long-only strategy identifies trading opportunities using anchored VWAP reclaims, retests, and breakouts. It calculates VWAP with standard deviation bands alongside zero-lag EMA slope filters to verify market trend alignment. Entries trigger either from a

Strategy v6 TrendMoving averages Repaints
Updated 3 days ago · None stated GitHub repository of VWAP Reclaim (LONG-only)

MA Stack Array

by pineforge-4pass
1 stars

This strategy calculates three simple moving averages with lengths 10, 20 and 50. It identifies a bull stack when the shortest exceeds the middle which exceeds the longest, and a bear stack in the opposite direction. A var-bool latch tracks prior states to sup

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of MA Stack Array

P_err_unclosed_paren

by GammaExpansion
1 stars

This script is an indicator written in Pine Script version 6. It declares an indicator named P_err_unclosed_paren and plots the close price using the plot function. The plot draws in a separate pane. There are no input settings. The script is incomplete with a

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

An overlay indicator for the New York morning window that looks for qualified structure breaks on a 5-minute chart. Direction is filtered by a one-hour bias built from swing structure and EMAs. A break must clear swing, channel or session-extreme levels and pa

Indicator v6 BreakoutSessions & time Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Morning Structure + Flow Research

DEPV2 DEBUG S17

by YuceSezar89
1 stars

DEPV2 DEBUG S17 is a debug indicator for a multi-method crypto trading signal tool. It supports 20 major cryptocurrency symbols from Binance such as BTCUSDT, ETHUSDT, SOLUSDT, and others. Four signal classes are available: TREND based on price levels, MOMENTUM

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

6/20 Cloud Flip

by vedkanani123
1 stars

A small price-chart indicator that plots a fast and a slow exponential moving average, defaulting to 6 and 20 periods, and fills the space between them with a cloud. The cloud is green while the fast average is above the slow one and red otherwise, so a colour

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of 6/20 Cloud Flip
1 stars

A large detection indicator that merges many volume and price-pattern engines into numbered signals drawn as shapes on the price chart. Components include pocket pivot detection, displacement measured in standard deviations, a VWMA with ATR Supertrend, relativ

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of B2B PUP Combined 5.4 Tick-Friendly

GrimmTurtle

by GreyssonEnterprises
1 stars

A short Pine v4 indicator that plots a Donchian-style channel using the highest and lowest values over a set length, with a midpoint line. It labels a bullish or bearish Turtle when the previous bar's upper band rose or fell compared with the bar before, colou

Indicator v4 BreakoutTrend
Updated 2 months ago · MIT GitHub repository of GrimmTurtle

Hurst Peak Marker V2

by mikeyhu70
1 stars

A Pine Script v5 indicator in a separate pane, the second revision of a Hurst cycle peak marker. It passes the hl2 price through bandpass filters for cycles from 1 day to 18 years and draws labels and lines at cycle peaks. Each cycle has its own bandwidth and

Indicator v5 Oscillators & momentumSupport & resistance
Updated 6 months ago · None stated GitHub repository of Hurst Peak Marker V2

Method Example

by ivansoft
1 stars

Teaching script showing user-defined methods in Pine. A method keeps an array of the latest 50 closes by adding a new value and removing the oldest, and the script plots the array's average in a separate pane, which acts as a 50-bar simple average. It also not

Indicator v6
Updated 1 year ago · None stated GitHub repository of Method Example

Neural Network

by zhuzp98
1 stars

A strategy that scores many indicators and trades when the total reaches a set threshold. Inputs weight an EMA trend, SuperTrend, Parabolic SAR, Hull average, RSI, MACD, WaveTrend, Stochastic, Bollinger and ATR signals, including divergences. Separate strong a

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Neural Network

VHF Indicator

by JohnsonHsiao
1 stars

This indicator calculates the Vertical Horizontal Filter (VHF) to help identify whether a market is trending or ranging. It measures the difference between the highest and lowest close over a user-defined period and divides it by the sum of absolute bar-to-bar

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of VHF Indicator
1 stars

A Pine v4 strategy that builds a MACD from simple moving averages of 12 and 26 bars with a nine-bar signal, alongside a 14-period RSI. It plots the volume-weighted average price in blue and the 30-bar highest and lowest closes as green and red lines on the pri

Strategy v4 Oscillators & momentumVolume Repaints
Updated 4 years ago · None stated GitHub repository of MACD Please (Shorts)

Hampel Filter

by everget
948 stars

The Hampel Filter indicator identifies and filters out price outliers to smooth price data directly on the main chart. It calculates the rolling median and Median Absolute Deviation (MAD) of the chosen source series over a specified length. When a data point e

Indicator v4 Moving averagesVolatility & bands
Updated 11 days ago · GPL-3.0 GitHub repository of Hampel Filter

APTV-tracker

by Allen1212
303 stars

APTV-tracker plots historical ARK Invest buy and sell transactions directly on the price chart for Aptiv PLC. The script uses hardcoded labels anchored to specific historical timestamps to mark execution dates, showing transaction directions and ETF counts. An

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

FunctionNNLayer

by ricardosantos79
261 stars

FunctionNNLayer is a Pine Script v5 library providing a generalized neural network layer computation. It accepts an input array, a weight matrix flattened into an array, the target number of nodes, a bias value, and an activation function name. It computes per

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of FunctionNNLayer
257 stars

Calculates three weighted moving averages (11-period, 48-period, and 200-period WMAs) to evaluate market trend conditions directly on the price chart. It monitors crossovers between price and WMAs as well as crossovers between the moving averages themselves to

Indicator v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of Snag - NEW SWING FAST
218 stars

This indicator computes moving average and RSI bias signals across the current timeframe and four higher timeframes. It sums biases from the MA and RSI to derive an overall bullish or bearish signal. The results appear in a configurable table that displays eac

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Template
114 stars

This indicator calculates key support and resistance levels by analyzing the first and second momentum derivatives of a Double Exponential Moving Average (DEMA). When the second derivative (momentum of momentum) crosses zero, it identifies local turning points

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

AlphaTrend

by hasnocool
106 stars

AlphaTrend calculates a trailing trendline using ATR bands combined with momentum or volume filters (MFI by default, or RSI when volume data is disabled). It plots the AlphaTrend line alongside a two-bar delayed reference line directly on the price chart. The

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of AlphaTrend
99 stars

The Chande Forecast Oscillator plots the percentage difference between the selected source and a linear-regression forecast of that source. It fits slope and intercept over the chosen period using incremental sums, then expresses the forecast error as a percen

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chande Forecast Oscillator (CFO)

Volume

by be-thomas
65 stars

This indicator plots volume as columns in a separate pane. Bar color is the bull input when close is above open and the bear input otherwise. A running count of consecutive volume rises or falls, clamped between one and the gradient-levels setting, sets column

Indicator v5 Volume
Updated 5 days ago · GPL-3.0 GitHub repository of Volume

This indicator calculates a Gaussian-weighted moving average of a chosen price source and plots it on the price chart. It builds a finite impulse response window, weights past bars with a normalized Gaussian bell, and returns the weighted mean. Period sets the

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Gaussian-Weighted Moving Average (GWMA)

Hourly Time Levels

by TamaraKGreen
46 stars

Hourly Time Levels plots opening price horizontal lines and text labels at specific user-selected times of the trading day directly on the main price chart. It marks key intraday timestamps such as midnight, market opens, and specific hourly intervals includin

Indicator v5 Support & resistanceSessions & time
Updated 7 weeks ago · None stated GitHub repository of Hourly Time Levels

Dark Cloud Cover - Bearish

by TWODS-CAPITAL
37 stars

Identifies the two-candle Dark Cloud Cover bearish reversal candlestick pattern on price charts. The indicator evaluates the prevailing trend using optional simple moving averages (SMA 50 or SMA 200) and checks for a strong bullish candle followed by a bearish

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Dark Cloud Cover - Bearish
16 stars

This strategy plots on the price chart and trades Donchian breakouts in long or short directions. It sizes each unit from a risk percentage of price and an ATR-based initial stop, then adds units at a fixed ATR step up to a maximum. An ATR trail can exit, and

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 39: Adaptive Targets

FairValueGap E003

by ruckard
13 stars

Calculates the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will partially fill the gap. It incorporates risk management with customizable stop loss, take profit based on ri

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FairValueGap E003

This indicator classifies market state into bull, bear, or neutral regimes using three moving averages and ATR-based stop bands plotted directly on the price chart. It evaluates alignment across customizable MA types (SMA, EMA, DEMA, TEMA, or JMA) and filters

Indicator v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of MA Regime Bands [WavesUnchained]

Average True Range V2

by eddiebelaval
7 stars

Average True Range V2 calculates market volatility using customizable moving average smoothing methods, including RMA, SMA, EMA, and WMA. Drawn in a separate pane, it offers options to wait for bar confirmation before updating values and can invert the ATR sca

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of Average True Range V2
6 stars

This strategy combines Opening Range Breakout (ORB) mechanics with Inner Circle Trader (ICT) concepts like Fair Value Gaps, Order Blocks, and liquidity grabs. It identifies session opening ranges and generates signals when price breaks out with supporting rela

Strategy v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Advanced ORB + ICT Strategy

VuManChu B Divergences

by jerryinyang
5 stars

The VuManChu B Divergences indicator combines a WaveTrend oscillator with a Money Flow Index calculation to analyze market momentum and volume flow. It plots dual WaveTrend curves alongside overbought and oversold levels in a separate indicator pane, highlight

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of VuManChu B Divergences

MTF EMA + MACD

by krosenfeld7
5 stars

This indicator plots two multi-timeframe exponential moving averages on the price chart and calculates a MACD from the chart source. It marks Long when the shorter-timeframe EMA is above the longer one and a counted sequence of MACD and signal crosses reaches

Indicator v4 TrendMoving averages Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of MTF EMA + MACD
4 stars

This strategy calculates fast and slow exponential moving averages, the Relative Strength Index, and the Average True Range directly on the price chart. It enters long positions when the fast EMA crosses above the slow EMA with RSI above the minimum threshold

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of NQ Nasdaq Strategy [trugurpala]
3 stars

This overlay indicator draws supply and demand zones from prior swing highs and lows, treating supply as resistance and demand as support. It places price-action labels at swing points using higher-high, lower-high, higher-low, and lower-low tags. It also plot

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 5 months ago · None stated GitHub repository of CSW Technical-Analysis
3 stars

Price Action Market Structure Sweeps identifies swing and internal market structure events, including Break of Structure (BOS) and Change of Character (CHoCH). It overlays key high and low levels across daily, weekly, monthly, and yearly timeframes, while mark

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of Price Action Market Structure Sweeps
2 stars

This overlay indicator detects price contractions from confirmed pivot highs and lows. When price later breaks above the contraction high or below the contraction low, it draws a bullish or bearish box between those extremes and a midline at their average. Sep

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 5 weeks ago · None stated GitHub repository of Master Pattern [LuxAlgo]

This Pine Script v5 library exports SwitchingColorMode, which takes a color and a mode string and returns a theme-adjusted color. It reads red, green, blue, and transparency, classifies brightness into coarse channel buckets, and labels the color as hard dark,

Library v5
Updated 2 months ago · None stated GitHub repository of Dark Light Theme TradingFinder Switching Colors Library

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