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.
This indicator computes the Z-Score of a user-selected moving average or smoothed price series. It provides numerous smoothing modes such as SMMA, EMA, JMA, ALMA, and others to customize the base calculation. The Z-Score uses a chosen length and generates sign
A Pine v4 indicator in a separate pane, titled Parabolic SAR in the code, though the visible logic plots the 14-period RSI together with two bands. The upper band is the highest RSI over 22 bars minus the ATR, and the lower band is the lowest RSI plus the ATR.
The Price Oscillator calculates the difference between two simple moving averages applied to close prices: a fast SMA using fast_len (default 20) and a slow SMA using fast_len plus slow_len_factor (default 60). It plots this oscillator value as a green line in
A Pine v4 strategy that plots a 36-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal
Dividends per Share (DPS, Yearly) calculates and displays annual dividend payment totals retrieved from FactSet fundamental data feeds. It accumulates historical dividend payouts and estimates on a yearly basis, plotting them as styled columns in a separate in
This strategy generates crossover signals using two exponential moving averages calculated from multi-timeframe Heikin Ashi data. It enters long when the fast EMA crosses above the slow EMA and enters short on a crossunder, reversing the open position. Positio
This indicator overlays historical ARK Invest transaction records directly onto the ALTR price chart. It plots green and red labels at precise historical timestamps corresponding to past buy and sell transactions executed by ARK funds, displaying transaction c
This indicator fits a quadratic polynomial regression through recent fractal pivot highs and lows and plots the result as a channel on the price chart. A reusable function returns fitted values plus maximum, minimum, and average absolute deviations from the cu
Marks intraday swing tops and bottoms on the price chart with labels and short horizontal lines. After a morning session reset in the UTC-8 time zone, it tracks the running high and low, measures how far price has moved away from the extreme, and prints a labe
This overlay strategy is built around MACD inputs for a fast average, a slow average, and a signal line. Comments say the script keeps MACD values available and can draw a histogram and zero line in a separate pane, with an optional overlay on price. Settings
This script executes long and short trades directly on the price chart by combining signals from multiple indicators, including MACD, RSI, Stochastic RSI, Supertrend, and moving average crosses. It aggregates indicator conditions using weighted scores and ente
The Bilateral Filter indicator calculates an edge-preserving smoothed price line based on bilateral filtering principles. It combines spatial domain distances across past bars with range domain price amplitude differences using dual Gaussian weighting function
This strategy calculates a 20-period Relative Strength Index and plots the oscillator alongside a centerline at 50 in a separate pane. It enters long positions when the indicator crosses above 50 and enters short positions on downward crosses. The strategy rev
This indicator draws diagonal trendlines from confirmed swing points on the price chart. It detects pivot highs and pivot lows using a fixed 15-bar lookback on each side. When a new pivot confirms, it connects the last two highs with a solid red line and the l
This indicator calculates John Ehlers' Sine Wave cycle indicator and plots it in a separate pane. It detrends the chosen input price using a two-pole high-pass filter, smooths the result with a two-pole Super-Smoother filter, and resolves the cycle into in-pha
This indicator builds a momentum score from the rate of change of close, using a lookback that expands or contracts with ATR relative to its standard deviation. It divides that rate of change by price standard deviation, scales the result, and weights it by vo
This strategy tracks price channels by calculating the highest high and lowest low over a customizable lookback period. It executes stop orders to enter long positions above the upper channel boundary and short positions below the lower channel boundary. Posit
This indicator calculates and plots session ranges and key breakout levels for DAX futures directly on the price chart. It defines the overnight Globex session, the Frankfurt pre-market range, and the regular trading hours open using European timezone settings
This strategy trades Donchian channel breakouts with ATR-based risk. It allows long and short entries, sizes the first unit from a risk percent, and adds up to four fractional units as price moves in favor. An initial ATR stop moves to breakeven after a set pr
Diverlong E002 is a trading strategy that identifies momentum divergences using state changes in the Squeeze Momentum Indicator. It triggers long and short entries when price action diverges from momentum transition phases. Position exits are determined by Cur
This indicator plots Fibonacci retracement levels anchored to a confirmed structural reference swing and scores them based on historical internal price reactions. Instead of relying purely on geometric levels, it detects ATR-weighted micro-pivots inside the sw
This indicator identifies market displacement, structure breaks, and Fair Value Gaps (FVGs) directly on the main price chart. It highlights displacement candles using an average range lookback and multiplier factor, with optional structure break filtering usin
This indicator overlays two Bollinger Band sets from two timeframes on the price chart. It centers RSI on zero and classifies the second timeframe as up, sideways, or down. A buy appears when that trend is down or sideways and the first timeframe percent B is
The 2AM-Gold Swing Strategy+hist indicator plots Smart Money Concepts (SMC) elements for gold trading overlayed directly on the price chart. Starting at a user-defined session hour (default 2:00 AM UTC+2), it tracks liquidity sweeps, market structure shifts, o
This indicator plots volume-weighted deviation bands on the price chart. It computes a volume-weighted mean of the selected source over a lookback length, then a volume-weighted standard deviation or average deviation around that mean. Optional log-space mode
This indicator plots a higher-timeframe MACD breakout setup on the price chart and combines it with linear regression channels. It marks support and resistance zones from MACD histogram sensitivity, then filters them with the MACD zero line, a linear regressio
Fear + Greed Reversal Projection measures market sentiment extremes by comparing price source values against historical highs and lows using standard deviation bands. It calculates fear and greed zones through simple or weighted moving averages. When market co
This indicator plots signals on the price chart for crypto trading. It computes RSI-2, MACD crossover, Bollinger Band squeeze, volume spikes, Triple EMA alignment and Ichimoku Cloud to produce confluence signals. Each indicator can be toggled with adjustable w
This strategy tracks gold price trends using three exponential moving averages with lengths of 8, 21 and 55. It calculates ADX for trend strength filter and ATR for dynamic risk levels. The script enters long positions when the EMAs align bullishly with suffic
This indicator plots a standard MACD oscillator alongside an average true range line in a separate pane. It calculates the MACD line, signal line, and histogram using customizable fast, slow, and smoothing periods. It also computes a 13-period ATR plotted with
CSW Indicators combines eight technical analysis tools into a single overlay plotted directly on the main price chart. It features automated power support and resistance levels derived from pivot points, distance perimeter bands, a linear regression channel, R
This overlay strategy estimates trend with a selectable TEMA, Hull, or ALMA basis and optional higher-timeframe or Heikin Ashi sources. It plots a regression estimator with ATR near and far boundaries, can color bars by trend, and can show order blocks. Entrie
This indicator estimates realized volatility in a separate pane. It computes log returns from the current price and the previous daily close, then annualizes the standard deviation over short, medium, and long lookbacks. It also plots a quicker estimate that m
Calculates a Zero Lag Exponential Moving Average (ZLEMA) combined with Average True Range volatility bands to determine market trends. It plots the ZLEMA basis line, volatility bands, trend reversal labels, and entry signals directly on the price chart. Additi
Mirpapa_Lib_Structs is a Pine Script library designed to assist in detecting Smart Money Concepts (ICT) market structure shifts. It provides exported custom types and helper functions to manage trend state, track swing highs and swing lows, and verify structur
This strategy trades XAUUSD using a combination of Stochastic, RSI, and triple exponential moving averages paired with Fibonacci zones and M15 trigger conditions. It identifies confirmation trades and optional scalping setups based on overbought or oversold le
Alpy Vix is a strategy that calculates and plots the Williams Vix Fix indicator adapted for BIST stocks in a separate pane. It generates entry signals when the Vix Fix crosses upper bands or percentile ranges and meets filtered criteria based on price action s
This indicator builds a pairwise similarity matrix for a user-supplied list of assets, defaulting to major stock indices. It collects a rolling window of returns or volume-modified returns for each ticker, then applies a selected distance or similarity functio
This indicator plots an exponential moving average of a chosen price source on the price chart. It calculates the average with exponential smoothing and applies a warmup compensator so a value is available from the first bar instead of waiting through a long s
This strategy plots Renko open prices on the price chart based on the ATR length setting. It generates buy signals when Renko open crosses under close and sell signals when open crosses over close. The main setting adjusts ATR length used for Renko brick calcu
ZenLibrary is a custom Pine Script utility library providing standard helper functions for trading scripts. It includes calculations for quote currency decimal precision, market pip sizes, decimal truncation, pip conversions, percentage change over lookback pe
Trend Direction Helper calculates overall trend direction by combining customized range filters, Williams %R, and multi-period threshold logic to plot directional buy and sell labels. It also features optional percentage-reversal ZigZag lines, pivot-based supp
A strategy that builds on the JAT+BSM family: an AlphaTrend style core with MACD, three consolidation layers with volume profile, candlestick and macro pattern drawings, and a kinematic and Bayesian forecast with a feedback learning rate. Inputs include a stra
Session Stats highlights Asia, London, and New York trading sessions on the chart with distinct background colors while tracking performance metrics. It plots session high and low lines directly on price action and presents a summary table displaying average s
This indicator displays session context, market structure shifts, and session scoring in a separate pane using imported pre-generated profile data. It plots a context score column chart colored by bullish, neutral, or bearish thresholds, highlights active kill
Indicatorv6SMC / ICT / price actionSessions & time
A channel breakout strategy using the highest high and lowest low over an adjustable lookback. It enters long when the current bar sets a new high and price is above a 50-period EMA, and short when it sets a new low below that EMA. Positions close when price c
The script is an indicator in Pine Script version 6 that plots a constant value of 5. It assigns the value 5 to a local variable x and then plots x. The indicator draws its plot in a separate pane. There are no input settings, no trading signals, no stop loss,
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.