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 strategy that implements the Parabolic SAR calculation in code, with start, increment and maximum acceleration settings. It plots the current and next bar SAR values as crosses on the price chart. On each confirmed bar it places a stop order at the next SAR
An indicator component that computes a slow stochastic oscillator with 14, 3 and 3 settings and checks it for regular bullish and bearish divergence against price pivots. The stochastic plot and the divergence labels are commented out in the visible code, so l
A Pine v4 strategy that plots a 21-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
This indicator counts down to a fixed Litecoin halving timestamp in August 2019, using Greenwich Mean Time. It subtracts the current time from that stamp and formats the remaining days, hours, minutes, and seconds. The day, hour, and minute of the target are u
2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the
AYLA-tracker visualizes ARK Invest trade activities for AYLA directly on the price chart. It plots historical execution labels at specific timestamps, indicating dates when ARK Invest bought or sold shares of the stock. The indicator does not compute technical
MathComplexOperator is a Pine Script v5 library of utility functions for pseudo complex numbers stored as two-element float arrays of real and imaginary parts. It computes the conjugate by flipping the imaginary sign, adds two complex values, and subtracts one
Williams Strategy - Alert is a Pine Script v5 strategy that plots three-bar simple moving averages of high and low prices directly on the price chart. It detects upward and downward trend reversals by comparing the current bar's low and high with those from th
This overlay indicator estimates position size from account equity, a per-trade risk percentage, and a chosen stop distance. Stops can use ATR, a percent of price, fixed points, or a swing high or low. It derives stop and optional take-profit prices from a ris
This strategy plots a base Jurik moving average and the average of three longer Jurik averages on the price chart. Long and short signals come from crossovers of those lines, or, when pivoting is enabled, from the averaged line stopping a fall or a rise over a
This strategy calculates 20-period and 60-period simple moving averages (SMAs) plotted directly on the price chart. It executes long entries when the closing price crosses above either SMA, provided the bar is on or after the configured backtest start date. Po
Calculates the statistical cointegration between the current chart instrument and a user-selected secondary ticker using the Engle-Granger method. It evaluates the stationarity of the regression residuals and plots the Augmented Dickey-Fuller test statistic in
This indicator demonstrates the Pine Script array.reverse function. It creates an empty float array, appends the values zero, one, and two, and on the last bar reverses that array in place. A label then displays the reversed contents next to the last bar. The
Calculates the Hilbert Transform In-Phase and Quadrature components of a price series to measure underlying cyclic behavior. It processes the input source through smoothing, detrending, and Hilbert phase calculation steps to generate two orthogonal component l
NQ Hourly Retracement Levels highlights NY, London, and Asia trading sessions directly on the price chart. It plots hourly open prices and midpoint retracement levels at the New York session open, filtering levels based on a configurable minimum hit rate thres
This indicator plots a double exponential moving average on the price chart. It first smooths the chosen source with an exponential moving average, then smooths that result again with the same length, and combines the two so the line responds faster than a sin
This strategy enters long or short when price breaks a Donchian channel and RSI confirms the same direction. It sizes each unit from a risk percent of equity and can add units after a set ATR advance, up to a unit limit. An initial ATR stop and a trailing stop
This overlay indicator is a reusable template for Ruckard indicators meant to work with Zignaly. The implemented logic sections are empty, so it does not plot signals or manage trades. It exposes a higher-timeframe trend filter built from a fast and a slow mov
The Market Tradability Engine calculates multi-factor tradability, balance, compression, and direction scores to evaluate market regime quality. It classifies market conditions into eight distinct states, including Balance, Compression, Ready, Breakout, Trend,
This indicator approximates cumulative volume delta from each bar's volume and candle body, then detrends and normalizes both price and CVD so they can be compared in a separate pane. It plots the two smoothed series and an optional histogram of their differen
This Pine Script v5 indicator is an SMC trading engine that plots order blocks, fair value gaps, break of structure markers, market structure shifts, and Fibonacci retracements on the price chart. It supports customizable higher and lower timeframes along with
This short-only trading strategy combines the Relative Strength Index (RSI), Slow Stochastic, and MACD to identify bearish setup entries. A short position triggers when the RSI drops below 50, the Slow Stochastic crosses down while overbought, and the MACD lin
This indicator computes a momentum value via linear regression on the difference between close price and a mid-value average that blends highest-lowest range and high-close average over the Keltner Channel length. It overlays Bollinger Bands and Keltner Channe
This indicator tracks the low of day and high of day during the specified RTH session hours in the New York timezone. It calculates the high at the current low of day (lod_h) and the low at the current high of day (hod_l). Horizontal lines are drawn at these l
This Pine Script indicator plots Smart Money Concepts market structure directly on the price chart. It identifies swing highs and lows, internal market structures, Break of Structure events, Change of Character shifts, and EQH/EQL levels. Breaker blocs are hig
This Pine Script library exports a liquidity line detection function designed for Smart Money Concepts analysis. It identifies static and dynamic pivot highs and lows over customizable lookback periods, normalizing price differences between consecutive swing p
This script calculates a 1-hour 24-period Volume Weighted Moving Average (VWMA) and plots it directly on the price chart with customizable upper and lower percentage offset bands. It combines Williams Fractals for local swing highs and lows with a 14-period Re
Calculates and projects Bitcoin price trajectory using a power law model displayed as a clock layout in a separate pane. It maps historical price movements, average power law curves, and Bitcoin halving cycles over time. Users can toggle spiral visualization m
This indicator calculates and plots the Least Squares Moving Average (LSMA) directly on the price chart. It fits a linear regression line over a user-selected lookback period and source series to project the prevailing price trend. By using an optimized circul
This strategy enters multi-order long positions during volatility expansions when price breaks above the upper Bollinger Band. Entries require price alignment above Parabolic SAR, a 100 EMA, and a 200 EMA trend filter, alongside mid-range RSI and elevated ATR.
This indicator identifies bullish and bearish engulfing candlestick patterns filtered by fractal swing points and RSI momentum levels. It detects swing highs and lows over a configurable lookback period, requiring bullish signals to coincide with a swing low a
This market structure strategy identifies trading opportunities using Change of Character (CHoCH) gates, liquidity sweeps, and structural breaks. It combines exponential moving averages, RSI, and ATR volatility filters, with optional higher-timeframe trend che
A strategy that combines the Momentum and Rate of Change indicators, shown in a separate pane with a zero line. It enters long when momentum crosses above zero while rate of change is positive, and short when momentum crosses below zero while rate of change is
P_fmt_comment_before_version is a basic test script created to demonstrate and verify Pine Script formatting and parsing capabilities. The indicator calculates and plots the closing price of the active instrument in a separate chart pane. It contains no config
An overlay indicator that classifies the market into regimes such as trend, chop and squeeze using ADX, range efficiency, relative volume, ATR expansion and VWAP slope. It also measures how far price is from VWAP and an EMA to flag rich, cheap or extreme readi
The script is a multi-symbol crypto indicator that computes trading signals across twenty major pairs including BTCUSDT, ETHUSDT and others. It evaluates four core methods for signals: trend based on price levels, momentum using rate of change, volatility via
This indicator projects dynamic logarithmic resonance levels on the main price chart using mathematical constants including Phi, Pi, and Euler's number. It maintains an internal tracking system across historical price bars to evaluate market interactions throu
An overlay indicator that builds a zero-lag trailing line from an ATR multiple and flips between buy and sell labels when price breaks it for a set number of closes. Gates for choppiness, baseline slope, volatility expansion, efficiency and ADX can block weak
Overlay indicator that extracts six signal types from a larger signal study: cluster, E3 and First Two momentum-bar patterns, each in a bullish and bearish version, plus combined any-bull and any-bear markers. Visibility, alert switches and marker colours are
A strategy that trades liquidity sweeps confirmed by order flow. It takes the highest high and lowest low of a prior window of 10, 20 or 50 bars, depending on a rigor setting. A bullish sweep is a low below the prior low that closes back above it with positive
A Pine v4 indicator that shades a trading session window on the chart, with an earlier analysis start and a later session start and end, all set in a chosen time zone that defaults to Chicago. Individual weekdays can be switched on or off and the label and col
A Pine Script v5 indicator in a separate pane, version A3.0 of a Hurst spectral oscillator. It fetches a selectable source, hl2 by default, with lookahead on and runs it through bandpass filters for cycles from 1 day to 18 years. Bandwidth and period are set f
This indicator calculates regular and hidden divergences across multiple momentum and volume oscillators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, and MFI, as well as an optional external input. It scans for pivot highs and lows using
Shows a table of percentage price changes for a list of symbols over a list of periods, such as one week, one to twelve months, year to date and five years. Both lists are text inputs, with the chart symbol optionally included. Cells are coloured green or red
An indicator component that calculates 20-period Bollinger Bands with a 2.0 deviation multiplier and plots the basis, upper and lower bands with a shaded fill. It also converts band contact into a weighted score: a score when the close is below the lower band
A Pine v4 strategy that plots a 23-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
Mean Absolute Deviation Bands is a volatility indicator that plots bands around a moving average basis line calculated from a user-selected source. It draws upper and lower bands using a multiplier on the mean absolute deviation, with the background between th
Flawless Victory Strategy is a mean-reversion overlay that combines Bollinger Bands, RSI, and Money Flow Index (MFI) to identify trade entries and exits. The script provides three preset configuration modes: Version 1 executes signals without target exits, whi
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.