8,340 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 plots the active hours of major global trading sessions including Tokyo, Berlin, London, Sydney, and New York. It dynamically adjusts session times based on whether the instrument is classified as a traditional market or crypto. The script uses
TPCharts ADR calculates average daily, weekly, monthly and yearly ranges from a simple moving average of prior high-minus-low ranges. It projects each range into high and low levels, draws those levels as lines on the price chart, and labels the pip or tick di
Auto Trendlines calculates support and resistance lines by identifying confirmed pivot highs and lows over a specified lookback window. It validates trendline candidates using ATR-based touch tolerances, touch counts, line spans, and max violation thresholds.
Nexural QWAP calculates a volume-weighted average price combined with a cumulative volume delta order flow engine directly on the main price chart. It analyzes market structure by detecting volume absorption, liquidity sweeps, price-CVD divergence, stacked imb
Calculates an adaptive baseline using an EMA and constructs an ATR channel smoothed over a user-defined length. It combines channel breakout conditions with RSI and MACD momentum agreement to generate buy and sell signals. Signals are displayed on the main pri
This strategy calculates standard Ichimoku Cloud components, including the conversion line, base line, and displaced leading spans. It opens long positions when price resides above a bullish cloud and the conversion line crosses above the base line. Short entr
This indicator computes the dot product of two equal-length arrays and plots the result in a separate pane. One array is filled with the current close for every element, and the other is filled with the constant 1.618. A single integer input sets both lengths
This indicator tracks swing highs and swing lows to generate trend-following trailing stop levels on the price chart. When the closing price breaks above the previous swing high, the system establishes a bullish state using the recent swing low as a trailing s
TR Margin Pulse calculates and plots the ratio of marketwide margin calls to required margin using Takasbank data generated via MCP templates. Rendered in a separate pane, the line turns red when exceeding a predefined stress threshold and teal when below. A s
This indicator tracks and visualizes the initial balance range over customizable trading sessions directly on the price chart. It plots the high, low, and midpoint of the opening balance, with optional session extension levels, an anchored VWAP, and shaded hig
The Hybrid Volume Spread Analysis (HVSA) indicator calculates a volume-weighted momentum oscillator in a separate pane by multiplying moving averages of open and close prices by relative volume change. It evaluates price spread dynamics adjusted for volume cha
This strategy identifies bullish and bearish order blocks using an average true range impulse filter and plots corresponding boxes on the price chart. It enters positions on price retests of the order block zones, optionally filtered by an exponential moving a
This indicator recolors candlestick bodies directly on the main price chart based on relative trading volume. It calculates volume relative to a simple moving average (SMA) over a user-defined length. Up bars and down bars are assigned one of six distinct colo
This indicator overlays Bollinger Bands with two exponential moving averages directly on the price chart. It calculates standard Bollinger Bands using a selectable basis moving average type, length, and standard deviation multiplier. Alongside the bands, it co
EMA 9/26/52/200 calculates four exponential moving averages based on bar closing prices using fixed periods of 9, 26, 52, and 200. It plots all four lines directly on the main price chart in distinct yellow, purple, blue, and red colors to help identify short-
This strategy generates trading signals based on crossovers between daily session VWAP and a 4-hour 90-period Exponential Moving Average (EMA). When VWAP crosses above the 4-hour EMA, the strategy closes open short positions and enters a long trade with full e
This indicator draws up to three named forex sessions on the price chart, defaulting to London, New York and Tokyo in a chosen timezone. Each session can show a shaded history box, dashed borders, optional Fibonacci levels and an opening range. Users set sessi
This indicator implements a standard Moving Average Convergence Divergence oscillator plotted in a separate pane. It calculates fast and slow exponential moving averages of the closing price, derives the MACD line from their difference, and smooths it to creat
This indicator detects regular and hidden divergences between price pivots and RSI or Williams %R. Confirmed swing highs and lows, which wait a set number of bars on each side, are compared with oscillator extremes. Regular divergences mark possible reversals,
This indicator draws a two-column dashboard table on the price chart for up to three user-selected symbols, defaulting to EURUSD, GBPUSD, and USDJPY. For each symbol it requests four-hour highs, lows, and closes from the two prior candles and classifies a high
This strategy example builds TradersPost webhook JSON messages and plots them as colored labels on the price chart. At fixed clock hours it shows a long with a trailing-stop percent, an add, a cancel, an exit, a short with a trailing-stop price, a flatten, and
TheStrat Suite classifies real OHLC bars with Rob Smith's TheStrat method and draws labels, targets, and stop levels on the price chart. It detects inside bars, hammers, shooters, outside bars, and Failed 2 range reclaims, then shows magnitude and exhaustion t
This indicator constructs a synthetic trading pair from two user-selected instruments using division or multiplication. It retrieves multi-asset price data and optionally applies a forward pricing model to the second leg using financing rates, storage costs, y
This indicator calculates a simple moving average as the arithmetic mean of a chosen price source over a set length. A second averaging pass can smooth the result, and an offset shifts the calculation window. An indicator timeframe input selects the data timef
The Linear Regression Channel indicator calculates the middle line via linear regression on a user-selected source over a configurable length. It plots upper and lower channel bands using a deviation multiplier and draws these lines directly on the price chart
This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w
AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th
The indicator calculates and plots up to five multi-timeframe moving average bands directly on the price chart. Each band is constructed from moving averages computed across user-defined timeframes, such as current chart, 5-minute, 30-minute, 4-hour, and daily
This strategy calculates the Relative Strength Index of the close and is configured for a separate pane. It opens a long position when RSI is below the oversold level and a short position when RSI is above the overbought level. Position size defaults to ten pe
This indicator plots a Chandelier Exit trailing stop on the price chart. It sets a long stop from the highest high over the ATR length minus an ATR multiple, and a short stop from the lowest low plus that multiple. Each stop only moves in the favorable directi
This overlay strategy is framed as an ICT and smart-money confluence tool. Its settings filter trades with a higher-timeframe bias, an optional trend EMA, swing structure, equal highs and lows, order blocks, and fair value gaps. Confirmation can require a CRT
This strategy overlays directly on the price chart to identify pullback buying opportunities during established bullish moves. It checks whether price gained by a specified percentage over an earlier window and subsequently pulled back by a minimum threshold o
This strategy evaluates order flow by combining volume dynamics and price deviation relative to the Volume Weighted Average Price (VWAP). It enters long trades when trading volume exceeds a relative threshold, price moves significantly above VWAP, net volume p
Liquidity Sweep Reversal Strategy [Lab] identifies potential price reversals following liquidity sweeps of previous high or low levels. A bullish setup occurs when price sweeps below a prior low and closes back inside, while a bearish setup occurs when price s
This indicator detects a bullish long lower shadow when the lower wick exceeds 75 percent of the candle range. It plots an LLS label below the bar, tints the background blue, and fires an alert titled new pattern detected. The only input changes the bullish la
UT Bot Alerts combines an ATR-based trailing stop mechanism with selectable channel bands, including Bollinger Bands, Keltner Channels, and standard or pivot-based Donchian Channels. Signals are driven by crossovers between price and the adaptive ATR trailing
This indicator plots multiple custom moving averages on the price chart. It draws EMA lines of periods 9, 14, 34 and 55 using daily resolution alongside WMA lines of periods 9, 15 and 18 using weekly resolution. Users adjust the source (default close), length
This indicator calculates rolling quartiles and interquartile ranges (IQR) across a customizable lookback window, plotting a statistical box plot offset to the right of the chart. It identifies the 25th, 50th (median), and 75th percentiles along with standard
This indicator calculates the percentage price gap between the current bar open and the previous bar close on the price chart. When the absolute gap exceeds a hardcoded threshold of 0.2 percent within the past 30 days, it draws an extended horizontal line at t
Calculates Bollinger Bands, RSI, and Stochastic to identify potential reversal opportunities directly on the price chart. It plots buy signals when the bar low is within a set distance of the lower Bollinger Band while both RSI and Stochastic register oversold
Calculates an On-Balance Volume (OBV) oscillator by subtracting an Exponential Moving Average of the cumulative OBV from its current value. It plots the resulting oscillator around a zero line in a separate pane, coloring the line yellow when above zero and re
Displays a statistical summary table pinned to the top right of the price chart. It calculates key metrics including ATR percentage relative to price, high-low range percentage over a configurable bar count, relative volume compared to its simple moving averag
Dip Bulucu-2 combines a WaveTrend oscillator and Williams Vix Fix to identify potential market bottoms and trend reversals. It calculates Williams Vix Fix based on standard deviation Bollinger Bands and percentile ranges, highlighting exhaustion bars in red hi
This indicator plots five exponential moving averages on the price chart and watches for short-term EMA and MACD crosses. A buy marker appears when an aligned EMA 3 and 13 golden cross and a MACD golden cross occur within three bars. A sell marker uses the mat
Alert System with Trading Dashboard calculates two exponential moving averages on the chart while tracking fast and slow EMA crossover states across four configurable timeframes. It displays a visual table on the price chart showing the directional bias for ea
This indicator demonstrates debugging visualization patterns for Pine Script. It plots value tracking with mean, min, and max reference lines, condition markers using shapes and arrows, historical comparisons with standard deviation bands, multi-series overlay
Stella's Bollinger Squeeze plots Bollinger Bands and compares them with a Keltner Channel on the price chart. It marks a squeeze when the Bollinger Bands sit inside the Keltner Channel and a gray background when they sit outside. After the squeeze ends, it mar
This indicator identifies key market structure and pivot points directly on the price chart. It calculates Higher Highs, Lower Highs, Higher Lows, and Lower Lows using configurable left and right pivot evaluation lengths. Users can toggle pivot labels, customi
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.