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.
Draws horizontal support and resistance lines on the price chart from confirmed pivot lows and pivot highs. Each level is added only after the pivot length has passed, so it appears with a delay of that many bars. Lines can extend left or right, carry price la
Draws supply and demand zones as boxes on the price chart using pivot-based detection and several detection modes, including classic candle patterns judged by body percentage and an ATR-based mode. Settings include ATR length and multiplier, how many levels to
An indicator on the price chart that estimates order flow from lower-timeframe sub-candles. It combines delta from a main 5 minute and a secondary 1 minute timeframe with weights, and can scale by a 60 minute trend filter. Added modules score delta exhaustion,
This strategy plots 10, 55 and 200 period exponential moving averages on the price chart and calculates a smoothed stochastic oscillator from user K, D and smoothing periods. It opens a long when the K line crosses above D while K is below a fixed oversold lev
The Liquidation Heatmap indicator identifies potential liquidation zones on the price chart by detecting swing highs and lows, then calculates long and short liquidation volumes using selected sources such as volume, range, or their product. It extends bars to
Heikin Ashi Trend is a trend-following strategy that calculates Heikin Ashi candle values and moving averages directly on the main price chart. It generates long and short entry signals when a user-defined number of consecutive Heikin Ashi bars align with fast
This strategy detects bounces from support and resistance levels using swing pivot highs and lows. It waits for the price to touch an identified pivot level within a user-defined percentage tolerance and confirms an entry when a rejection candlestick forms, ch
A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) expiring in the same day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from
ES Professional Fade is an overlay strategy aimed at the ES futures contract. This archived file is only a placeholder and contains no entry, exit, or order logic. Its changelog says the version adds opening-range calculation with freeze logic, session-boundar
Turtle Trading Rules is an indicator based on the classic Turtle Trading Channels system, customized to generate JSON payloads for the OKX Signal Bot. It calculates price breakout channels using configurable entry and exit lengths (defaulting to 20 and 10 peri
A strategy on the price chart that reads an external long and a short signal and manages trades with selectable exits. Position size is a set number of contracts. Exit options include a moving average exit, a fixed stop with up to three targets measured in ATR
This indicator simulates and compares standard daily dollar-cost averaging against HMA-filtered long and short DCA execution models. It tracks accumulated position sizes, average cost prices, and accumulated or unrealized profit within a user-specified date wi
Plots Bollinger Bands %b, which shows where price sits relative to the bands, in a separate pane. Values near one mean price is at the upper band, near zero at the lower band and 0.5 at the middle. Length, source and standard deviation multiplier are adjustabl
A variation on Bollinger Bands drawn on the price chart. It uses a 21-period EMA of the HLC3 price as the basis, with upper and lower bands set by a standard deviation multiplier. It also calculates a band position value and an EMA of band width, shown in the
This Pine Script indicator plots the 50 percent mark of the previous bar's range and detects Piercing Line bullish reversal and Dark Cloud bearish reversal candlestick patterns. It uses a 7-period RSI filter where signals require RSI below 30 for bullish and a
Bjorgum Reversal is an overlay indicator that combines Tillson T3 moving averages, Parabolic SAR, and the True Strength Index to identify trend direction and potential reversal points. It recolors candles to signal trends and potential crossovers, while plotti
A Pine v4 indicator in a separate pane that measures the angle, in degrees, of several moving averages including a Jurik moving average. The comments say the angles indicate whether momentum is rising or falling. A threshold in degrees defines low-slope zones,
This indicator measures how a linear regression of the close changes over a chosen shift, then measures how that slope itself changes. It plots the slope and a second difference in a separate pane with a zero baseline. The regression length sets how many bars
A Pine v4 overlay that finds Williams-style fractals over an adjustable period and combines them with a recent RSI low or high. When a down fractal forms after RSI dipped into one of three bands, up triangles of different shades appear under the bar, offset ba
A Pine v4 strategy that combines rolling highest and lowest values over fast, medium and slow lookbacks with a 12/26 MACD and a 14-period RSI. Inputs set the three lookbacks, an RSI level for closing longs in a short zone, whether shorts are allowed, and two M
The Apirine Adaptive Moving Average calculates a dynamic moving average that adjusts its sensitivity according to price volatility and position within a recent range. It uses highest high and lowest low values over a selected lookback period to scale a smoothi
This overlay indicator screens a pasted list of up to forty symbols and draws a table on the price chart. It classifies bullish or bearish setups from the percent change between the current candle and the candle 250 bars back, then shows RSI with a simple movi
This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries
Plots historical buy and sell transactions made by ARK Invest for Adyen (ticker: ADYEY) directly onto the price chart. The indicator visualizes institutional trade activity by generating green labels below bars for purchases and red labels above bars for sales
This indicator estimates a probability density from a stored set of observations using kernel density estimation. It offers several kernels, including Gaussian as the default, and plots the resulting density in a separate pane. Bandwidth controls smoothness an
This strategy combines Arnaud Legoux Moving Average percentage price change calculations with an adaptive Gaussian Moving Average to generate trend-following signals. Long and short entries are triggered when the ALMA change calculation crosses above or below
This educational script demonstrates custom candlestick rendering on the price chart using the plotcandle function. It calculates a 20-period Simple Moving Average and checks if the bar's low price remains strictly above it. When the condition is met, the indi
This strategy provides reusable building blocks for entries, exits, and risk management in Pine Script. It calculates profit and loss units, applies session filtering based on timezone, and handles backtest date ranges. It includes risk settings like stop loss
This indicator calculates a quadratic regression polynomial curve on price data to identify trend direction and potential dynamic support or resistance. It applies selected forecasting methods, such as seasonal naive or simple mean, to project future values. B
Identifies the 80-20 candlestick setup, triggering when a bar opens in the lower 20% of its total range and closes in the upper 20%, or opens in the upper 20% and closes in the lower 20%. Blue and red arrows plot above qualifying bars directly on the price cha
This indicator calculates the Balance of Power oscillator to gauge underlying buying and selling pressure by evaluating the position of the close relative to the open against the bar high-low range. It provides an option to smooth raw values using an exponenti
Holiday candles is a Pine Script v5 overlay indicator that recolors price candles. It builds a color from random red, green, and blue values and a random transparency level using color.rgb, then draws each bar with plotcandle from the open, high, low, and clos
This indicator plots a DeMarker oscillator in a separate pane. It compares positive changes in highs with negative changes in lows, smooths both series with a selectable moving average, and scales the result from 0 to 100. The line is colored when it is above
The script identifies market structure key levels by calculating pivot highs and pivot lows across a fixed fifteen-bar lookback and lookahead window. It plots confirmed resistance pivots as red circles and support pivots as green crosses directly on the price
This diagnostic utility injects missing (na) values into an input data series at regular cyclic intervals to test how indicators handle corrupted or interrupted data feeds. The user can configure the input source, the repetition interval, and the length of eac
This indicator marks a user-defined session, defaulting to 06:00-09:00 in the America/New_York time zone, and draws that session's high-low range on the price chart. It can show a session anchor, a session open line, a shaded range box, and horizontal levels a
This strategy executes trades based on price interactions with standard Bollinger Bands plotted on the price chart. It calculates a simple moving average basis line along with upper and lower standard deviation bands. Long entries are triggered when price cros
This indicator marks bars whose range exceeds a multiple of the average bar range, calculated as a simple average of prior ranges. On those bull or bear bars it draws the high-low midpoint and the midpoint between the close and the opposite extreme, as dotted
This script provides a foundational starter template for building custom Pine Script v5 trading strategies. It overlays on the main price chart and establishes the scaffolding for long and short positions, including bracketed exit orders. Configurable date inp
This overlay strategy trades Donchian breakouts in either direction. The first unit is sized from a risk percent of equity and an ATR-based initial stop; later units are added at fixed ATR steps and are progressively smaller, up to four units. Optional profit
Divergenced J001 is a price-chart strategy that finds squeeze-momentum divergences and can send Zignaly alert messages. It shorts when a light-green to dark-green squeeze section shows a smaller value while price is higher, and longs on the opposite red-sectio
This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus
Volume Surprise plots volume against a historical summary for matching time periods in a separate pane. It groups past volume by minutes, hours, days, months, or quarters, then summarizes each group with a mean or a percentile. Length sets the sample window an
This indicator plots a smoothed stochastic, a Schaff Trend Cycle, and a WaveTrend oscillator in a separate pane. It draws percent K and percent D between fixed upper and lower bands and marks their crosses when percent D is under 30 or over 70. The STC is a do
This overlay indicator plots a volume-weighted average price on the price chart, anchored to a chosen period such as the session, week, month, or longer calendar and corporate events. It draws up to three standard-deviation bands around the VWAP, with multipli
This indicator plots momentum of a chosen price source over a user-set period in a separate pane. It calculates the difference between the current source value and the value that many bars earlier, then draws the result as a histogram. Positive values appear g
This indicator calculates a user-selected moving average of the source and plots that average's rate of change in a separate pane. Users choose among SMA, EMA, WMA, HMA, RMA, VWMA, and ALMA, plus length and source. ROC length and a multiplier scale the plotted
The Capital41 Structure Swings v3 indicator tracks market structure on the main price chart using pivot detection. It identifies swing highs and swing lows based on a user-defined pivot length, plotting labels and horizontal dotted level lines at active swing
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.