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.
This overlay indicator counts consecutive bars where the close is below the close four bars earlier, and a separate count where the close is above that reference. Each count runs from 1 to 13 and then restarts at 1. It paints price bars with a gradient that da
This strategy draws on the price chart and sizes positions from account equity, a risk percent, and a leverage multiplier. It tracks long and short stops, pending add-on entries, limit and stop order offsets, and a percentage profit target. Settings change lin
The Refined Multi-TF Crypto Analyzer plots technical analysis signals on the main price chart by combining multi-timeframe moving averages, RSI, ADX, and volume spikes. It checks for trend alignment between the chart timeframe and a higher timeframe, identifie
The Wavy Tunnel MS3 strategy plots multiple exponential moving averages to form a wavy tunnel on the price chart. It computes wavy high, close, and low lines using 34-period EMAs, along with 144- and 169-period tunnel lines and a 12-period EMA. Optional RSI an
Advanced Scalping EMA & RSI Strategy is an overlay indicator that combines fast and smooth moving averages with RSI levels and candlestick patterns to generate scalping signals. Users can select calculation methods for moving averages, such as SMA, EMA, WMA, o
This indicator monitors technical conditions across up to ten user-defined ticker symbols simultaneously in a separate chart pane. For each symbol, it fetches market data and computes nine-period and two-hundred-period simple moving averages, a fourteen-period
This indicator plots a SuperTrend line on the price chart to mark trend direction. It builds upper and lower bands from a user-selected price source and either average true range or standard deviation, then trails the active band as the trend continues. A gree
The ATR Reversion System is a long-only mean-reversion strategy that plots ATR bands around a short-term EMA (20) and a long-term EMA (200) filter on the price chart. It signals entries by checking if the close is below the bottom ATR band and above the long E
SJCMom C# is an overlay indicator that identifies trading setups based on multiple moving averages, ATR volatility, and swing pivots. It offers two main strategy modes—Expansion and Band Play—supporting breakout or pullback entries. Users can filter setup dire
Mc War Final is a market structure and Smart Money Concepts indicator that plots swing high and low points, market structure labels, order blocks, and strong or weak high/low levels directly on the price chart. Users can customize swing detection lengths, visu
Range Filter [DW] calculates a smoothed trend filter line accompanied by high and low volatility bands directly on the price chart. The script computes market range using selectable methods such as ATR, Average Change, Standard Deviation, points, or percentage
This indicator plots an exponential moving average of close and a volume-weighted exponential moving average on the price chart. It builds the volume-weighted line from close multiplied by half the bar volume, divided by an exponential average of that half vol
This indicator calculates and plots the Average Directional Index (ADX) along with the positive (+DI) and negative (-DI) directional movement lines in a separate pane. It evaluates trend strength by processing daily price data regardless of the current chart t
Calculates Time Point of Control (TPOC) and Volume Point of Control (VPOC) using lower-timeframe data mapped to the current chart resolution. It plots control levels directly on the price chart, highlighting bars where the percentage of time or volume exceeds
VWAP Percent Distance calculates and plots the relative percentage difference between the closing price and the Volume Weighted Average Price (VWAP). Designed as a mean-reversion tool, it helps traders measure how far price has stretched from VWAP in percentag
This indicator plots four exponential moving averages (50, 100, 200, and 5 periods) on the price chart. It computes an ATR-based trailing stop using sensitivity and period settings. The trailing stop updates based on price action and Heikin Ashi candles if ena
This indicator plots a constant histogram in a separate pane to show whether a selected index is above or below its simple moving average. It requests the index close on the chart timeframe, computes an SMA of a user-set length, and colors the bar lime when pr
This indicator plots adaptive moving averages directly on the price chart based on the selected timeframe. On daily charts, it calculates 10 and 21 EMAs along with 50, 150, and 200 SMAs. On non-daily timeframes, it switches to 30, 40, and 50 SMAs. Additionally
The indicator plots a linear regression channel on the price chart to identify support and resistance levels. It includes options for diagonal trendlines, horizontal support lines, and detects broken channels. Users can show Fibonacci levels, extend lines, and
Flag Finder is an indicator that automatically identifies bull and bear flag chart patterns directly on the price chart. It measures prior momentum (flagpole percentage gain or loss and length) alongside consolidation depth and flag bar duration. When flag con
This indicator identifies and labels market structure components directly on the price chart. It uses pivot calculations to detect swing points, labeling Higher Highs, Lower Highs, Higher Lows, and Lower Lows. It tracks breakouts above or below recent swing le
The Quantitative Stock Confluence Finder is a Pine Script v5 indicator that plots technical elements directly on the price chart to help identify potential confluence zones in stocks. It calculates and displays bands around a simple moving average with adjusta
This strategy calculates modified Ichimoku components using moving averages of high and low values to identify trend directions. It evaluates market outlook based on price relative to Senkou Span lines and generates signals when the Tenkan-Sen crosses the Kiju
This trading strategy combines Bollinger Bands, Relative Strength Index (RSI), and Moving Average Convergence Divergence (MACD) to generate trading signals. It enters positions based on price interactions with Bollinger Bands alongside RSI overbought or overso
This indicator plots an optimal RSI in a separate pane and uses a k-nearest neighbour machine learning routine to adjust lookback and RSI count. It can mark RSI crossings, draw adaptive Bollinger bands around the RSI, and show tables of current settings. Users
This TradingView indicator plots three exponential moving averages of 10, 21, and 50 periods on the price chart. Users toggle visibility of each EMA via a group input. It also colors bars yellow when an inside day forms, defined by the current bar's high and l
This strategy builds a spot grid on the price chart from a user-set upper price and a percentage spacing. It calculates ten descending levels, plots the upper and lower bounds, and allows up to ten stacked entries sized as a percentage of equity. Orders are pr
Calculates and overlays higher-timeframe (HTF) candles and pivot point levels directly onto the price chart. Users can select higher timeframes automatically or manually, toggle wicks and bodies, and customize display modes for historical HTF bars. It plots tr
The Table 1m 15m 1HR indicator renders a multi-asset monitoring table overlay on the top-right of the price chart. It fetches real-time prices and calculates percentage price changes across 1-minute, 15-minute, and 1-hour timeframes relative to the prior day's
This indicator calculates and plots up to three independent Zigzag lines on the price chart, each with its own customizable period and styling. It automatically generates Fibonacci retracement levels based on user-selected Zigzag legs, such as the latest or pr
The ICT Silver Bullet indicator plots Smart Money Concepts market structure elements directly on the main price chart. It detects and highlights market structure shifts, breaks of structure, bullish and bearish order blocks, fair value gaps, balance price rang
This indicator plots the standard Accumulation/Distribution line along with a smoothed signal line in a separate pane. Users can configure the signal line as an exponential moving average or a simple moving average with adjustable length. When enabled, a dynam
This strategy plots standard and dual-level Bollinger Bands on the main price chart to generate breakout signals. It enters a long position when the price crosses above the upper band and enters a short position when the price crosses below the lower band. Pos
This strategy starter boilerplate serves as a backtesting template that overlays directly on the price chart. It sets default position sizing to twenty percent of equity and calculates an exponential moving average alongside high and low price thresholds. Inpu
Mini-Project is a customizable multi-indicator strategy that enables traders to combine entry signals from Linear Regression, RSI, MACD, Parabolic SAR, and Supertrend. Users can toggle individual technical filters on or off to drive trade entries or enable a c
BarUpDn Strategy is a lightweight indicator that identifies basic price momentum by comparing consecutive closing prices. It calculates the difference between the current close and the previous bar's close. When the close is higher, it displays an upward green
This overlay strategy combines optional scalp and swing modes for crypto charts. It filters trades with a higher-timeframe ADX reading, stochastic bands, and a price channel defined by amplitude and deviation. Long or short direction is selected by trend toggl
This strategy serves as a backtesting template for any trading system. It accepts external signals to trigger long or short entries and exits, with optional filters based on EMA and ADX indicators to refine conditions. Time-based restrictions limit trading to
This indicator calculates and plots rolling high, low, and midpoint levels over 24-hour, 48-hour, and 7-day lookback periods directly on the price chart. It projects standard Fibonacci retracement levels based on the 7-day range and detects doji candlestick pa
This indicator plots an anchored volume-weighted average price on the price chart. It accumulates the typical price (HLC3) weighted by volume and resets the calculation at the start of a session, week, month, or year. It also plots bands one, two, and three st
The LS Volatility Index measures price volatility relative to a customizable moving average. It computes the percentage distance of the current price from the chosen source (such as close or open) and normalizes this value by historical volatility, producing a
The Signal Moving Average indicator calculates an adaptive trend line weighted by the R-squared correlation between price and bar index over a configurable period. When the correlation exceeds a fixed threshold, the indicator blends a simple moving average wit
This indicator plots buy and sell labels on the price chart. It calculates a WaveTrend-style oscillator from exponential moving averages, then requires a cross to agree with the slope of a Jurik moving average built on a blended close, VWAP, and OHLC source. A
This script provides a scaffolding template for Pine Script strategies. It establishes framework logic for trade direction toggles, custom backtest date ranges, and percentage-based stop-loss and take-profit calculations. Long and short entry triggers are left
The RSI Line indicator plots a histogram in a separate pane based on the rate of change (ROC) of the chosen source, such as close. It applies two RMA smoothing passes with lengths rhigh and rlow, then final smoothing with tlen. The histogram color indicates mo
The Chart Champions Sessions indicator plots small square markers on the price chart to mark the start and end of major market sessions. It covers Asia, London, New York, close, and specific ASX pre-market and open periods. A top banner dynamically changes col
This indicator detects regular and hidden divergences across multiple technical indicators including RSI, MACD, Stochastic, CCI, momentum, OBV, and others. It calculates pivot points on a chosen source to identify bullish and bearish divergences, then plots co
Tesla Coil is a market cycle oscillator based on digital signal processing concepts from John Ehlers, including Instantaneous Frequency Measurement and In-Phase and Quadrature principles. It treats price movements as wave frequencies to track cycle periods dyn
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.