Synced with GitHub · updated today

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

Daily Deviation

by Electrified-Trading
2 stars

This library calculates arrays of daily price deviations from the open to the high, low, and close over a user-specified number of days. It optionally filters outliers using a maximum deviation threshold. The fromOpen function returns a normalized value showin

Library v5 Volatility & bandsSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of Daily Deviation

MA Based Trend BarColor

by ryangaraygay
2 stars

MA Based Trend BarColor plots three configurable moving averages directly on the price chart. Users can customize the calculation type (SMA, EMA, or VWMA), source price, and lookback length for fast, medium, and slow periods. The script evaluates the stacked a

Indicator v5 TrendMoving averages
Updated 1 year ago · MIT GitHub repository of MA Based Trend BarColor

Day Trading Range

by Web3Degenerate
2 stars

This indicator plots daily trading range lines on the price chart using higher timeframe data. It detects new trading days and draws the open price line in white, upper and lower ATR bands in aqua based on the ATR length and multiplier, yesterday's high in red

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Day Trading Range

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays high time frame candles and pivot points on the current price chart. It plots candles from selected higher timeframes using open-close, high-low or both display styles with optional wicks and bar colors. Pivot points follow traditional

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots
2 stars

This indicator calculates pivot highs and lows using a defined period to draw ZigZag lines directly on the price chart. It projects customizable Fibonacci retracement levels and ratio labels across identified pivot swings. It also displays real-time retracemen

Indicator v5 Support & resistance Repaints
Updated 3 years ago · None stated GitHub repository of ZigZag with Retracement Levels

Trading Rush Choppy Market

by theupslidedown
2 stars

Trading Rush Choppy Market identifies trending versus choppy market conditions based on consecutive bar close price movements. It evaluates sequences of higher or lower closes over the previous six bars to assign trend strength levels. When conditions indicate

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Trading Rush Choppy Market
2 stars

This indicator detects trend changes and divergences using a Zigzag tool combined with an oscillator such as RSI or external sources. It plots zigzag lines on the price chart to mark potential trend reversals and identifies regular and hidden divergences. The

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MIT GitHub repository of Zigzag Trend/Divergence Detector

SMC+OB+FVG_PH

by mydcc
1 stars

This indicator plots smart money concept structures directly on the price chart. It detects and visualizes market structure elements including change of character, break of structure, swing points, inducements, and liquidity sweeps. Additionally, it identifies

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated today · Custom licence GitHub repository of SMC+OB+FVG_PH

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 today · None stated GitHub repository of My Script

EMA Trend Strategy

by jayadevrana
1 stars

Calculates a 9-period fast EMA, 21-period slow EMA, and 200-period trend EMA overlaid on the price chart. It enters long positions when the fast EMA crosses above the slow EMA while price is above the 200 EMA, and short positions when the fast EMA crosses belo

Strategy v6 TrendMoving averages
Updated 2 days ago · MPL-2.0 GitHub repository of EMA Trend Strategy

SMC Context Bus

by skipp-dev
1 stars

This indicator builds a smart-money context frame in a separate pane by calling a private context engine. It exposes hidden numeric plots for schema version, readiness, bias, quality, market structure including break of structure and change of character, imbal

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of SMC Context Bus

Drawing Delete Halt

by pineforge-4pass
1 stars

This validation strategy monitors price crosses against a dynamic level derived from a 20-period simple moving average drawn as a line object. It enters a long position when the closing price crosses over the line level and exits when price crosses under it. A

Strategy v6 Moving averagesTrend
Updated 5 days ago · Apache-2.0 GitHub repository of Drawing Delete Halt

I_strings_ops

by GammaExpansion
1 stars

This Pine Script v6 indicator plots results from string functions including length, position, substring, replace, trim, split, upper, match, and contains. It also demonstrates type conversions with int, float, and tonumber, plus operator precedence examples su

Indicator v6
Updated 5 days ago · MIT GitHub repository of I_strings_ops
1 stars

This strategy compares Bollinger Bands and Keltner Channel to detect volatility regimes. It plots the bands and their difference along with the RSI of the difference on the price chart. Entries and exits occur on transitions in the volatility state, controlled

Strategy v5 Volatility & bandsOscillators & momentum
Updated 6 days ago · None stated GitHub repository of Penguin Volatility State Strategy
1 stars

The script calculates a weighted average of Heikin Ashi score values across four multi-timeframe periods derived from the signal timeframe. It also counts bullish and bearish signals from each timeframe and checks whether the required number of confirming sign

Indicator v6 TrendOscillators & momentum
Updated 11 days ago · None stated GitHub repository of DEPV2 A7 · MTF GÜÇ + TF ONAYI

Calculates retracement grid levels on the price chart using confirmed swing pivot highs and lows based on a user-defined pivot lookback. It allows traders to compare traditional Fibonacci levels against alternative ratio sets, such as thirds or an arbitrary 0.

Indicator v6 Support & resistance
Updated 12 days ago · MPL-2.0 GitHub repository of Taught to Trade - Swing Ratio Grid

TradeModeLibrary

by moonyroy
1 stars

TradeModeLibrary is a helper Pine Script library providing standardized trade state management logic for custom trading strategies. It exports functions representing different execution modes that accept position active status and signal directions. Based on t

Library v6
Updated 3 weeks ago · None stated GitHub repository of TradeModeLibrary

First Line

by Alaamo7
1 stars

First Line is an introductory Pine Script v6 indicator that draws a constant horizontal value of 50 in a separate pane. It does not calculate price, volume, or oscillator data and does not generate buy or sell signals, entries, exits, or alerts. There are no i

Indicator v6
Updated 2 months ago · Custom licence GitHub repository of First Line

Polish

by GreyssonEnterprises
1 stars

This indicator overlays multiple smoothed moving averages, candlestick reversal patterns, and trading session highlights directly onto the price chart. It calculates 21, 50, optional 100, and 200-period smoothed moving averages alongside a short-term moving av

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

The SMC Market Structure Indicator identifies swing points and market structure on the price chart using Smart Money Concepts. It detects higher highs, higher lows, lower lows, and lower highs based on seed mode settings and pivot length. The script plots Brea

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

KLSE Market Regime Dashboard displays a macro market regime overview and sector relative strength metrics in an on-chart table. It retrieves daily data from global macro benchmarks (FBMKLCI, Dow Jones, S&P 500, VIX) and key Malaysian sector leadership proxies

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of KLSE Market Regime Dashboard
1 stars

Multi Variable Declaration is a strategy designed to demonstrate multiple variable declaration syntax within a trading model. It calculates a 12-period price channel midpoint alongside an exponential moving average spread (EMA 9 minus EMA 21) to establish tren

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Multi Variable Declaration

Pivot Points High & Low

by gabriel-klettur
1 stars

This indicator identifies high and low pivot points based on a user-defined leg length. It stores historical pivot prices and timestamps within custom object arrays. On the final confirmed historical bar, the script renders text labels displaying price values

Indicator v6 Support & resistance
Updated 7 months ago · None stated GitHub repository of Pivot Points High & Low
1 stars

BTC ATH Golden Cycle v5 is a Bitcoin-focused strategy that models long-term market trends based on Bitcoin halving cycles. It combines a ZigZag pivot library, Neo-Ichimoku Cloud, Rainbow ribbon visualizer, Geometric Mean Index, and automated Supply and Demand

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

Pivot Points - S/R Trading

by Basant1Saini
1 stars

Calculates classic support and resistance pivot levels using Traditional, Fibonacci, or Camarilla formulas from a higher timeframe. The strategy offers two execution modes: Bounce mode trades reversals within a customizable percentage buffer of support and res

Strategy v5 Support & resistanceBreakout
Updated 7 months ago · None stated GitHub repository of Pivot Points - S/R Trading

Supertrend Enhanced

by haydarkadioglu
1 stars

Supertrend Enhanced plots a classic ATR Supertrend on the price chart and marks trend flips as buy and sell signals. It builds upper and lower bands from an ATR or a simple moving average of true range, then flips direction when price crosses the opposite band

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Supertrend Enhanced
1 stars

The HybridAlgo Multi-Indicator Strategy calculates signals from moving average crossovers, RSI, MACD, and Bollinger Bands. Long and short entries trigger when at least three signals align for confluence. It sets stop loss at three times ATR below entry and tak

Indicator v5 TrendOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of HybridAlgo Multi-Indicator Strategy

RSI Divergence Detector

by knectardev
1 stars

This indicator calculates the RSI and detects regular and hidden divergences between price and RSI pivots. It plots the RSI on the price chart overlay and marks bullish regular, bearish regular, bullish hidden and bearish hidden divergences with labels. Horizo

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

This strategy plots the Relative Strength Index in a separate pane and fades extremes. It opens a long when RSI crosses back above the oversold level and a short when RSI crosses back below the overbought level. Open trades exit at a percentage stop loss or ta

Strategy v5 Oscillators & momentumMean reversion
Updated 11 months ago · None stated GitHub repository of RSI Mean Reversion Strategy

New Indicator Template

by NakliTechie
1 stars

This script serves as a starter template for building custom TradingView Pine Script indicators. It defines basic input settings including a length value and source selection, then provides empty sections for adding calculations and plot statements. The script

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

TD Sequential 9/13

by zhuzp98
1 stars

This indicator tracks DeMark's TD Sequential 9 and 13 setup and countdown conditions directly on the price chart. It compares the current close price to the close four bars prior to determine setup counts, switching direction when price crosses. When setup or

Indicator v5 Oscillators & momentumSupport & resistance
Updated 1 year ago · None stated GitHub repository of TD Sequential 9/13

Hello World

by fiji-solutions
1 stars

Demonstrates symbol information functions alongside basic Average True Range (ATR) conversions. It calculates a 14-period ATR, converts the values into mintick points and pips, and plots each metric in a separate pane. Additionally, on the most recent historic

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of Hello World

This indicator calculates the Relative Strength Index (RSI) applied to various volume-weighted indicators, including Accumulation/Distribution, Elder's Force Index, Money Flow Index, On Balance Volume, and Price Volume Trend. The resulting volume-RSI values ar

Indicator v4 Oscillators & momentumVolume
Updated 2 years ago · None stated GitHub repository of Relative Strength of Volume Indicators by DGT

RSI Failure Swings

by krosenfeld7
1 stars

This indicator detects RSI failure swing patterns and projects corresponding support, resistance, and swing levels onto the chart. It calculates a standard Relative Strength Index across a configurable lookback window to identify pivot highs and lows, drawing

Indicator v4 Oscillators & momentumSupport & resistance
Updated 3 years ago · Apache-2.0 GitHub repository of RSI Failure Swings

Bias

by JohnsonHsiao
1 stars

The indicator computes bias and mbias curves from typical price relative to highest and lowest closes across periods 3, 6, 9, 12, and 20. It sums the positive and negative biases then negates and plots them as b (red) and s (green) lines in a separate pane to

Indicator v5 Support & resistanceMean reversion
Updated 3 years ago · None stated GitHub repository of Bias

SlimTrades 2h

by tseitz
1 stars

SlimTrades 2h is an intraday strategy overlaying short-term high and low price channels alongside momentum measurements from MACD and RSI. It tracks local highs and lows over a user-defined lookback period, plotting them directly on the price chart. The script

Strategy v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of SlimTrades 2h
1 stars

The RSI-ADI-Combo indicator combines Relative Strength Index (RSI), Money Flow Index (MFI), and Average Directional Index (ADX) into a single separate pane visualizer. It plots RSI and MFI line graphs along with a color-coded ADX column histogram that highligh

Indicator v4 Oscillators & momentumVolume
Updated 6 years ago · GPL-3.0 GitHub repository of RSI-ADI-Combo [Numchuck]
948 stars

This indicator measures the chart symbol’s percentage change from the opening price at the start of each US presidential term and plots those values as histogram columns in a separate pane. Columns are offset so each administration appears separately, with a s

Indicator v6 Screeners & dashboards
Updated 10 days ago · GPL-3.0 GitHub repository of Presidents Performance

This indicator plots ICT Fair Value Gaps and internal external range imbalances on multiple high timeframes. It detects liquidity pools and potential reversal zones by analyzing range structures. Three customizable timeframes allow selection of colors and bar

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT External and Internal Range Liquidity Multi-timeframe

Omar Edited WF

by Alorse
330 stars

Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Omar Edited WF

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