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

RSI Divergence LONG

by avatar-lavventura
2 stars

This strategy calculates the difference between a fast RSI and a slow RSI to generate long trades. Within a configurable backtest date window, it enters a long position when the fast RSI equals or exceeds the slow RSI. It closes the position when the fast RSI

Strategy v4 Oscillators & momentumDivergence
Updated 7 months ago · None stated GitHub repository of RSI Divergence LONG

Adaptive Market Profile

by regalouisei
2 stars

This indicator plots an adaptive trend channel and market profile directly on the price chart. It calculates linear regression channels either automatically or using a fixed bar period, with support for logarithmic scaling. The script divides the channel into

Indicator v6 TrendVolume
Updated 8 months ago · None stated GitHub repository of Adaptive Market Profile

Holt-Winters Moving Average (HWMA)

by mushroom-men-Trading
2 stars

The Holt-Winters Moving Average (HWMA) indicator applies a triple exponential smoothing algorithm to track price trends by filtering noise while maintaining responsiveness. It computes level, velocity, and acceleration components from a chosen price source ove

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Holt-Winters Moving Average (HWMA)
2 stars

Hull + Volatility + Boom Hunter is a strategy overlay that combines Hull Moving Average variations with Boom Hunter oscillator components. Drawn directly on the main price chart, it tracks market trend direction and momentum. Settings allow switching between s

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Hull + Volatility + Boom Hunter

Draw - Bar and Candles

by Web3Degenerate
2 stars

This educational Pine Script indicator demonstrates how to plot custom price bars using the built-in plotbar function. The script determines whether the current bar is bullish or bearish by comparing the close price to the open price, applying a green or red c

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Draw - Bar and Candles

Volatility Regime Lab

by jayadevrana
1 stars

Volatility Regime Lab ranks the current ATR against its own recent history and labels the market Quiet, Normal, or Wild. It shades the price-chart background by that regime. On the last bar it shows a table of how often each regime occurred, the average N-bar

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 3 days ago · MPL-2.0 GitHub repository of Volatility Regime Lab

VWAP Reclaim Indicator

by skipp-dev
1 stars

This overlay indicator plots an anchored VWAP and marks reclaim setups on the price chart. It can signal a simple VWAP cross or a reclaim, retest, and breakout of a rolling pullback high or low, filtered by trade direction and optional matching VWAP slope. A p

Indicator v6 TrendVolume Repaints
Updated 3 days ago · None stated GitHub repository of VWAP Reclaim Indicator

MACD Signal Cross

by pineforge-4pass
1 stars

A minimal strategy using MACD with fixed 12, 26 and 9 settings. It enters long when the MACD line crosses above the signal line and short when it crosses below, reversing the position each time. It has no inputs, no stop loss and no take profit. The script is

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of MACD Signal Cross
1 stars

P_err_undefined_namespace_function is a Pine Script v6 syntax test fixture created for compiler and parser validation. The script attempts to call and plot an undefined function within the built-in technical analysis namespace. It is designed to verify proper

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_err_undefined_namespace_function

NQ Phantom Scalper Pro

by rosijay17-cmd
1 stars

A strategy that trades around an anchored VWAP with standard-deviation bands. The VWAP can reset each session, week, month, quarter or year, with two adjustable band multipliers. A volume spike filter, a time-of-day filter with an optional lunch-hour exclusion

Strategy v6 Mean reversionVolume
Updated 7 days ago · GPL-3.0 GitHub repository of NQ Phantom Scalper Pro

DEPV2 DEBUG S19

by YuceSezar89
1 stars

This indicator monitors and analyzes up to 20 cryptocurrency pairs across four core analytical dimensions: trend, momentum, volatility, and volume. It generates signals using several selectable modes, including single-factor triggers, simultaneous multi-method

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 12 days ago · None stated GitHub repository of DEPV2 DEBUG S19
1 stars

Volume Power Zones {Morindok} is a price-chart overlay that divides a short lookback of candles, including the live bar, into several horizontal price zones. It draws outer boxes and zone boxes for the previous and current windows, and colors each zone as stro

Indicator v6 VolumeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Volume Power Zones {Morindok}

Adaptive Pivot Structure

by vedkanani123
1 stars

A pivot and structure indicator on the price chart. It marks swing highs and lows with a configurable length, grades them against ATR, and can draw a zigzag, active horizontal levels, break of structure and change of character events, and missed reversals. A F

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Adaptive Pivot Structure
1 stars

A long-only breakout strategy built on a Donchian channel, 25 bars by default, drawn on the price chart as upper and lower lines. At a chosen exchange hour each day it places a buy stop at the previous upper band. The order is cancelled if not filled within a

Strategy v6 BreakoutSessions & time
Updated 2 months ago · None stated GitHub repository of TN Donchian Breakout

IWBDT Strategy

by GreyssonEnterprises
1 stars

A strategy version of a multi-timeframe breakout approach. It reads trend from 9 and 18 period EMAs on three higher timeframes, with the chart timeframe optional, and can trade long and short sides independently. Settings include a risk-to-reward target, a ris

Strategy v4 TrendBreakout
Updated 2 months ago · MIT GitHub repository of IWBDT Strategy

Hurst Peak Marker V4

by mikeyhu70
1 stars

A Pine Script v5 indicator in a separate pane, the fourth revision of a Hurst cycle peak marker. It runs the hl2 price through bandpass filters covering cycles from 1 day to 18 years, then draws labels and lines at detected peaks. Each cycle has separate bandw

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

Combination by yzz

by webcrack4
1 stars

Combination by yzz is an overlay indicator that scans for regular and hidden divergences across multiple technical oscillators simultaneously, including RSI, MACD, Stochastic, CCI, OBV, CMF, MFI, Momentum, and VW-MACD. It identifies pivot points on price and i

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combination by yzz
1 stars

Draws a single box on the price chart that represents one candle from a higher timeframe, using a custom type to hold its open, high, low and close. Past higher-timeframe candles are drawn as boxes when they complete, and the current one updates as price moves

Indicator v6
Updated 1 year ago · None stated GitHub repository of Multi Time Period Chart
1 stars

A Pine v4 strategy using a 12/26 MACD, a 14-period RSI and rolling highs and lows over lookbacks of sixty and two hundred twenty bars. Inputs set take-profit and stop-loss percentages for longs and shorts, and a maximum of four adds. Counters of new highs and

Strategy v4 Oscillators & momentumBreakout Repaints
Updated 4 years ago · None stated GitHub repository of MACD Please 4 (Long Lookbacks)
948 stars

The Holt Exponential Moving Average (HEMA) indicator calculates a trend-following line using double exponential smoothing. It accounts for both level smoothing via the alpha length and trend adjustment via the gamma length. The indicator overlays directly on t

Indicator v4 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Holt Exponential Moving Average

ARCT-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest buy and sell activity for the stock ARCT on the price chart. It places dated labels above or below bars, colored red for sells and green for buys, with a same-day ETF count such as X1. An ETF setting switches

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

HarmonicPattern

by ricardosantos79
261 stars

This Pine Script library provides helper functions to detect and validate harmonic patterns using price and time ratio calculations. It includes utilities to calculate price and time rates between consecutive pattern points, check if values fall within specifi

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

Snag - SPY

by dearvn
257 stars

Snag - SPY is an overlay indicator that tracks market trends using three Weighted Moving Averages (WMA 13, WMA 48, and WMA 200). It plots the three WMAs directly on the main price chart and calculates crossovers between price and the moving averages, as well a

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

This indicator calculates and plots trend direction across four customizable timeframes in a separate pane. It evaluates whether the close is above or below a moving average for each timeframe, assigning directional values that sum into an aggregate alignment

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

This script plots pivot-based support and resistance levels on the price chart while generating directional trade labels tagged with RSI values to measure momentum at turning points. It overlays multi-timeframe open and close step lines with background fills t

Indicator v4 Support & resistanceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Support and Resistance Strategy (v.2)

AlphaTrend Strategy

by hasnocool
106 stars

Calculates the AlphaTrend indicator using ATR combined with the Money Flow Index or RSI, plotting the primary trend line and its two-bar lagged counterpart directly on the price chart. The strategy opens long positions when AlphaTrend crosses above its lagged

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

This indicator calculates the Chande Momentum Oscillator (CMO) to evaluate price momentum over a specified lookback period. It computes the difference between unsmoothed sums of positive and negative price changes using an efficient circular buffer implementat

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chande Momentum Oscillator (CMO)
65 stars

This script calculates a 20-period Relative Strength Index (RSI) based on close prices and plots it in a separate pane with a fixed horizontal midline at level 50. It monitors for centerline crossings, displaying upward green triangles at the bottom when RSI c

Indicator v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Alertcondition() on Single Condition
47 stars

This indicator plots a Hanning-window finite impulse response moving average of a selected price source on the price chart. It weights the lookback with the classic raised-cosine Hanning coefficients, rebuilds those weights when the effective window grows duri

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hanning Moving Average (HANMA)
46 stars

Initial Balance Statistical Mapping plots the high, low, and midpoint of a defined initial balance session, such as the first hour of trading, directly on the main price chart. It projects statistical extension levels using fixed percentile multipliers (25th,

Indicator v5 Support & resistanceSessions & time
Updated 7 weeks ago · None stated GitHub repository of Initial Balance Statistical Mapping

Directional Movement Index

by TWODS-CAPITAL
37 stars

This indicator plots the Directional Movement Index in a separate pane. It calculates plus directional movement and minus directional movement from changes in highs and lows, smooths them with the DI length, and derives the ADX from the absolute difference of

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Directional Movement Index
16 stars

This trend-following strategy generates long and short breakout signals using volatility channels plotted around a simple moving average. It calculates ATR bands for entries and trailing exits, calculating position sizing based on account equity and ATR risk p

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 3: ATR Channel

FilledValueGap A006

by ruckard
13 stars

This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap A006

Calculates a composite carry and decay oscillator fusing impulse-autocorrelation half-life, a Hurst exponent approximation, path efficiency, and range expansion ratios. It evaluates whether an impulse is likely to persist or mean-revert, plotting the oscillato

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Market Memory & Decay Oscillator [WavesUnchained]
6 stars

Apex Protocol - The SMC Engine is a Smart Money Concepts indicator designed for price chart analysis across multiple timeframes. It automatically detects key SMC market structure events including Break of Structure (BOS), Market Structure Shifts (MSS), Order B

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol - The SMC Engine
5 stars

This short-only strategy combines multi-timeframe exponential moving averages with MACD crossovers to find bearish trade opportunities. It calculates and plots two higher-timeframe EMAs directly on the price chart while monitoring MACD line crosses and zero-li

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of MTF EMA + MACD Short Strategy
4 stars

The indicator calculates classic pivot points from the previous day's high, low, and close using request.security. It plots the central pivot (PP) along with resistance levels R1 R2 R3 and support levels S1 S2 S3 directly on the price chart. The only setting s

Indicator v6 Support & resistance Repaints
Updated 2 months ago · MIT GitHub repository of Pivot Points [trugurpala]
3 stars

The CSW Ø-Lag Oscillator is a modified MACD indicator designed to reduce lag using zero-lag moving averages and a custom leader calculation. It plots a zero-lag line, a lagging signal line, and a histogram in a separate pane. The oscillator uses three distinct

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of CSW Ø-Lag Oscillator

RoyalPrince Scanner

by IAMATOMIC001
3 stars

This indicator scans multiple symbols using RSI for overbought and oversold levels, TSI for trend strength, ADX for trend direction and strength, and Supertrend for trend reversals. It plots buy and sell signals on the price chart for each enabled symbol based

Indicator v5 Oscillators & momentumTrend
Updated 12 months ago · None stated GitHub repository of RoyalPrince Scanner

SSL Algo

by TamTH-Dev
2 stars

SSL Algo calculates and displays multi-moving-average SSL hybrid channels directly on the price chart. It combines a customizable baseline, a continuation channel, an exit indicator, and optional ATR bands alongside support EMAs. Users can toggle baseline line

Indicator v5 TrendMoving averages
Updated 5 weeks ago · None stated GitHub repository of SSL Algo

This indicator plots ICT balanced price ranges together with fair value gaps and inversion fair value gaps on the price chart. It marks bullish and bearish BPR zones and optional FVG and IFVG boxes, then tracks mitigation at a proximal, midpoint, or distal lev

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Balanced Price Range [TradingFinder] BPR | FVG + IFVG

Squeeze Momentum Strategy

by avatar-lavventura
2 stars

This strategy adaptation of LazyBear's Squeeze Momentum Indicator combines Bollinger Bands and Keltner Channels to identify periods of market squeeze followed by expansion. It calculates linear regression momentum and plots a color-coded histogram in a separat

Strategy v4 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of Squeeze Momentum Strategy

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