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.
A Pine v4 overlay that implements a SuperTrend based on average true range bands around the midpoint of each bar. It determines a trend direction of up or down and a trailing line, with an ATR period of 7 and a factor of 3 by default. A smoothness input is add
This indicator calculates the difference between the standard deviation and average true range of the closing price over a specified period. It plots this gap as a histogram in a separate pane, using different colors to indicate volatile or ranging conditions.
A Pine v4 strategy variant focused on short trades. It sells when price opens below VWAP while the 12/26 MACD is positive and falling, highlighting the bar red, and closes the short when MACD is negative, rising and below its signal. It has options to allow ad
The Farey Sequence Weighted Moving Average calculates a smoothed trend line by weighting historical price values according to terms from a Farey sequence of a selected mathematical order. The line plots directly on the price chart and updates dynamically based
This separate-pane indicator plots a MACD line, a signal line, and a histogram whose colors show whether the histogram is rising or falling above or below zero. The oscillator and signal can each use an SMA or an EMA, and an optional marker highlights MACD and
AMZN Tracker visualizes historical buy and sell transactions made by ARK Invest funds on Amazon stock (AMZN) directly on the price chart. The indicator plots green labels below price bars for buy trades and red labels above for sell trades, displaying the coun
This Pine Script v5 library turns a Unix timestamp into zero-padded text for date, time, or both. It exports datetime, date_, and time_, each defaulting to the current time, and prefixes single-digit months, days, hours, minutes, and seconds with a leading zer
Snag - Auto Trade Futures is an overlay indicator designed for trend tracking using weighted moving averages (WMAs). It plots 13-period, 48-period, and 200-period WMAs directly on the price chart and identifies momentum shifts when these averages cross. When f
The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or
Calculates normalized price vector changes across custom higher timeframes using a minimax scaling algorithm and configurable activation functions like Swish or LReLU. It can optionally incorporate volume data through cumulative volume shifts. The strategy plo
This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av
This overlay indicator calculates Bollinger Bands from a rolling mean and standard deviation and Keltner Channels from a simple moving average plus ATR-smoothed true range. A dedicated function returns whether a squeeze is on, the bandwidth, and the band and c
This indicator defines a function that tracks bar updates by incrementing a counter exclusively on new bars detected via barstate.isnew in Pine Script v5. It plots the resulting update number in a separate pane as a visual reference for bar state concepts. The
This indicator plots support and resistance from confirmed pivot highs and lows on the price chart. It uses a fixed lookback of 20 bars on each side. A pivot high draws a solid red horizontal line that extends to the right, and a pivot low draws a dashed green
Exponential Transformation (EXP) applies a natural exponential function to a selected price or indicator series. Calculated using Pine Script's built-in exponential math function, it transforms the input source into an exponentially scaled series plotted in a
Daily Segment Probabilities is an overlay indicator that lays out twelve percentage bands around the previous day's high and low, from 100 percent below that range to 200 percent above it, in 25 percent steps. It draws previous-day high and low lines and segme
Calculates the Connors RSI composite momentum oscillator, combining a short-term Relative Strength Index, an Up/Down streak length RSI, and a Percent Rank of the one-period Rate of Change. The three components are averaged together to output a single value bou
This price-chart strategy enters long when close breaks the prior Donchian high and short when it breaks the prior low, after a volume check and an optional moving-average regime filter. The first unit risks a percent of price against an ATR stop. Later units
FairValueGap A008 is an automated strategy template designed for integration with the Zignaly trading platform. It uses customizable moving average filters (Curie closing lines) to generate buy and sell signals directly on the main price chart. The strategy fe
This daily-timeframe indicator provides futures market context by evaluating open interest and term structure without altering chart price scales. It requests front-month and next-month futures contracts to measure spread relationships like contango or backwar
This overlay indicator plots Smart Money Concepts (SMC) market structure features directly on the price chart. It calculates swing highs and lows using pivot points to detect Break of Structure (BOS) lines and Change of Character (CHOCH) labels. Additional mod
This indicator calculates Relative Strength Index values across multiple selectable timeframes to generate trade signals overlaid directly on the price chart. It checks for RSI threshold crossings on a lower timeframe while confirming trend conditions on a hig
This indicator maps session-based Candle Range Theory (CRT) cycles by identifying range formation, manipulation, and distribution phases directly on the price chart. It projects range boxes, supply and demand zones, midpoints, and manipulation trendlines accor
Indicatorv5SMC / ICT / price actionSessions & time
This indicator calculates a multi-timeframe MACD, higher-timeframe RSI, and WaveTrend oscillator to generate trading signals. It triggers long entry shapes when higher-timeframe MACD momentum aligns with oversold RSI readings, and short entry shapes during ove
A short-only trading strategy combining three technical indicators: Kijun-Sen, SSL Channel, and Waddah Attar Explosion (WAE). It opens short positions when price is below the Kijun-Sen baseline, the SSL Channel crosses down, and WAE signals downside momentum e
This trend-following strategy generates long and short entries based on the alignment of three exponential moving averages and price position relative to the fastest EMA. An optional RSI momentum filter can confirm directional bias. By default, exits occur on
This indicator plots exponential moving averages of close from the daily, weekly, and monthly timeframes on the price chart. Each series uses the same user-set length and is requested with a one-bar historical offset. Toggles show or hide the daily, weekly, an
CSW Pro Panel is a lower-pane momentum and trend-confirmation indicator. It builds a momentum oscillator from smoothed Heikin Ashi open, high, low, and close values and colors gradient columns by the open-close range relative to the high-low range. Optional pl
OT Algo Toolkit is a Smart Money Concepts market structure indicator that plots swing and internal structure transitions, including Break of Structure (BOS) and Change of Character (CHoCH) labels directly on the price chart. It highlights equal highs and lows,
This indicator plots dual Ichimoku Kumo clouds, designated as Lightning and Thunder, directly on the price chart. It calculates Donchian midpoints across two distinct parameter sets to generate fast and slow Senkou Span A and B boundary lines. The script fills
This chart overlay indicator identifies and plots Smart Money Concepts (SMC) elements based on the ICT 2022 trading model. It detects Fair Value Gaps (FVG), Market Structure Shifts (MSS), and key swing high and low levels using specialized external libraries.
This strategy generates gold trading signals by combining exponential moving averages, Stochastic oscillator, RSI, Fibonacci zones, and M15 rejection wicks. It supports multiple trade execution modes with separate confirmation and scalping legs. Trade entries
This strategy combines the WaveTrend oscillator, a multi-timeframe MACD, and the Williams Vix Fix indicator to identify momentum reversals and volatility spikes in a separate chart pane. Order entry conditions trigger based on WaveTrend oversold thresholds and
Prime Numbers is a mathematical indicator that performs prime number calculations directly on the chart. It provides modes for prime factorization, listing prime numbers, and finding specific prime numbers using either the security's close price or custom inte
This indicator calculates High-Low Volatility using the Parkinson estimator based on high and low prices. It smooths the raw estimator with a running moving average and optionally annualizes the result using a specified number of periods per year. The resultin
This strategy calculates short and long-period Deviation Scaled Moving Averages (DSMA) powered by a SuperSmoother filter to adapt to price volatility. It combines breakout bands, RSI momentum levels, and long-term EMA trend filters to signal entries. Position
This indicator identifies standard bullish and bearish engulfing candlestick patterns and plots visual signals directly on the price chart. A bullish engulfing pattern occurs when a bearish bar is followed by a bar that opens below or equal to the prior close
A strategy that combines an adaptive ATR and momentum trend core with pivot-based structure patterns, higher-timeframe boxes from hourly to yearly, consolidation zones with a point of control, and breakout state tracking. An ensemble of weighted components is
Simple Trend Painter is an overlay indicator that colors chart candles based on their position relative to a simple moving average. Candles are painted green when closing above the moving average and red when closing below it. The script plots the SMA line on
SMC Utils is a Pine Script library providing helper functions for Smart Money Concepts indicators and strategies. It features functions for value range checks, range overlap determination, lower-timeframe selection, formatting price levels and trend states, dy
This strategy is a validation probe that opens one oversized long on the first flat bar at or after bar index 50 and never issues a close or exit. It sets required margin to 20 percent, which corresponds to 5x leverage, and sizes quantity from a five-million n
This minimal strategy demonstrates Pine Script risk management functions by enforcing a maximum drawdown limit of ten percent of equity. The script enters a long position whenever a candle closes higher than its opening price. It plots the current position siz
A strategy for MNQ futures built on the 09:30 to 10:00 New York opening range. It looks for one qualified 15-minute breakout candle, checks body size, close location, wick and ATR limits, then waits for a one or two bar pullback on the 5-minute chart. Entry fo
DEPV2 Debug S14 is a multi-symbol quantitative signal generator that evaluates up to 20 cryptocurrency tickers using four analytical dimensions: trend, momentum, volatility, and volume. Traders can select different signal generation modes, including single met
A strategy in a separate pane built on the WaveTrend oscillator. It enters long when the fast line crosses above the slow line while below the second oversold level, and short on a downward cross while above the second overbought level. Positions close on the
Plots seven mirrored price lines on the price chart. Each is twice a moving average minus the close, using Fibonacci lengths from 8 to 144 and a selectable EMA, SMA or WMA type, with coloured fills between neighbouring lines that can be switched off. It also m
An overlay indicator that draws a cloud around a selectable volume-based moving average, with positive and negative band multipliers setting the upper and lower edges. The signal type setting chooses how the trend is read, with the cloud as the default, and th
Overlay indicator for stock-style charts that flags pocket pivot candles: a large percentage body whose volume beats the highest opposite-colour volume over a lookback. It also tests trend stages using 50, 150 and 200 period EMAs plus distance from the 52-week
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.