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 Pine Script indicator demonstrates the use of tuples in Pine Script v5. It defines a function that generates a tuple containing the values 1, 2, and 3. The script then accesses the elements of the tuple and plots the first value on the chart. Additionally
This indicator builds a Know Sure Thing oscillator from four rate-of-change readings of close, each smoothed with a custom EMA and combined with weights of one through four. It then draws a step line in a separate pane that updates only when the oscillator mov
A Pine v4 oscillator in a separate pane based on the Coppock curve. It sums two rate-of-change values, smooths the result with a Hull moving average, then draws a smoothed line coloured green or red and filled as an area. A zero line and a 21-bar average of th
This indicator calculates multi-layered Bollinger Bands based on a simple moving average baseline and standard deviation offsets. It projects 15 upper bands and 15 lower bands spaced at 0.2 standard deviation increments, spanning from 0.2 up to 3.0 standard de
A two-line moving average cloud drawn on the price chart. Each line can use one of eleven types, including RMA, SMA, EMA, WMA, VWMA, SMMA, TMA, Hull, DEMA, TEMA and VWAP, with their own lengths, 30 and 74 by default. The space between the lines is filled green
A Pine v4 strategy that plots a session VWAP with an upper and lower band offset by a percentage of the high and low. It opens a long when a bar opens above the upper band, optionally only on green candles, and a short below the lower band on red candles, clos
The Bullish/Bearish Candle Series Distribution indicator calculates the length of the current streak of consecutive bullish or bearish candles based on user-selected mode. It tracks streak lengths from 2 to 59 and plots a histogram in a separate pane showing t
This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver
This indicator calculates the Directional Movement Index (DMI) and Average Directional Index (ADX) using configurable length and smoothing settings. Plotted in a separate pane, the ADX line changes color dynamically to green when DI+ exceeds DI- and red when D
AKE Tracker overlays historical ARK Invest buying and selling activity directly onto the price chart for the target stock. It plots labels indicating buy or sell events alongside the count of ARK ETFs participating on specific dates. Users can filter trade rec
Calculates dynamic modeling values by applying a mathematical logistic differential equation to price change over a specified lookback length. It measures price momentum relative to the recent high-low price range. The script plots positive and negative logist
ESU2023-10M - V1 is an intraday trend-reversal strategy designed for index futures contracts on the price chart. It calculates a 3-period moving average of candle highs and lows alongside specific three-bar price action patterns to detect short-term swing high
This overlay indicator decomposes a chosen index move into approximate contributions from its largest members. It tracks NDX, SPX, DJIA, or RUT using hard-coded weights and a table of member percentage changes versus the prior daily close, the regular-hours op
LeMan Trend Indicator calculates buy and sell values using normalized differences between current and highest/lowest highs and lows over adjustable lookback periods. It plots a zero line signal in a separate pane and normalized buy and sell lines in colors. Ma
This strategy runs on the price chart and enters long when a fast simple moving average crosses above a slow one, and short on the opposite cross, while closing the other side. Entries also need ATR above a filter, a pullback check, a minimum candle-body chang
This indicator plots a Baxter-King symmetric band-pass filter in a separate pane. It estimates the cyclical component of a source series for periods between a minimum and a maximum bar length, using ideal band-pass weights shifted so they sum to zero and remov
This indicator calculates a 20-period RSI and plots it in a separate pane with a horizontal line at 50. It marks an upward cross of 50 as a long and a downward cross as a short, using small characters on the oscillator. Alerts fire only for the directions the
This indicator plots WaveTrend Oscillator values along with MFI and RSI areas on the chart. Colored circles and dots indicate buy and sell signals at wave crossings, overbought and oversold levels. Purple triangles mark regular and hidden divergences. It draws
Trend Analysis plots a 20-period and a 50-period exponential moving average on the price chart. It marks bars whose close is above the faster average with a green square below the bar and marks other bars with a red square above the bar. It also calculates a 1
Double Weighted Moving Average (DWMA) calculates a double-smoothed moving average by applying two consecutive weighted moving average passes to a chosen price source. Implemented with circular array buffers and running state accumulators, it achieves O(1) time
The CISD with Fib/Range Extensions and Stats indicator tracks Change in State of Delivery (CISD) level breakouts on the price chart. It detects pullback structures filtered by ATR and volume conditions, then projects future target levels using customizable Fib
Bollinger Bands Width plots the width of Bollinger Bands on a separate pane. It calculates the ratio of the band width using the formula of upper band minus lower band divided by the basis. The main settings let users change the length of the simple moving ave
Zen MIG Reversal is a price action overlay indicator that identifies potential reversal setups using three-bar candlestick sequences, gap rules, and moving average filters. It checks for consecutive directional bars combined with either Al Brooks micro gaps or
Vector Candles is an overlay indicator that recolors price candles using PVSRA volume rules taken from the Traders Reality concept. It compares each bar's volume with the average of the previous ten bars and also checks the product of spread and volume against
Implements a Donchian breakout trend-following strategy filtered by ADX trend strength. It initiates long or short positions when price breaks Donchian channel extremes and ADX exceeds a specified threshold. Positions are sized using ATR volatility with Turtle
Divergenced L002 is a trading strategy that identifies divergence setups by tracking state changes in the Squeeze Momentum Indicator relative to price extremes. It enters trades when price and momentum diverge across consecutive momentum color transitions. Pos
The indicator scores whether a counter-move against the dominant structure is maturing and whether price has started turning back. It plots a composite score in a separate pane from weighted context, correction maturity, and exhaustion, scaled by trigger and a
This indicator computes an adaptive Relative Strength Index whose length dynamically adjusts based on cycle correlation. It measures the Pearson correlation between price and synthetic sine and cosine waveforms at a target cycle period (and optional second har
PaperHands Strategy is an intraday trading system displayed in a separate pane, driven by momentum signals such as Laguerre RSI. It executes long and short entries, re-entries, and signal-based exits with risk management rules. Position exits support fixed-tic
This indicator plots volume columns alongside an exponential moving average line of volume in a separate pane. It compares current bar volume against its 13-period average by default. When volume exceeds the exponential moving average, columns are colored gree
The MACD % indicator calculates a percentage-normalized Moving Average Convergence Divergence oscillator plotted in a separate pane. Instead of displaying the standard absolute difference between fast and slow moving averages, it computes the spread as a perce
Wick Rejection S/R Strategy v3 identifies key support and resistance zones on the price chart using candle wick rejection percentages and liquidity sweeps. It evaluates market structure changes, zone retests, and sweeps to assign confidence scores to trading s
This research diagnostic indicator reconstructs fixed-range volume profiles on the main price chart using lower-timeframe bar data. It approximates TradingView native fixed-range volume profiles over a specified time range using configurable source timeframes
Calculates a density-weighted central price level over a user-defined lookback window and plots it directly on the main chart. For each bar in the lookback period, it computes how frequently historical high-low ranges overlap that bar's price, using this densi
Diego's Strategy draws confirmed swing pivots on the price chart and connects them with dashed lines when the price move exceeds an ATR-based deviation threshold. It can plot Fibonacci retracement levels and use a chosen zone for entries, with separate Fibonac
This short-only trading strategy combines exponential moving averages across daily timeframes with Bollinger Band squeeze logic. It evaluates long-term trend conditions or volatility squeeze setups to trigger short entries. Position management includes customi
This overlay indicator combines up to six optional signals and scores how many of them agree. It checks RSI-2 crosses of 30 and 70, MACD line crosses, Bollinger squeeze breakouts, volume spikes, triple EMA alignment, and price relative to the Ichimoku cloud. E
The Fakeout Filter indicator calculates a four-layer signal quality score ranging from 0 to 4 to evaluate trade setups. It assesses four conditions: volume expansion above a moving average multiple, alignment with a higher timeframe EMA trend, price move excee
This indicator detects swing highs and lows with symmetric pivot lengths and draws horizontal support and resistance lines on the price chart. New pivots that fall within a user-set percentage of ATR of an existing level are merged into one zone. Resistance us
This overlay indicator plots Parabolic SAR circles on the price chart and marks direction flips with optional start-point circles and Buy or Sell labels. Direction is long when SAR is below close and short when it is above. Alerts fire on a direction change an
jash_GGMA_Granville plots five exponential moving averages on the price chart using Fibonacci lengths 3, 13, 34, 55 and 144. It marks a reset when the shortest average crosses the 55-period average and the close is on the matching side of the short average. Co
This indicator detects streaks of consecutive candles on a price chart and plots Fibonacci retracement levels based on their high-low range. Users set the streak length (default 3) to identify swing highs and lows. It calculates and displays customizable level
ALGOX is a trend-following strategy combining Heikin-Ashi price feeds, ATR-based Supertrend bands, moving average ribbons, and RSI filters. It generates long and short entries when price aligns across multi-timeframe moving averages and RSI thresholds, managin
This indicator calculates and visualizes seasonal performance metrics in a separate pane. It queries higher-timeframe monthly closes to compute the average return of the current calendar month across a user-defined lookback window, alongside the year-to-date a
Volume Delta Histogram calculates real volume delta (buy volume minus sell volume) from footprint data and displays it as a histogram in a separate pane. Positive delta columns represent buy dominance, while negative delta columns represent sell dominance. Use
MasterAlgo is an overlay indicator that combines Ichimoku Kinko Hyo, session range highlights, and volume-based candle coloring into a single tool. It plots standard Ichimoku components—including Tenkan-Sen, Kijun-Sen, Chikou Span, and Kumo Cloud—and highlight
This library creates and tracks horizontal lines on the chart. It supports two breach modes: price and close. When a line is breached, it increments a break count up to a maximum value and can finalize the line with a close color. The data structure holds line
This strategy combines Exponential Moving Averages (EMA 20, 50, 200), Stochastic, RSI, and ATR to identify trend alignment and scalping opportunities for gold (XAUUSD). It relies on M15 overbought and oversold levels alongside candle rejection wicks for signal
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.