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.
ICT + Kill Zone + Silver Bullet is an overlay indicator that highlights key Inner Circle Trader (ICT) session timeframes on the price chart. It draws colored background boxes and labels for trading sessions including Asia, London, NY AM, NY Lunch, and NY PM. U
BTMM OTE Zones automatically identifies swing points to project key Fibonacci retracement levels and Optimal Trade Entry (OTE) areas such as 61.8%, 70.5%, and 78.6%. It plots these levels along with Premium and Discount valuation zones directly on the main pri
This library exports a function that calculates the Relative Strength Index from the close price. It measures bar-to-bar change, separates gains and losses, smooths both with a running moving average, and returns the standard 100-scale RSI. Callers pass the lo
The Long Term Alpha Indicator computes a weighted alpha from price change (close minus average of high low close) multiplied by volume and smoothed via simple moving average. It produces EMAs of this weighted alpha at fixed lengths of 110 30 and 8. Each EMA is
This indicator plots the comparative relative strength of major currencies in a separate pane below the price chart. It calculates strength metrics based on raw price or momentum oscillators including RSI, CCI, and Stochastics, smoothed using various moving av
MA Spread Histogram calculates the difference between two configurable moving averages and plots the result as a color-coded column histogram in a separate pane. The histogram bars highlight expanding or contracting momentum across the zero line. When the shor
This indicator calculates RSI and identifies regular and hidden bullish and bearish divergences against price swing pivots in a separate pane. It features an early signal mode that uses a shorter lookback to detect provisional divergence earlier, tracking whet
The Price Action Toolkit is an indicator that combines several price action tools on the chart. It calculates the ATR with user-defined length and shows it in a table. It plots multiple Kaufman Adaptive Moving Averages (KAMA) with different lengths and sources
WaveTrend Oscillator Pro calculates WT1 and WT2 lines derived from exponentially smoothed typical price channels and moving averages. Displayed in a separate pane, it visualises momentum alongside customizable overbought and oversold bands. Crossover signals b
This indicator plots key levels from historical Monday sessions, including Monday High, Low, Open, Close, and custom ratio levels such as the equilibrium line. Extending these level lines across the trading week, it draws reference levels and labels directly o
This strategy plots a Supertrend indicator directly on the price chart to generate trend-following trade signals. It calculates dynamic upper and lower bands using a chosen ATR period, multiplier, and calculation method. Entries trigger when the trend switches
Volume Historical Patterns indicator plots volume analysis in a separate pane. It computes an SMA of volume using optional time filtering for NYC hours and identifies the highest volume bar ever seen. Bars receive custom colors based on volume relative to this
This strategy is designed for gold trading using multi-indicator confirmation and custom profit protection mechanisms. It combines Stochastic, RSI, moving averages (EMA 20, 50, 200), Fibonacci levels, and ATR buffers to generate confirmation or scalp entries.
Lakshmi Zones v3 is an overlay indicator that builds demand and supply boxes from a volume-profile histogram of recent bars, then merges nearby levels and limits how many zones appear and how far they sit from price. Optional plots include a Magic Line channel
This strategy combines the WaveTrend oscillator with Bollinger Bands and Keltner Channels squeeze momentum calculations in a separate pane. It displays WaveTrend signal lines, oscillator difference areas, threshold levels, and crossover points directly in the
The Grid Bot Direction Plugin Supertrend Pivot indicator calculates dynamic market trend direction for automated grid trading. It computes a smoothed center level derived from pivot highs and lows, combining it with ATR-based bands to generate a trailing stop
This indicator plots cumulative volume delta as candles in a separate pane. It builds volume delta from lower-timeframe intrabars, either as raw delta or as a percent of volume, and accumulates it until a chosen reset. Resets can follow a higher timeframe, a f
This indicator calculates Average True Range as a percentage of the closing price and plots that value in a separate pane. True range is the largest of the bar range and the gaps from the previous close. An RMA-style average with a warmup correction smooths th
This strategy plots a custom SuperTrend Polyfactor Oscillator in a separate pane using ATR, adjustable factors, and normalization options on the chosen indicator source. It generates long, short, or both direction signals based on the oscillator values with mu
Plots timeframe-adaptive moving averages and technical overlays directly on the price chart. It displays standard daily moving averages, weekly trends, or intraday averages depending on the active timeframe. The 200-period simple moving average dynamically shi
This library provides utility functions for managing labels on a TradingView chart. It allows creating labels at the last bar with specified levels, text, colors, and sizes. The refreshXPos function updates the x position of existing labels with optional bar o
Calculates the Z-score of closing prices over a specified moving average period and standard deviation length. It identifies potential statistical outliers by checking if the Z-score breaches positive or negative threshold levels during a user-configurable tra
This strategy generates buy and sell signals on the price chart using MACD crossovers. It applies an EMA 200 filter requiring price to trade above or below the EMA. Only the first MACD crossover is used after the filter condition is met. Stop loss is calculate
This indicator overlays higher-timeframe candles and pivot levels on the price chart. It draws HTF candle bodies and optional wicks or hollow fills, plus vertical time-division lines. Labels can show the timeframe, an average, the weekday, and a TD sequential
The script is a technical indicator that plots two zigzag lines on the price chart to highlight swing highs and lows. It uses ta.highest and ta.lowest to detect macro structures with length 16 and internal details with length 4. Lines connect these points in b
This strategy identifies reversal points using large and additional fractals on the price chart. It detects breaks of fractal levels and plots post-break ranges along with retest lines and signals. Entries occur on retest signals, with pyramiding allowing mult
This indicator overlays two smoothed price lines on the chart for comparison. A one-dimensional Kalman filter estimates the current price state and velocity, adjusting based on process noise Q, measurement noise R, and velocity noise qvIn. An EMA of user-defin
This Pine Script v6 library provides drawing wrappers for smart-money chart objects. It exports types for labels, lines and boxes, plus default style arguments and factory methods that build chart points from a bar index or a bar time. Callers create, hide and
Calculates Elder Ray Bull Power and Bear Power by measuring differences between price extremes and an exponential moving average. It takes long entries during an uptrend when Bear Power is negative but rising, and short entries during a downtrend when Bull Pow
This indicator calculates the maximum of the close and open prices using the math.max function for each bar. It plots the resulting value as a line in a separate pane below the price chart. The script has no input settings and produces no trading signals, entr
This indicator plots a Devisso ratio in a separate pane and is meant to run on the daily chart. It accumulates signed close-to-close percent changes into a running total, applies RSI to that total, then takes the absolute change in RSI divided by the change in
Fractal Spiral draws a geometric spiral in a separate pane and marks price-line crossings against detected swing fractals. It searches a chosen number of bars for up and down fractals, then builds a Golden, Archimedean, or logarithmic spiral around a user-set
This script is a basic OHLC demo indicator written in Pine Script version 6. It plots the closing price of the current symbol on a separate pane below the main price chart. Additionally, it displays trading volume in another pane. This educational example help
This strategy identifies Interactive Brokers opening range periods on the price chart and performs mean reversion trades around the midpoint or opposite side. It calculates the IB high, low, and range, then skips narrow or trend days using lookback averages. E
This TradingView strategy detects directional trades on the price chart using multiple entry triggers including TMA-Crossing, Breakout, and VWAP-Crossing with price types like Close or Open. It applies optional logical combinations of triggers and enforces tim
This indicator marks price imbalances on the chart as boxes. It can show fair value gaps, opening gaps, and volume imbalances, each with separate bullish and bearish colors. Optional minimum-width filters accept points, a percentage, or ATR, and each type can
This indicator classifies market structure into volatility contraction pattern (VCP) stages on the main price chart. It evaluates a Mark Minervini Trend Template score alongside Bollinger Band width percentiles and volume metrics to determine stages such as Co
This strategy calculates a rolling price-change momentum score using a custom iterative loop function combined with exponential moving averages. It measures net price movement across six bars alongside a 9-period and 21-period EMA crossover. Long positions are
Trend Surfer is a multi-timeframe trend-following indicator overlay. It calculates short and long Exponential Moving Averages from a configurable higher timeframe to determine the main market trend direction. The indicator highlights current-interval RSI overb
This indicator calculates and visualizes trend strength in a separate pane by combining a Kalman filter, a Follow Line trend tracker with ATR and Bollinger Bands filtering, Zig Zag swings, and higher-timeframe Power of 3 (PO3) ghost candles. It provides option
Strong Trending - Momentum Rider is a trend-following strategy designed for intraday and swing trading. It evaluates market strength using a composite momentum score based on exponential moving averages, the Directional Movement Index (DMI/ADX), candle body ra
UnizonesAlgo identifies and plots higher-timeframe supply and demand zones on the main price chart using pivot highs and lows. It generates trade signals when price reaches a zone, demonstrates rejection, and receives confirmation from volume exceeding a movin
The 4x4 Futures Ghost Matrix indicator calculates inner and outer sigma bands around VWAP using standard deviation over a lookback period. It plots these levels on the price chart and renders a dynamic matrix table in the top right showing green or red dots ba
This indicator projects an overlaid MACD oscillator directly onto the main price chart rather than in a separate sub-pane. It supports multiple calculation variants including traditional MACD, MACD as histogram, MACD leader, and source-based MACD. Users can ad
Expected Price with BTC Pair calculates a theoretical price by multiplying the selected price source of the current chart symbol by the price source of a specified benchmark symbol, defaulting to Bitcoin (BTCUSD). It requests security data for the reference sy
This educational indicator demonstrates built-in Pine Script string manipulation functions. On the latest bar, it generates text labels directly on the price chart displaying formatted closing prices. In a separate indicator pane, it plots constant numerical v
This indicator calculates a Stochastic Momentum Index and is set to draw in a separate pane. It finds the highest high and lowest low over the Percent K length, measures the close against the midpoint of that range, and smooths both the relative distance and t
This indicator detects divergences between price highs and lows and those of the Price Volume Trend (PVT) line. It plots the PVT on the price chart and identifies bullish and bearish divergences based on user-selected lookback periods for price and PVT pivots,
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.