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 creates a single dynamic label above the active price bar to display its closing price. The label is colored lime green when the bar close is greater than or equal to the open price, and red when the close is below the open. By delet
The Z-Score indicator computes the standardized deviation of a source series from its mean and variance over a specified lookback period. It plots the resulting Z-Score values in a separate pane on the chart. Users adjust the period length and select the sourc
The Pivot Extension Strategy identifies local high and low pivot points based on user-defined left and right bar counts. It enters a long position when a pivot low is detected and enters a short position when a pivot high is confirmed. The strategy toggles bet
This strategy executes breakout trades using two Donchian Channels alongside an optional 200-period EMA trend filter. Entries trigger when the price sets a new highest high or lowest low over the primary Donchian Channel period. Exits are managed via a shorter
This indicator plots calendar-spread context for commodity futures on the price chart. It maps the chart symbol to front and next month contracts automatically, or uses manual symbols, then calculates the spread as a difference or ratio. Fast and slow EMAs, a
This indicator identifies and projects Wyckoff schematic structures directly on the main price chart. It automatically detects price action phases (Phases A through E), key events, support and resistance levels, and volume spikes. The script features customiza
This indicator identifies support and resistance levels using the Malaysian Support and Resistance technique based on pivot high (A) and pivot low (V) close prices. It plots support, resistance, and price gap lines directly on the main chart pane. Traders can
The Krypton Indicator overlays trend analysis, buy and sell zones, and sentiment tracking directly onto the price chart. It calculates a dual moving average trend filter, renders supply and demand zones, and plots a sentiment line to identify market momentum.
Ehlers Loops is a separate-pane indicator that tracks up to five symbols. It requests each symbol's prior close and volume, with low-pass and high-pass periods as the main filter settings. Enabled symbols are drawn with colored labels and lines, and label size
This strategy isolates trailing-stop exits that use trail points and a trail offset without a paired stop or limit. It enters one long unit at 09:15 and one short unit at 15:15 when flat, then arms a trailing exit for the open side. Trail points and trail offs
The Interactive Three Points Curve is an overlay indicator that fits a quadratic curve through three user-selected chart points. Point 2 acts as the apex, while Points 1 and 3 serve as boundary anchors. Outside these anchors, the script extends linearly based
A price-chart indicator that plots a fast and slow EMA cloud, defaulting to 9 and 21 periods, in green when bullish and red when bearish. The cloud can be locked to a chosen timeframe, with a wait-for-close option that is off by default, so locked higher-timef
Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.
This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo
Draws supply and demand zones on the price chart from engulfing candle patterns, split into two zone types: one where price breaks the zone high or low, and one where only the open is broken. Each type has its own maximum count, and a tolerance margin allows s
Debugging script that reproduces a varip behaviour in Pine. Two versions of a context type track the running high of a five-minute period, one with varip fields on a chart point and one using a typed object, and add labels showing when the high changes. The la
This overlay indicator marks historical ARK Invest purchases and sales of FLIR on the price chart. It places green buy labels below bars and red sell labels above bars on hardcoded dates, with text showing the trade side and a same-day ETF count. An ETF settin
This indicator plots the RSI oscillator on the main chart and displays its value distribution in a table positioned at the top right. The script calculates the relative strength index using the input source and length, then plots horizontal lines at 0, 50, and
This strategy executes high-pyramiding trades using a combination of dynamic support and resistance breakout channels, the Supertrend indicator, and an array of predefined price levels. It tracks recent 100-bar extremes to permit buys on breakouts and manages
The Ehlers Ultimate Strength Index (USI) calculates a symmetric RSI replacement using the UltimateSmoother filter instead of Wilder's exponential smoothing. It plots the USI value in a separate pane, bounded between -1 and +1, with bullish signals above 0 and
Displays a text label showing the close price of the most recent bar directly on the price chart. The label updates on each bar, deleting the previous label so that only the latest bar displays its closing price. The label color changes dynamically based on wh
Pivot Points High Low calculates and plots swing highs and swing lows directly on the price chart. It uses left and right bar offset lengths to confirm local price extremes using built-in pivot functions. When a pivot high or low is detected, a text label disp
This script provides a standardized Pine Script strategy framework for connecting TradingView alerts directly to the Zignaly automated trading platform. It structures webhook and email payload messages with exchange options, leverage, secret keys, and position
Vein Structure & Zones 4H combines market structure event detection with automated support and resistance zone mapping directly on the price chart. It calculates micro and major swing pivots, break of structure (BOS), equal highs and lows, and Wyckoff heuristi
This script combines Smart Money Concepts including Break of Structure, Optimal Trade Entry Fibonacci levels, Fair Value Gaps, and Order Blocks to identify setup entries on the price chart. It tracks 15-minute higher timeframe structure, restricts trades to th
The MSG Enhanced LEGO System plots customizable time-based market structure gap ranges and trading sessions as colored boxes on the price chart. Users can configure independent session intervals, such as New York, London, and Asia, along with options to displa
LC Signal Generator measures market breadth and alignment across three configurable symbol groups, including European stock indices, S&P 500 futures, and the VIX volatility index. It calculates daily percentage changes for each asset using daily close data. Wh
This indicator reimagines price action as an electrocardiogram wave directly on the main chart pane. It converts standard bar data into heartbeat-style paths using custom data structures, plotting interconnected line segments that link open, internal swing, an
PF Probe 57 is a Pine Script validation strategy designed to test stop-entry position reversals following pyramided entries. It builds a multi-lot long position at specific intraday times, triggers short and long stop-entry reversal orders based on bar high an
Calculates Fibonacci-scaled wave cycles and projection levels directly on the main price chart based on two user-selected anchor points. The script projects sine waves with expanding or static amplitudes relative to dynamic trend lines, reference price levels,
A trend indicator on the price chart that draws a 21-period ribbon with a cloud whose width is an ATR multiple, 1.618 by default. A trend flip changes the cloud direction, and retest signals appear when price pulls back to the cloud, filtered by volume, RSI an
Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.
An overlay indicator that tracks swing highs and lows with pivots on the chart timeframe and on a one-hour context, which it reads from a Heikin Ashi version of the symbol. It labels the trend direction on each, reports when the two agree as bullish or bearish
Builds an oscillator from the difference between short and long averages of Price Volume Trend, plotted in a separate pane with colour changes above and below zero. It also finds pivots in the oscillator and marks bullish and bearish divergences against price
An indicator in a separate pane that judges whether the current bar's volume is unusual by comparing it with the history of earlier high-volume bars rather than with a moving average. It finds how long ago volume last reached the current level, ranks that gap
This overlay indicator marks historical ARK Invest purchases and sales of Fastly (FSLY) on the price chart. It places green buy labels below bars and red sell labels above bars at fixed dates, with text showing the trade side and how many ARK ETFs acted that d
The script initializes a color array with black and white colors if it has no elements, then plots two horizontal lines using the colors at array indices 0 and 1. It demonstrates array.push, array.size, and array.get in Pine Script v4. The lines appear directl
This Pine Script strategy computes buying selling volume (BV/SV) and normalized pressure volumes (BPN/SPN) in a custom timeframe. It plots a column chart of the combined metric minus in a separate pane and draws Bollinger Bands on the source for volatility ana
This indicator calculates the Ehlers Universal Oscillator by extracting white noise through two-bar price differencing, smoothing the series with a two-pole Super Smoother filter, and normalizing values using automatic gain control peak tracking. It plots a co
This indicator plots the last bar close price in a label drawn on the price chart. The label text shows the close value and is colored green if close is greater than or equal to open, otherwise red. The label updates every bar with the current close price and
This indicator draws a central pivot and up to five support and resistance levels on the price chart. It offers Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla calculation types. The user selects a pivot timeframe from automatic through multi-year p
Sergapi A005 is a trend-following strategy designed for crypto pairs on intraday timeframes. It enters long positions when both ATR and EMA multi-timeframe conditions align bullishly, and enters short positions when both turn bearish. The strategy draws on the
Vein: Trend is a signal aggregator indicator that plots directional markers on the main price chart based on a weighted composite confluence score. It evaluates technical conditions across three layers: momentum setup using RSI, MFI, and Bollinger Bands; confi
This indicator identifies unusually large candles and high trading volume directly on the price chart. It checks whether the current bar range exceeds the maximum high-low range over a specified lookback period. If the range breaks the record with volume below
MSG Enhanced LEGO System is a session mapping indicator that overlays configurable time ranges and market sessions directly on the price chart. It tracks independent session ranges, including major trading periods such as New York, London, and Asia. The indica
This indicator draws extended horizontal lines on the price chart based on psychological rounding levels. It plots whole-number, half, and quarter increments of a configurable rounding value above and below a baseline price. Lines extend across the chart for s
This indicator builds a separate-pane dashboard for the United States and five other countries. It requests open, high, low, and close for each region's currency, two-year yield, and equity index on the chart timeframe. Default symbols cover the dollar index,
This strategy tests repeated entries that reuse the same order id while the stop price changes, so only the latest pending stop stays active. On a 15-minute chart it places a one-contract long stop one tick above the high during the 02:00 window and a short st
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.