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 indicator overlays historical ARK Invest trade markers for CrowdStrike (CRWD) on the price chart. It places green buy labels below bars and red sell labels above bars at fixed dates, with text such as Buy or Sell and an X1 count. The ETF input switches be
This indicator plots Minkowski distance values in a separate pane. A function measures distance between two points using exponent p, matching Manhattan distance when p is 1 and Euclidean distance when p is 2. It plots fixed sample distances for those cases and
This indicator plots a Laguerre-filtered percentage price oscillator in a separate pane. It builds short and long Laguerre filters of the midpoint price, forms two PPO series, and ranks each over its own lookback. Tops and bottoms are averaged and rescaled bet
This strategy combines Bollinger %B settings with belthold and inner-candle color toggles and sizes orders as a percentage of equity. The user sets band length, source, and deviation, plus buy, sell, overbought, and oversold levels. Exits use either a modified
This indicator plots John Ehlers' Hann-windowed RSI in a separate pane. It weights successive price differences with Hann window coefficients, then normalizes the weighted up and down sums into a bounded oscillator between minus one and plus one. A period inpu
This indicator plots the close of BATS-listed AAPL on the chart timeframe in a separate pane, using a broken line style. It builds a tickerid for that symbol limited to the regular session, but the security call shown uses the plain BATS:AAPL symbol and reques
This indicator calculates the Rate of Change Percentage (ROCP), measuring the relative percentage difference between the current price source and its value a specified number of bars ago. It includes explicit warm-up tracking to ensure deterministic evaluation
This indicator plots the McGinley Dynamic as a single line on the price chart. It seeds the line with an exponential moving average of the close, then updates each bar by adding a fraction of the gap between price and the previous value. That fraction depends
This strategy detects long and short signals from the Noro TrendRibbon ribbon side change. It draws a corridor from recent high and low prices on the chart. When price falls below the corridor on long signals it opens long positions sized to a percentage of co
Smart Money Dashboard plots key Smart Money Concepts on the price chart, including Order Blocks with mitigation tracking, Fair Value Gaps, and Equal Highs or Lows sweeps. It analyzes Cumulative Volume Delta for divergence and combines multi-timeframe structure
This indicator segments recent price bars into customizable groups and plots visual ruler boxes, numbering, and trendlines directly on the price chart. It calculates geometric trend angles across block segments and can render composite candles representing agg
Calculates and plots key high and low reference levels based on a selected candle timeframe (1-hour or 4-hour) starting at a specific New York session hour (1 AM, 5 AM, or 9 AM). The indicator tracks the high and low prices of the specified candle, resetting d
Hercules Strategy 1.7 is a price-chart strategy that gates trades with an engulfing-candle option, a lightning tick threshold, and a choice of long, short, or both directions. It can invert signals and stop the next trade from repeating the same side. Sydney,
This indicator adapts the built-in TradingView volume tool by adding extended visualization options in a separate pane. It plots volume columns colored by price direction relative to the open or previous close, alongside a simple moving average of volume. An o
This indicator calculates the Ulcer Index as a measure of downside volatility. It tracks the highest source value over the chosen lookback, converts the percentage drawdown from that high into a squared average, and takes the square root. The value plots as a
The strategy monitors the lower timeframe close crossing above the previous daily high obtained via request.security on the daily chart. It enters a long position of one unit upon detection of this cross-up condition and closes the position when the close fall
This strategy tests order fill recalculation behavior across an eight-bar cycle. It enters long positions using a market order at phase zero and a limit order below the close at phase four. When an open position is detected upon order fill, it immediately subm
This indicator splits price into SuperTrend segments and accumulates the percentage of up and down closes inside the active segment. It compares the live net move with the mean and standard deviation of earlier closed segments in the same direction, then plots
This indicator plots a ribbon of seven exponential moving averages based on Fibonacci lengths (8, 13, 21, 34, 55, 89, and 144) directly on the price chart. It calculates volume-weighted distance gaps between consecutive moving averages normalized against a 50-
A separate-pane momentum indicator that combines fast and slow RSI, smoothed momentum, an ATR trend band and a memory of past similar setups to score each bar. A weighted confidence and rank are built from similarity, momentum agreement, trend alignment, volat
A signal hub indicator that bundles many detection groups into plots on the price chart, in a tick-chart-safe build. Groups include White Flag momentum, overlap and super patterns, fauna clusters, relative volume windows, first two bars, a swing bottom and a p
The Tn Sovereign BB Breakout v6 strategy identifies volatility squeezes on the price chart by checking when Bollinger Bands lie inside Keltner Channels. It enters long positions on crossover above the upper BB band when a volume audit passes, and shorts on cro
This indicator draws a Gann box on the price chart between the latest swing high and swing low found within a lookback window, with Fibonacci-style percentage levels, labels and optional grid lines. Gann fans, angles and curves can be turned on, and the box ca
A Pine Script v5 library of string helpers that add to the built-in string functions. It extracts the text to the left or right of the nth occurrence of a separator, with versions for simple and series strings. The file includes example code that shows the cod
The CSOD-tracker indicator visualizes historical institutional purchases and sales directly on the price chart by plotting buy and sell labels with corresponding ETF count markers. It utilizes predefined timestamp records to display trade events for the specif
Bar Pattern Statistics Tool evaluates sequential candlestick formations and displays historical occurrence statistics in a separate pane. It classifies individual price bars into types such as inside bars, outside bars, up bars, down bars, and directional pin
This indicator plots a logistic difference oscillator in a separate pane. It measures the price change over a lookback window as markup and discount, passes both through a sigmoid, and smooths the results with linear regression. The main line is lime or red ar
This strategy plots a 20-period Bollinger Band and a 9-period EMA on the price chart. It opens a long when the prior close is below the lower band and the current candle is bullish, and a short when the prior close is above the upper band and the current candl
This indicator calculates John Ehlers' two-pole Highpass Filter (HPF) to isolate cyclic noise from market data. By subtracting the highpass filter output from the input price series, it removes high-frequency fluctuations and plots the smooth underlying trend
This indicator smooths each of the open, high, low and close series with a simple moving average and plots those four values as candles. A user-defined function applies the same length to every price component, then plotcandle draws the result in a separate pa
This indicator calculates the Schaff Trend Cycle oscillator using custom exponential moving averages with deterministic warm-up logic. It computes a MACD line from user-defined fast and slow lengths, passes it through a double stochastic calculation over a spe
The Median indicator calculates the median of a selected source series such as the high-low average over a user-defined length and plots it as a red line on the price chart. It draws an EMA of the median as a blue line and fills the space between them, changin
This strategy uses Noro TrendRibbon direction to set a long or short bias, then opens a trade when price leaves a high-low corridor built from recent candles. A long opens below the corridor in a long bias, and a short opens above it in a short bias, sized fro
This indicator plots a four-layer Smart Money Concepts framework directly on the price chart. It maps external and internal market structure points (HH, HL, LH, LL), projects structural expectation zones for upcoming swing levels, detects Break of Structure (B
This indicator segments recent price bars into defined groups and visual boxes to serve as a visual chart ruler. It includes automated trend detection with configurable angle thresholds to plot uptrend, downtrend, and range segments directly on the price chart
Forex Majors 4H Rejection Scanner tracks seven customizable currency pairs on a four-hour timeframe and displays their bias in a table overlay on the main price chart. It checks the last two closed four-hour candles for high or low price rejections, labeling a
Hercules Strategy Rewrite is an automated backtesting strategy that generates entry signals using engulfing candlestick patterns, tick thresholds, and support or resistance level breakouts. It offers multi-layer filtering including moving average trend checks,
This indicator tracks the all-time high and all-time low of the current symbol from daily data. It draws optional green and red horizontal lines across the price chart and can show a table with each extreme’s date, days elapsed, price, percent distance from th
This indicator plots a Variable Index Dynamic Average on the price chart. It smooths the selected source with an exponential factor that scales by a volatility index, the ratio of a five-bar standard deviation to the standard deviation over the chosen period,
The script is a Pine Script strategy that fetches the RSI(14) value from the 60-minute timeframe via request.security and signals long entries on crossovers above 50 while closing longs on crossunders below 50. It maintains a single fixed position of 1 unit wi
S_close_variants is a Pine Script v6 strategy that tests different close calls in the strategy library. It enters long positions at specific phases of a 30-bar cycle and uses close, close with comment, close with fixed qty, close with qty percent, close all, a
This indicator plots the SuperTrend line directly on the price chart and evaluates historical trend segments. Whenever the SuperTrend flips direction, it records simulated long or short returns from flip to flip, plotting percentage return labels above or belo
Flat Multiplier is a Fibonacci flat indicator that plots stepped price lines on the chart. It sets a range using start and end timestamps, then extends the price with time and height multipliers based on Fibonacci ratios to calculate new levels. The red line s
A trend flip indicator on the price chart with BUY and SELL labels. It builds a zero-lag trail from ATR and an optional volume-weighted source, then lets a flip through only when several gates pass: choppiness, baseline slope, volatility expansion, efficiency
A non-repainting high-volume marker indicator that flags bars whose volume is the highest over lookbacks from 50 to 1000 bars in steps of 50, plus an all-time high volume level and hot spot signals. Every comparison uses the prior confirmed bar, so signals do
This strategy draws on the price chart and trades a fast and slow Commodity Channel Index against an exponential moving average regime. It enters long when the fast CCI crosses above the lower extreme, the slow CCI is already above that level, and price is abo
This indicator draws a Gann box on the price chart between the latest swing high and swing low found within a lookback window, with Fibonacci-style percentage levels, labels and optional grid lines. Gann fans, angles and curves can be turned on, and the box ca
Provides a collection of technical analysis calculation functions for use across Pine scripts. It exports implementations for various indicators and mathematical formulas, including oscillators like the Awesome Oscillator, Aroon, and Schaff Trend Cycle, moving
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.