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 scans the chart for 101 distinct patterns, including single-bar, two-bar, and multi-bar candlestick patterns, classic chart patterns, and harmonic patterns. It features a complex situation context engine for confluence detection and displays a B
Calculates support and resistance breakouts by combining key level testing with smart flow filters and Average Trade Size (ATS) proxy monitoring. The indicator tracks price tests against consolidation ranges, lower timeframe volume, order flow delta, and volum
The Map Regime Tracker strategy evaluates market structure using a 20-period exponential moving average and a 50-period simple moving average. It stores regime thresholds inside a map object initialized on the first bar. When the fast EMA is above the slow SMA
This indicator is a Pine Script v6 fixture that calls the built-in simple moving average with a length of ten and plots the result in a separate pane. The first argument is the string close rather than a price series, so the call does not match the expected ar
A deliberately minimal test strategy that goes long every fixed number of bars while flat, with no signal logic. Each trade uses a plain ATR-based stop and an ATR-based target, with the bar spacing and both ATR multiples adjustable. It exists to check that ord
DEPV2 Debug S21 is a multi-symbol crypto research and evaluation tool plotted in a separate pane. It monitors up to 20 Binance cryptocurrency perpetual pairs by analyzing price action across four distinct signal engines: trend, momentum, volatility, and volume
Williams Fractals identifies multi-bar pivot highs and pivot lows based on Bill Williams' classic fractal logic. It evaluates price action across a user-defined period to detect local high and low turning points, plotting visual markers directly above or below
A trend flip indicator on the price chart with BUY and SELL labels. A zero-lag trail is built from ATR and an optional volume-weighted source, and it widens in choppy conditions. Flips need to pass gates for choppiness, baseline slope, volatility expansion, ef
A utility indicator that counts combo hits across recent bars in line with a one-bar-one-hit rule. It takes plotted matrix, fair value gap and pullback-and-jump signals from another indicator through source inputs, collapses matrix and gap signals on the same
This strategy samples RSI momentum across a customizable list of federated ticker symbols to build a consensus ratio. When the proportion of assets with RSI above 50 meets or exceeds a selected rigor threshold (Loose, Standard, or Sovereign), it enters a long
An indicator that looks for W and M reversal shapes in price, OBV and Williams %R by default, with optional MFI, RSI and directional movement, all sharing one maximum width and offset setting. A Fibonacci retracement zone over a 200-bar lookback can be require
A Pine Script v5 indicator in a separate pane that plots cycle waves from Hurst-style bandpass filters applied to the hl2 price. A single bandwidth setting is shared by all filters, and each cycle has its own period, from 5 days through weeks and months up to
This overlay indicator identifies regular and hidden divergences across multiple momentum and volume oscillators, including RSI, MACD, Stochastic, CCI, Momentum, OBV, VWmacd, CMF, and MFI. Divergence signals are determined using customizable pivot point period
Shows futures open interest in a separate pane by requesting the matching open interest series for the chart's symbol. For crypto symbols it draws open interest as candles; for other symbols it draws a step line coloured by whether the latest close rose. On in
A separate-pane indicator that is one component of a weighted scoring system. It plots a 14-period RSI with 30, 50 and 70 reference lines, and detects regular bullish and bearish divergence between price and RSI pivots, labelling them on the pane. Divergence i
A simple Pine v4 strategy that builds a MACD from 12 and 26 bar simple moving averages with a four-bar signal line. It goes long whenever MACD is above the signal and short whenever it is below, closing the opposite side, so it flips direction on every crossov
The Kaufman Adaptive Moving Average (KAMA) calculates a moving average that adjusts its sensitivity based on market volatility and noise. It computes an Efficiency Ratio by comparing price directional change over a specified period to overall market volatility
This indicator plots a TTM Squeeze momentum oscillator in a separate pane. It compares a Bollinger Band offset to a Keltner Channel offset and marks the zero line white when the difference is non-negative and black when the bands are inside the channel. A line
ATI Tracker visualizes historical buy and sell transactions made by ARK Invest funds directly on stock price charts. It places color-coded labels on transaction dates to display whether ARK ETFs accumulated or distributed shares, including indicators for how m
This library provides core functions to handle complex numbers in Pine Script v5. Complex numbers are represented as float arrays containing real and imaginary parts. Functions set the real or imaginary component of a number, create new complex numbers from gi
This indicator analyzes short-term price action on index futures and options charts by applying Rational Quadratic kernel smoothing to detect sideways consolidation ranges and potential breakouts. It processes pivot highs and lows over customizable loopback pe
This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und
Calculates and plots a dynamic trend line on the price chart using Commodity Channel Index (CCI) and Average True Range (ATR). The trend direction is established by whether CCI is above or below zero, which controls an ATR-based trailing line. Generates buy an
Andean Scalping is a Pine Script v5 strategy template designed for backtesting trading signals. It features session and date-range filtering, directional trade toggles for long and short entries, and optional trend filtering tools including higher-timeframe EM
This indicator calculates a second-order Chebyshev Type II lowpass filter and plots the result on the price chart. Length sets the cutoff period, and stopband attenuation in decibels controls how strongly higher-frequency components are reduced. The source inp
This educational indicator demonstrates the usage of array concatenation functions in Pine Script v4. It initializes two separate floating-point arrays and populates them with numeric values on every bar. On the final bar of the chart, it creates text labels t
This indicator computes the dominant cycle period using Ehlers homodyne discriminator. It applies exponential smoothing with warmup compensation for stable initialization and FIR/IIR filtering stable during market volatility. The smoothed period estimate is pl
This multi-timeframe indicator calculates an adaptive trailing stop line based on Bollinger Bands evaluated on a user-selected resolution. It calculates standard deviation and simple moving average bands from the higher timeframe data, tracking trend shifts wh
This indicator detects and highlights the Bearish Doji Star candlestick reversal pattern directly on the price chart. It checks for an uptrend using simple moving average rules, followed by a long bullish candle and a gapping doji candle. When identified, the
This strategy enters long or short on a Donchian channel break and sizes each unit by risking a percentage of equity against an ATR stop. It adds units as price advances by a fraction of ATR, up to a set maximum. A three-tier time exit uses RSI: fading momentu
This price-chart strategy opens a position opposite the direction of a newly filled gap, on the idea that price continues the prevailing trend after the gap is filled. Stop loss can be sized from the gap distance and is on by default; take profit, trailing tak
Market State Engine classifies the current market into nine states including balance, compression, bull and bear expansion, pullback, exhaustion, and transition. It computes orthogonal axes for structural regime, energy phase, value location relative to adapti
The Bull/Bear Volume Diagram indicator calculates and displays directional volume in a separate pane below the price chart. It categorizes volume based on candle direction, plotting positive histogram columns for bullish bars and negative histogram columns for
Apex Protocol Assistant is a Smart Money Concepts overlay indicator designed for session-based market structure analysis. It highlights the Asian range, London and New York killzones, and key daily and weekly price levels. The indicator evaluates higher timefr
Indicatorv5SMC / ICT / price actionSessions & time
This strategy executes short trades based on a confluence of three indicators: Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and Bollinger Bands standard deviation metrics. It enters short positions when a bearish bar coincides w
The strategy identifies mean reversion opportunities using the RSI indicator. It calculates RSI with customizable length and generates long entries on RSI crossover above the oversold level and short entries on crossover below the overbought level. Entries are
This indicator plots a MACD line, a signal line, and a histogram in a separate pane. It calculates the oscillator as the difference between a fast and a slow moving average of a chosen source, then smooths that result for the signal. Each average can be an SMA
SAIYAN OCC Strategy is a price-chart strategy that builds a short moving average of open and close prices using TEMA, Hull, or ALMA and colours bars by trend. It can take long, short, or both directions, optionally from Heikin Ashi closes or a multiplied alter
This overlay indicator marks ICT-style Unicorn setups on the price chart using fair value gaps and breaker blocks. Swing length and FVG sensitivity control how those zones are found, and an optional retracement can be required before a setup is confirmed. It c
This strategy plots a WaveTrend oscillator and a squeeze-momentum histogram in a separate pane. It builds WaveTrend from a typical-price EMA channel, marks overbought and oversold bands, and flags WaveTrend crosses. Bollinger Bands and Keltner Channels detect
This overlay indicator draws an angled volume profile on the price chart between a user-selected start time, start price and end price. Coordinate inputs use chart confirmation so the endpoints are placed directly on the chart. A step multiplier sets how finel
Jurik Volatility calculates an adaptive measure of market volatility based on price distance relative to dynamic upper and lower bands. It normalizes volatility variations over time using adaptive smoothing constants and power transformations, allowing it to a
This strategy plots a volatility-adjusted SuperTrend on the price chart using a Vegas Channel (SMA plus standard deviation) to dynamically scale the SuperTrend multiplier. It identifies trend direction with a long entry when price crosses above the lower Super
This educational indicator demonstrates how to use the plotshape function to display visual markers on the chart. It evaluates whether the current close is above the previous bar's high (higher close) or below it (lower close). Green upward triangles and HC la
A strategy that scores market conditions with many weighted components: head and shoulders and double top or bottom pivots, a regression channel with an R-squared filter, polynomial slope, a cosh-based term, skew, divergence, volume flow, VWAP and an ADX plus
Calculates market structure breaks by identifying Change-of-Character (ChoCH) and Break-of-Structure (BOS) levels on the price chart using swing high and swing low pivots. It features an integrated volume filter requiring breakout volume to exceed an SMA multi
This strategy computes a 2x2 covariance matrix from short-term differences in close-open and high-low ranges. It extracts the largest eigenvalue of the matrix as a volatility measure and compares it to its own simple moving average. When the largest eigenvalue
P_err_wrong_arity is a minimal Pine Script v6 indicator written as a test fixture for compiler parsing and arity validation. It attempts to call the built-in simple moving average function using only the close price without providing the required length argume
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.