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 strategy trades based on calculated astronomical lunar phases. It computes the current lunar day using a fixed 29.53-day cycle from a reference timestamp to identify full moon and new moon events. Full moons trigger long entries, while new moons trigger s
An indicator meant for the 15-minute chart that extracts delta-based points of interest from each session, turns them into ATR-sized zones with contamination and freshness rules, and marks the first close through a zone edge plus an ATR buffer. A break can opt
This indicator calculates the distance in ATR units to the nearest higher timeframe OHLC level from the current close price. It identifies the closest level above or below the price and computes the average of near and big levels distances. The script plots we
A long-only strategy for one-minute spot charts that waits for a bullish break of structure above a swing high, then parks an entry at a Fibonacci retracement of the impulse leg, defaulting to the 0.618 level inside a 0.5 to 0.618 zone. The stop goes below the
An overlay indicator that draws opening range support and resistance levels on an index chart together with a 9 and 21 EMA cross. It watches four option contract symbols and records whether each has crossed the third resistance or support level, with times sho
Test fixture for a strategy-description simulator, drawn in a separate pane. It replays a generated rule set on the chart candles between a start and end time, with a ticker mapping check and an optional trace to the Pine logs. The comments state the policy: s
This indicator calculates and plots mirrored price action and fractal pivot points directly on the price chart overlay. Users set two mirror price levels and anchor times interactively on the chart. The script then projects inverted price candles based on refl
Types Demo is an educational indicator designed to illustrate fundamental Pine Script variable types, including boolean, integer, float, string, and color. It checks whether the current bar is bullish and plots the closing price in green within a separate pane
A price-chart indicator by BackQuant that smooths a chosen source through up to three causal median filters, then a two-pole Super Smoother, to draw a trend line coloured by direction. A chop filter can block trend changes when directional efficiency or ATR-no
Draws volume order blocks on the price chart and marks three tiers of asymmetric volume signals, buy and sell, with a cooldown. High-volume proximity markers fire when a rolling highest-volume bar sits within a set number of bars of a tier signal. This version
A strategy that sorts volatility into five states from the ratio of a fast ATR to its average, then picks entries by state. In low volatility it fades moves beyond the prior range when RSI is stretched. In high volatility it takes range breakouts that match an
A strategy built on a multi-step checklist. It compares 9 and 18 EMA alignment across daily, 4-hour and 1-hour data, then combines Bollinger Band %B and Stochastic RSI conditions with fractal breakout levels. Stops sit at the fractal, take profit is set by a r
Finds sideways ranges on the price chart and draws them as boxes. A range is flagged when every close over the minimum length stays within an ATR-based band around a simple moving average. The box, a dotted midline and top and bottom plot lines extend while th
This strategy models a zero-days-to-expiration (0DTE) Opening Range fade system on the price chart, designed around Mini-SPX index options. It calculates an opening range box and gauges directional sentiment from an external symbol like ES futures. Bullish con
An overlay indicator that marks an anchor range during a configurable morning session, by default 09:00 to 10:00 New York time. It detects a breakout from that range, sets a bullish or bearish bias, and finds fair value gaps in the breakout leg. It then tracks
REQ TEST is a minimal diagnostic utility indicator that tests external symbol data accessibility using security requests. It fetches daily closing price data for specified US market tickers including major index ETFs and market indicators such as SPY, QQQ, XLK
Quad Rotation 40 4 is the slow pane of a four-stochastic setup with periods 9, 14, 40 and 60. It plots the 40/4 stochastic K and D lines in a separate pane with oversold and overbought zones, K/D cross triangles inside extreme zones, and a convergence band wei
Composite Price Stats is a trend-following overlay strategy that evaluates statistical metrics on price components. It calculates cumulative true range, variance, deviation, and ADX on hlc3 price data, while plotting an averaged price series. Long entries trig
Compares price with a moving average on four selectable timeframes, defaulting to 15 minutes, 1 hour, 4 hours and 1 day. Each timeframe scores plus one, minus one or zero, and the four are summed into an alignment score from minus four to plus four. It plots i
A long-only strategy for fast-moving small-cap crypto charts. It enters when volume is a set multiple of its recent average, the bar gains more than a minimum percentage, the candle is green and the move over the last twelve bars is not above a too-late limit.
An overlay indicator for crypto charts that combines a volume profile with value area, an anchored VWAP with bands, an order flow proxy from lower-timeframe delta, relative volume and cumulative delta, and price action based on swing pivots and ATR rejection w
This compact indicator labels Elliott Wave counts on the price chart. It runs a zig-zag at several depths, chooses the depth that gives the best fit, and applies Elliott Wave rules, with a strict mode that forces an A-B-C count when the rules break. A correcti
An indicator on the price chart that draws an ATR-based trailing stop with a smooth tightening phase. The stop starts at a multiple of a 200 period ATR from the extreme and flips when the close crosses it. After a flip, the stop moves closer to price along a s
A macro strategy that builds a global central bank liquidity series from the Fed balance sheet, Treasury account, reverse repo, ECB, People's Bank of China and Bank of Japan, and a combined M2 money supply series, each convertible to dollars and switchable. It
This Pine Script strategy combines bullish and bearish engulfing candlestick patterns detected on the price chart with a stochastic oscillator for entry signals. The stochastic is calculated using inputs for K period, D period, and smoothing. Long entries trig
This indicator computes the Kalman filter applied to the chosen source to measure trend strength and generate oscillator values. It plots these values along with optional ZigZag swing points in a separate pane. The script overlays PO3 ghost candles from a high
This strategy trades intraday price interactions with the Volume Weighted Average Price (VWAP). It offers bounce and crossover entry modes, filtered by an Exponential Moving Average trend filter and a customizable trading session window. Stop loss levels are c
A Pine v5 strategy that trades an outside bar after one or more inside bars. An inside bar has a lower high and higher low than the bar before it, and an outside bar exceeds both. After the chosen number of consecutive inside bars, an outside bar closing up op
A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from
An overlay indicator that draws the current candle range of several higher timeframes on the lower-timeframe chart. Seven timeframes can be switched on or off: 30 minutes, 1 hour, 2 hours, 4 hours, daily, weekly and monthly. Each gets its own colour, and an op
This indicator overlays statistical standard deviation bands around a basis (SMA or VWAP) and generates momentum-filtered breakout and pullback signals during a specified trading session. Long and short signals trigger on band crosses confirmed by Heikin Ashi
This indicator plots an overlay version of the MACD directly on the main price chart alongside optional Zigzag multi-depth calculations and pivot analysis. It calculates traditional, histogram-based, leader, or source-based MACD oscillators and displays signal
A chart-overlay indicator that detects pivot-based swings and marks break of structure and change of character events. It measures the percentage size of each move that follows and sorts it into four levels with adjustable minimum and maximum percentages. Labe
Indicatorv5SMC / ICT / price actionSessions & time
An indicator on the price chart that draws a zigzag of swing highs and lows from a chosen timeframe, with length, depth and highlight level inputs and an option for a curved line. The recursive depth builds higher-order swings from lower ones. It can attach RS
TESLA-BestPosition is a long-only dollar-cost averaging strategy that combines custom Relative Strength Index levels with smoothed highest-high and lowest-low channels. It calculates 10-period exponential moving averages of highest highs and lowest lows over a
A Pine Script v6 library that stores timestamped values and retrieves the value at a past point in time, such as one week, one month or year-to-date ago. It defines a data type with parallel time and value arrays, helper functions that limit array size to the
This strategy combines a TD Sequential close comparison, RSI with a moving-average Bollinger envelope, MACD, and the Stochastic Momentum Index. It allows long, short, or both directions and sizes orders from a percentage of equity. Inputs set RSI and MACD leng
This educational indicator illustrates how variable persistence functions across historical and real-time bars. It maintains three counters: a standard bar counter using the var keyword, a tick counter using varip that increments on every intrabar update witho
This indicator is built for a separate pane and compares Bollinger Bands with three Keltner Channel widths to mark low, mid, and high squeeze conditions. Length, price source, and moving-average type for both calculations are selectable among SMA, EMA, WMA, VW
A Pine v4 indicator in a separate pane that computes a z-score of price against a volume-weighted average price over a chosen length, 20 bars by default, then smooths it with an exponential average. Shaded bands mark overbought and oversold zones, by default b
Calculates two TRIX (Triple Exponential Average) lines based on logarithmic close prices over different lookback periods. The fast TRIX uses a primary period length, while the slow TRIX adds an offset factor to determine its longer period length. Both TRIX lin
A price chart overlay that plots the highest high and lowest low of the previous set number of bars, ten by default, together with a midline between them. The area between the bands is shaded green when the current bar's high breaks above the prior upper line
A Pine v4 strategy that fades moves away from VWAP. It plots VWAP with percentage bands and opens a long when a green non-doji candle opens below the lower band, or a short when a red candle opens above the upper band. A long exits when the high passes VWAP, a
This script provides a developer testing framework for Pine Script v5 that executes custom test suites and assertions. It logs test specifications, skips marked tests, and evaluates array equality across data types. The tool renders a visual test reporter dire
This overlay indicator screens a pasted list of symbols for ICT market structure shifts, or for retracements toward an optimal trade entry or order block. It uses a zig zag built from highs and lows or opens and closes, then lists matching bullish and bearish
Strategy Tester is an overlay trading strategy that combines linear regression momentum, Directional Movement Index (DMI), and Average True Range (ATR) volatility levels. It seeks long entry setups when pivot highs form on the custom momentum oscillator while
ACHR Tracker visualizes historical buy and sell transactions made by ARK Invest funds for Archer Aviation (ACHR). It plots colored labels directly on the price chart at historical timestamps, indicating whether ARK ETFs purchased or sold shares and showing the
DebugConsole is a Pine Script v5 library that stores debug text in a fixed-length string array and shows it in a single chart table cell. init creates a bottom-left table and an empty line buffer whose size defaults to 20. queue drops the oldest line and appen
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.