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 executes long trades during pullbacks within an established uptrend, plotting moving averages, entry prices, and stop levels on the price chart. It buys when the close is above the long-term simple moving average and below the short-term moving a
Bollinger ZigZag ++ combines Bollinger Band percent B calculations, pivot points, and a ZigZag filter to mark potential support and resistance levels directly on the price chart. It detects overbought and oversold thresholds relative to the bands and draws vis
An extended version of the JAT+BSM strategy that adds a strategy preset, a risk aggression choice and a pattern type filter to the AlphaTrend style core, MACD, consolidation layers, volume profile and candlestick and macro pattern drawings. Forecasts use kinem
This mean-reversion strategy implements Larry Connors' 2-period RSI system. It enters long positions when price trades above a long-term simple moving average (default 200) and the 2-period RSI drops below 10. Optional short positions enter below the trend ave
SMC Profile Context is an indicator that operates as a decision-support companion overlay in a separate pane. It imports pre-calculated fields from an external micro-profiles library to display ticker quality metrics and market context. The indicator visualize
This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses
This v6 indicator defines a function f that accepts an integer input and plots the function result. The plot appears on a separate pane. No trading signals or position rules exist. The script tests input handling inside functions and draws a constant value on
A strategy that uses ADX to decide between two sub-strategies. In ranging conditions it fades asymmetric Bollinger Band extremes with a 200 EMA trend filter. In trending conditions it trades Donchian channel breakouts, protected by optional volume, candle rang
DEPV2 DEBUG S0 monitors 20 major cryptocurrencies on Binance including BTC, ETH, SOL, XRP, DOGE and others. It generates signals using four methods: TREND, MOMENTUM, VOLATILITY and VOLUME. Users choose from same-time confirmation, sequential confirmation or au
An overlay indicator for option charts that finds pivot highs and lows on closing prices and draws extending resistance and support lines. When a pivot is confirmed on a closed bar it labels an opposite strike to consider, found by swapping the call or put let
This indicator plots mirrored price and parallel lines on the chart. It defines a base line using two input points and calculates the maximum deviation for a price channel by reflecting the close price around the base line. Users can apply the reflection to th
An ATR trailing stop drawn on the price chart. The stop chases a target set at a multiple of ATR below price in an uptrend and above price in a downtrend, but its travel per bar is capped at a terminal velocity setting measured in ATR, 0.3 by default. This kee
Finds volume order blocks, zones where heavy volume built up around a moving average crossover, and draws them on the price chart as support or resistance areas. Six sensitivity tiers each produce buy and sell tier signals with mutually exclusive handling, plu
A fixed-parameter gold strategy intended for the five-minute chart. Entries come from an EMA 9 and 18 crossover, or a trend continuation check using the Bollinger midline and RSI, and are allowed only in a short list of UTC hours. It trades one position at a t
A Pine v4 indicator that judges trend by comparing a 9 and an 18 period EMA on three higher timeframes (1 hour, 4 hour and daily by default) and optionally the chart timeframe. Background colours show when all or most timeframes agree on direction. Settings in
Evaluates intraday trading rules across ten ticker symbols simultaneously using multi-symbol data requests. It monitors 5-minute volume surges, price breakout pivots, moving average positioning, and session time filters customized for Bursa Malaysia trading ho
Support and Resistance finds pivot highs and lows using configurable left and right bar counts and keeps the most recent levels, merging nearby pivots into one zone and counting touches. Zones are drawn as boxes and lines with optional labels, plus break and t
Corpus Switch And Strings is a multi-asset strategy that calculates the price spread between two configurable symbols on a set timeframe. It evaluates the spread using a string switch selection to compute either a 9-period Exponential Moving Average, a 9-perio
Plots the built-in Supertrend line on the price chart as a single blue line. It has two settings, the ATR length with a default of 10 and the ATR multiplier with a default of 3. The line trails price and flips side when price closes through it. There are no al
This indicator marks swing highs and lows from pivot bars on the price chart and projects dates ahead using Gann and Hurst cycle timing ideas. Tables show the pivot dates and nearby future dates, with colours for bullish and bearish pivots. The left and right
This script plots a rainbow ribbon overlay composed of eight Exponential Moving Averages ranging from 10 to 50 periods alongside two Smoothed Moving Averages on the main price chart. It evaluates complete moving average alignment across all calculated lengths
This volume divergence indicator detects bullish and bearish divergences on the price chart. Bullish divergence occurs when price forms a lower low but volume forms a higher low, and bearish divergence when price forms a higher high but volume forms a lower hi
This indicator plots a standard MACD line, signal line, and color-coded histogram in a separate pane, with a zero line. It finds pivot highs and lows on both price and the histogram using a shared pivot length. Alerts fire when a histogram pivot high or low is
V5 Combination by yzz is a composite chart indicator that integrates a Volume Profile and Market Profile (TPO) tool with a MACD oscillator overlay. The profile section calculates price distribution across configurable range modes, plotting the Point of Control
Plots the Elder Force Index in a separate pane: the change in close multiplied by volume, smoothed with an exponential moving average of 13 bars by default. A zero line separates positive from negative readings. The script raises an error when the data vendor
An indicator that divides the annualised historical volatility of the current symbol by that of a base symbol, which defaults to a Bitcoin perpetual. Both are computed from the standard deviation of log returns over an adjustable length. The ratio is plotted a
The Voss Predictive Filter indicator calculates a custom Voss filter and plots it alongside the Voss line in a separate pane. It processes the selected source to produce filtered output and Voss values based on length, predict, and bandwidth settings. The main
A Pine v4 overlay that plots simple moving averages of 50, 100 and 200 periods on a chosen source, with progressively thicker lines. Each line is green while it is rising and red while it is falling. An optional background colour is available, and the three le
This indicator calculates a normalized price range oscillator in a separate pane. It computes the position of the current close relative to the highest and lowest close over a configurable lookback period. The output values range between zero and one, compleme
A Pine v4 strategy that plots a 27-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 Derivative Oscillator calculates a double-exponentially smoothed Relative Strength Index (RSI) and subtracts its Simple Moving Average (SMA) to form the main oscillator line. A secondary signal line is plotted using an SMA of the main oscillator values. Th
This strategy combines triple exponential moving averages with a TTM Squeeze oscillator to capture trend-following momentum. It enters long or short positions when price aligns with all three EMAs (125, 680, and 2500 period) and the oscillator turns in the tre
ALMDG Tracker visualizes historical buy and sell transactions executed by ARK Invest funds for the ALMDG ticker directly on the main price chart. It plots visual labels at specific trade dates, indicating transaction types and the count of participating ARK ET
Calculates K-Means clustering on two-dimensional float data arrays directly within Pine Script. The script initializes cluster centers randomly from data points and iteratively assigns points to clusters based on Euclidean distance calculations. User settings
This overlay strategy is named for one-minute gold. It requests the daily low and several higher-timeframe opens with lookahead enabled, builds a synthetic source from recent opens, and plots a volume-weighted moving average of a higher-timeframe open with sta
This strategy enters long when a faster moving average crosses above a slower one and short when it crosses below, unless long-only mode is on. An optional volume filter requires volume above a 20-bar average times a multiplier. Exits use a percentage stop los
This indicator implements a binary logistic regression classification model retrained on each bar using gradient descent optimization. It processes normalized price features through a sigmoid activation function to classify market direction and generate direct
Accumulate identifies potential market accumulation and breakdown phases by combining four Simple Moving Averages (21, 50, 90, and 200 periods) with a Price Volume Trend (PVT) MACD indicator. Green buy arrows plot on the main price chart when price is above a
This indicator calculates Bias as the relative deviation of a chosen source from its simple moving average, using (source minus average) divided by the average. It maintains a circular buffer and running sum so the average updates bar by bar, and it refuses a
This strategy calculates the 20-period RSI and detects bullish and bearish crosses at the 50 level. On a bullish crossover it enters a long position using a stop set to the high price and sends a custom alert message with the stop value. On a bearish crossunde
This indicator plots horizontal support and resistance from confirmed pivot lows and pivot highs, using ten bars on each side. When a new pivot appears, it replaces the previous line and extends it ten bars beyond the current bar. A translucent gray fill marks
Ehlers Phasor Analysis calculates the phasor angle, derived cycle period, and market trend state using John Ehlers' cycle analysis techniques. It uses correlation against cosine and sine waveforms over a customizable lookback period to extract in-phase and qua
This indicator draws colored boxes for six four-hour New York sessions, from 6pm through 2pm, and tracks each window's open, high, low, and close. It marks the high of day and low of day and records whether those extremes are later eliminated. A checkpoint tab
This indicator plots the Chande Momentum Oscillator in a separate pane. It splits bar-to-bar changes of a chosen source into positive and negative parts, sums each over a lookback length, and scales the difference of those sums by their total into a percentage
Zen Z Bars V1 analyzes bar-by-bar price action, candle range expansion, and internal bar strength (IBS). It identifies breakouts, inside and outside bars, climax candles based on range expansion factors, and tiered range multiple bars. The indicator draws brea
This strategy enters long or short on Donchian channel breakouts and adds units only while RSI remains beyond its momentum thresholds. Size is based on a percentage of equity per unit, up to a set maximum. An ATR initial stop and a chandelier trail manage open
Diverlong D002 is a trading strategy designed for crypto assets that detects momentum divergences using state changes in the Squeeze Momentum Indicator. It triggers long or short entries when price and momentum diverge across indicator sections. Trade exits ar
Exhaustion Scanner is an overlay indicator that measures overextension and reversal risk by evaluating price stretch, momentum exhaustion, and candle triggers. It combines distance from moving averages and Bollinger Bands with momentum oscillators, divergence
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.