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 detects bullish and bearish fair value gaps and liquidity imbalances on the chart, with optional higher-timeframe tracking. It plots imbalance zones directly on the price chart using colored boxes and tracks zone age, fill percentage, and breake
This indicator draws support and resistance supply and demand zones on the price chart. It classifies zones as weak, untested, verified, proven, or broken, and can merge overlapping zones, extend them forward, and label them with retest counts. The ATR factor
This library calculates TheStrat price action states, classifying candles by directional break structure, close relative to open, and rejected break conditions. It draws demo bar labels directly on the price chart using standard or glyph notation. User inputs
This indicator calculates and plots a customizable weighted moving average directly on the price chart. Users can configure the anchor period across fixed lengths, daily sessions, cumulative bars, or custom session intervals. Weighting options allow adjustment
The Triangular Moving Average (TMA) indicator calculates a double-smoothed moving average by applying a simple moving average to an existing simple moving average. It plots the resulting line directly on the price chart with dynamic coloring to indicate whethe
Calculates a 14-period Relative Strength Index and detects regular divergences between price and RSI pivot points. It scans across multiple previous pivot vertices stored in historical arrays. Bullish divergences require RSI below 40 at a pivot low, while bear
This strategy seeks long entries by combining moving average trend filters with VMC Cipher momentum and money flow indicators. It identifies bullish trend alignment when price trades above the 200 EMA and records recent pullbacks to the 50 EMA, confirmed by po
This indicator generates buy and sell signals on the price chart by combining RSI, MACD, Bollinger Bands, EMA crossovers, Stochastic, ADX, VWAP, volume confirmation and momentum oscillators. A non-repainting mode option is available along with ATR-based TP and
Relative Structure Strength Index is an oscillator indicator that plots in a separate pane. It calculates the Relative Strength Index (RSI) using bar structure power derived from an external library, then smooths the resulting values with a customizable moving
This indicator calculates fast and slow exponential moving averages (EMAs) and plots them directly on the price chart. It detects bullish crossovers and bearish crossunders, marking them with colored triangles above or below price bars. The background dynamica
This indicator is a starter template that plots a simple moving average of a user-selected source over a chosen length. It draws the average as a single line on the price chart. The length input sets the lookback, and the source input selects which price serie
This indicator plots an anchored volume-weighted average price on the price chart. It resets the VWAP at a chosen anchor such as the session, week, month, quarter, year, or corporate events including earnings, dividends, and splits. Optional bands sit above an
SOKE OVASI is an overlay indicator that combines an Arnaud Legoux Moving Average (ALMA), a Kaufman Adaptive Moving Average (KAMA), and a suite of multiple exponential moving averages (EMAs). It calculates moving averages across higher timeframes, defaulting to
This indicator plots dynamic fractal-based trend lines directly on the price chart. It calculates local highs and lows using a configurable fractal period, derives angle slopes between swing points, and draws projected ray lines across recent segments. The scr
Calculates a Relative Strength Index (RSI) with an exponential moving average (RSI-EMA) in a separate pane. It plots fixed overbought and oversold reference bands and fills the area between the RSI and its EMA based on directional momentum. The script detects
This indicator overlays five Fibonacci Exponential Moving Averages (EMA 3, 13, 34, 55, and 144) on the price chart, combining Guppy Multiple Moving Average concepts with Granville's rules. Fast EMAs track short-term momentum, slow EMAs reflect medium-term tren
This strategy evaluates price movement over a specified lookback period against custom percentage or price change thresholds. It generates buy or sell signals when movement rules are met, overlaid directly on the price chart. Users can customize entry criteria
This indicator calculates a Wilder-style RSI from price changes and can smooth it with a simple moving average. It also flags simple bullish and bearish divergence by comparing RSI and price extremes over a lookback window, and it wraps those functions with op
This overlay indicator draws bullish and bearish order blocks on the price chart. It can show internal, external, or all blocks, plus a second set from a chosen timeframe that defaults to four hours. Mitigation can use wicks, touch, close, or average, and over
This overlay indicator marks bearish M patterns and bullish W patterns on the price chart, with optional structure lines and labels. It also detects evening and morning stars, railroad tracks, and cordofwoods, and can draw order blocks, fair value gaps, and br
This indicator identifies Shooting Star and Inverted Hammer candlestick patterns overlayed directly on the price chart. It evaluates candle body weakness, upper shadow length, and lower shadow proportions in combination with a trend lookback calculation. A Sho
This indicator plots three normalized rate-of-change lines of a volume-weighted price deviation in a separate pane. It measures the close against the typical price, multiplies that difference by volume, and smooths the result with a simple moving average of le
This indicator calculates and visualizes the relative strength of major forex currencies in a separate pane. It evaluates cross pairs from selected brokers using price action or oscillators like RSI, CCI, and Stochastics, smoothed by various moving average typ
This indicator calculates the Moving Average Convergence Divergence (MACD) line, signal line, and histogram in a separate pane. It allows users to select from five moving average types (SMA, EMA, WMA, VWMA, or RMA) for the fast, slow, and signal calculations.
This indicator calculates a Percentage Price Oscillator using fast and slow exponential moving averages to evaluate price momentum in a separate pane. It identifies dynamic pivot highs and lows along the oscillator line and constructs a zigzag array to determi
This indicator identifies ICT trading setups by detecting Order Blocks, Fair Value Gaps, and Change in State of Delivery levels directly on the price chart. It highlights supply and demand zones alongside specific time windows such as the New York AM and PM se
This indicator plots volume as a percentage of a simple or exponential moving average of volume. It shows a column only when volume is above that average and at or above a minimum percentage; other bars stay hidden. Users set the average length and type, the d
This strategy combines triple exponential moving averages, RSI, Stochastic, ATR, and Fibonacci levels to generate confirmation and scalp entry signals tailored for XAUUSD. It evaluates M15 overbought and oversold conditions alongside rejection wicks and trend
Lakshmi Zones v4 is an overlay indicator that calculates volume profile high volume nodes and fair value gaps on 4H data to plot demand and supply zones on the price chart. It draws a Magic Line based on ATR(14) multiplied by the golden ratio and anchored to t
Alper is a separate-pane momentum trading strategy that combines WaveTrend oscillator crossovers with dual RSI divergence. It calculates fast and slow RSI metrics alongside WaveTrend indicator lines to identify momentum shifts. The strategy enters long positio
This indicator plots drawdown distribution statistics in a separate pane. It measures price drawdowns over a chosen lookback, smooths them, and overlays percentile bands and standard deviation bands. Optional calculations add Sharpe, Sortino and Calmar style r
The Bollinger Band Width indicator calculates the width between the upper and lower Bollinger Bands based on a chosen source series, lookback period, and standard deviation multiplier. It plots this BBW value in a separate pane to visualize volatility changes
This strategy plots EMA 25 in yellow and EMA 100 in green on the price chart. It generates buy signals on EMA 25 crossing above EMA 100 when ATR length 14 rises over two prior bars and volume exceeds prior bar. It opens a long position of 1 unit on signal. It
Nice Volume enhances standard volume analysis by plotting colored volume bars and a trend-colored moving average in a separate pane. It identifies key volume conditions such as Pocket Pivots and volume relative to an EMA. High volume spikes trigger percentage
LocalLimit is a Pine Script library designed to calculate local upper and local lower limits for price or indicator series. By tracking local price extrema through multi-phase state logic, it helps scripts construct dynamic support and resistance boundaries. T
This strategy executes trades based on the initial MACD line crossover in the direction of the long-term trend defined by a 200 EMA filter. Position risk is calculated using a lookback swing high or low padded by an ATR multiple. The trade features a dual take
The script plots higher timeframe candles and pivot points directly on the price chart. Higher timeframe candles can display in Open-Close or High-Low style with adjustable thickness and wick visibility. They support multiple history access modes including new
The script calculates a custom ZigZag for support and resistance levels on the current timeframe and three additional timeframes: weekly, daily, and 240 minutes. It plots these levels as lines on the price chart, with options to show or hide up to four levels
This strategy overlays Parabolic SAR, linear regression channels, and Supertrend directly on the price chart. It identifies directional momentum shifts when Parabolic SAR flips, issuing buy and sell signals. Position exits are controlled using customizable per
This indicator implements a k-nearest neighbours classification model to forecast price direction several bars ahead. It extracts three normalized technical features: RSI, an EMA spread scaled by ATR, and normalized candle range volatility. Historical samples
This Pine Script v6 library serves as an internal engine for Smart Money Concepts (SMC), providing types, tracking, and rendering logic for order blocks, fair value gaps, and market structure. It calculates order block parameters including quality scores, heig
This strategy calculates three exponential moving averages with adjustable lengths for the fast, mid, and slow periods. It enters a long position when the moving averages form a bullish stack and a short position during a bearish stack, utilizing a transition
This script is an indicator that plots the close price on the price chart. It checks if close is greater than open and enters a long position using strategy.entry if true. However, as an indicator, strategy functions may not execute properly and could cause er
This indicator calculates a composite base score using trend, momentum, volatility, and volume components. It computes HLC3 SMA trend levels, ROC momentum z-scores, ATR-based volatility expansion ratios, and volume participation rates. Additional MTF Heikin As
This indicator detects fractal patterns in price action using a customizable number of periods. It identifies up and down fractals and draws symmetry zones between consecutive fractals of opposite types on the price chart. Zones incorporate slope multipliers a
This educational indicator demonstrates the Pine Script series concept by plotting the current closing price alongside the previous bar's closing price in a separate pane. It serves as an introductory teaching example to show how historical indexing operates o
This strategy plots on the price chart and calculates an initial balance (IB) range from specified IB start to end hours in ET. It computes VWAP using cumulative typical price and volume during the regular trading hours. Confluence is detected when price align
This indicator overlays GEX levels on the price chart for options analysis on stocks and indices. It plots Bullseye, Gamma Flip, Call Wall, Put Wall, Max Pain, Expected Move, Flip Zones, and Top N strikes based on pasted TradeTracker data. Busby levels include
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.