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 calculates the RSI and detects regular and hidden divergences between price and RSI pivots. It plots the RSI on the price chart overlay and marks bullish regular, bearish regular, bullish hidden and bearish hidden divergences with labels. Horizo
This overlay indicator plots up to four independent sets of higher-timeframe pivot support and resistance lines on the price chart. Each set has its own on/off switch, pivot length, timeframe, line style, and color. Defaults use 240-minute, 720-minute, daily,
A signal indicator for the price chart that draws a trailing trend line from a double-smoothed average range and flags buy and sell entries when the trend flips. A continuation entry can also fire on a volume and five-bar breakout. Signals are blocked in no-tr
This strategy plots the Relative Strength Index in a separate pane and fades extremes. It opens a long when RSI crosses back above the oversold level and a short when RSI crosses back below the overbought level. Open trades exit at a percentage stop loss or ta
This indicator finds regular and hidden divergences between price and a 14-period RSI, together with a stochastic of the RSI, and draws divergence lines and labels on the price chart. A margin setting from zero to two controls how large a divergence it accepts
This script serves as a starter template for building custom TradingView Pine Script indicators. It defines basic input settings including a length value and source selection, then provides empty sections for adding calculations and plot statements. The script
A strategy on the price chart that turns external indicator signals into entries. Up to five signals can be enabled, each with long and short source inputs, a name and a usage mode. Position size is a fixed number of contracts, and an ATR length and an optiona
A long-only strategy for the gold-backed PAXG token that buys near the lower edge of a smoothed channel. The channel is an EMA of the highest high and lowest low over an adjustable range, and a buy needs price at the lower line with RSI turning up from oversol
A Pine v6 strategy built on a slow stochastic oscillator and drawn on the price chart. The %K line is the stochastic smoothed by a three-bar average, and %D is a further three-bar average. It enters long when %K crosses above %D while %K is below the oversold
A fundamentals indicator that pulls company financial data such as revenue, net income, EBITDA, EPS, debt, cash flow and margin ratios, and shows two chosen items in a table on the chart. It can display quarter-on-quarter, year-on-year and compound growth for
This strategy trades stochastic crossovers in extreme zones. It enters long when %K crosses above %D with both below the oversold level, and short when %K crosses below %D with both above the overbought level. Each entry carries an ATR-based stop loss and take
A separate-pane oscillator based on market structure ranges at three scales: short, intermediate and long. Each scale has a weight input, and the combined value is smoothed and shown as a gradient or a cycle histogram. Optional structure lines and tags for eac
An indicator on the price chart that smooths price with a Kalman filter, builds a band around it from a weighted average of bar ranges multiplied by a deviation setting, and runs a SuperTrend on the filtered line. Trend is set when the close moves outside the
A price-chart overlay that measures how fast an exponential moving average is turning. It takes the bar-to-bar change of a 20-bar EMA as its slope and the change in that slope as acceleration. When both exceed adjustable thresholds in the same direction, it ti
An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke
Demonstrates symbol information functions alongside basic Average True Range (ATR) conversions. It calculates a 14-period ATR, converts the values into mintick points and pips, and plots each metric in a separate pane. Additionally, on the most recent historic
An overlay that plots classic floor trader pivot levels: a pivot point, with support and resistance pairs one to three, as circles. The inputs come from the previous day, the previous week or the previous custom intraday session, chosen in a menu. Toggles show
A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by end hour and minute inputs. It then plots pivot-based support and resistance from left and right bar counts, shows labels where price bre
This indicator calculates the Relative Strength Index (RSI) applied to various volume-weighted indicators, including Accumulation/Distribution, Elder's Force Index, Money Flow Index, On Balance Volume, and Price Volume Trend. The resulting volume-RSI values ar
This educational script demonstrates basic plotting syntax and the overlay parameter in Pine Script v4. It calculates and plots the closing price in a separate pane below the price chart using the default plot function. The source code serves as an instruction
This strategy detects divergence strength across multiple indicators including RSI and MACD on the price chart. It evaluates regular and hidden divergences using user-defined weights for price and indicator changes along with lookback parameters for pivots and
This strategy goes long when a 13-period EMA crosses above a 34-period EMA and short on the opposite cross, closing each side on the reverse cross. A percentage trailing stop, set separately for longs and shorts, ratchets behind the close and is plotted as cir
This indicator detects RSI failure swing patterns and projects corresponding support, resistance, and swing levels onto the chart. It calculates a standard Relative Strength Index across a configurable lookback window to identify pivot highs and lows, drawing
A Pine v4 overlay that plots three triple exponential moving averages of the close, with lengths of 10, 20 and 50 by default, drawn in red, blue and green. Each average is passed through a simple moving average controlled by a smoothing factor, which defaults
The indicator computes bias and mbias curves from typical price relative to highest and lowest closes across periods 3, 6, 9, 12, and 20. It sums the positive and negative biases then negates and plots them as b (red) and s (green) lines in a separate pane to
A separate-pane trend oscillator built from two smoothed moving averages, 21 and 315 bars by default. Each average is passed through a weighted filter and then an RSI, and the result is scaled to a range of roughly 0 to 200. Two lines are drawn with dynamic gr
Simple Moving Average is a minimal overlay indicator that plots two simple moving averages of the close on the price chart: a 20-period line in orange and a 50-period line in blue. The lengths are fixed in the code and there are no inputs, signals, fills or al
This indicator computes the standard ADX from directional movement, subtracts twenty so that zero becomes the usual trend-strength threshold, and draws the result as columns in a separate pane. Positive columns are green, brighter when rising, and negative col
A Pine v4 strategy that plots a 10-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal
The RSI-ADI-Combo indicator combines Relative Strength Index (RSI), Money Flow Index (MFI), and Average Directional Index (ADX) into a single separate pane visualizer. It plots RSI and MFI line graphs along with a color-coded ADX column histogram that highligh
This indicator measures the chart symbol’s percentage change from the opening price at the start of each US presidential term and plots those values as histogram columns in a separate pane. Columns are offset so each administration appears separately, with a s
This indicator plots ICT Fair Value Gaps and internal external range imbalances on multiple high timeframes. It detects liquidity pools and potential reversal zones by analyzing range structures. Three customizable timeframes allow selection of colors and bar
Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma
This indicator calculates and plots two moving averages, which can be configured as either exponential or simple, along with a shaded fill between them to highlight trend direction. It also derives and plots upper and lower deviation levels using a customizabl
This indicator overlays historical ARK Invest buy and sell activity for ticker 6301 on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, with each label showing a one-ETF count. The ETF input switche
This Pine Script library provides a helper function to calculate the Pearson correlation coefficient between two numeric datasets stored as float arrays. It evaluates the linear relationship between the samples by dividing their covariance by the product of th
This overlay indicator smooths a rolling highest low and lowest high with a rational quadratic kernel, then holds a step line that switches between those two smoothed levels when the selected source crosses them. It plots that line as crosses on the price char
STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions
This educational indicator demonstrates the usage of built-in time variables and timestamp calculations in Pine Script. It computes a UNIX timestamp based on the current bar's year, month, and day of the month using the built-in timestamp function and plots th
This indicator merges Fibonacci retracements and extensions onto the price chart from a single detected swing. Swings are identified using zigzag pivot detection with an optional ATR deviation filter, or anchored to completed higher-timeframe periods. When a n
This indicator compares two user-selected symbols by plotting the z-score of their log-price ratio in a separate pane. It averages the ratio with a chosen moving average, measures standard deviation over the same period, and marks a buy when the ratio falls be
This strategy identifies bullish and bearish Three Line Strike candlestick patterns combined with a dual moving average cloud and Volume Spread Analysis (VSA). It triggers long or short entries when a strike formation confirms in alignment with the moving aver
Calculates Vitali Apirine's Slow Relative Strength Index (SRSI), which measures price changes relative to an Exponential Moving Average rather than the previous bar close. It computes the distance between the source price and its EMA, then applies Wilder's smo
This indicator overlays options gamma-exposure levels, session VWAP bands, and intraday market structure tools directly on the price chart. It provides three modular components: strike walls with standard deviation bands and opening ranges, a gamma regime engi
Calculates the Commodity Channel Index (CCI) and plots it in a separate pane using dynamic color gradients. The script adjusts the signal line color smoothly across values ranging from -200 to +200. Additionally, it fills the background between the +100 and -1
Implements an automated testing framework designed to validate an EMA Ribbon and MACD hybrid strategy. It verifies indicator calculations, trend context filters, signal generation, suppression rules, and cooldown mechanics using custom assertions. Test results
This indicator identifies fractal-based pivot highs and lows to map out market structure directly on the price chart. It detects bullish and bearish structure breaks, automatically labeling Break of Structure (BOS) and Change of Character (ChoCH) events when p
This indicator plots a KDJ oscillator in a separate pane. It calculates a stochastic K value from the close, high, and low over the K period, then smooths it with a simple moving average. The D line is a simple moving average of K, and the J line equals three
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.