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 validation strategy evaluates the execution timing of stop loss and take profit orders in Pine Script. It enters a single long position at fixed daily wall-clock times (00:00 and 12:00 UTC) whenever the strategy is flat. Stop loss and limit profit targets
P_fmt_tabs_mixed is an indicator that tracks net candle direction by maintaining a running cumulative counter. It increments the counter by one on bullish bars where the closing price exceeds the opening price, and decrements it by one on bearish bars where th
A strategy version of a structure indicator that studies how price interacts with confirmed swing zones, role-reversal levels and CUSUM change-point levels. A state machine tracks a level, impulse, pullback and higher-low or lower-high sequence, then grades th
DEPV2 is a multi-symbol cryptocurrency indicator that processes 20 major crypto pairs including BTC, ETH, SOL, BNB and others. It evaluates four signal classes consisting of trend, momentum, volatility and volume. Signals are generated according to user-select
Plots a dynamic level at the midpoint of the 50-bar high-low range and prints BUY or SELL markers on the price chart. It compares the recent summed distance between price and that level with earlier windows stepped back through history, and counts how often pr
A simple price-chart indicator that plots a fast and a slow moving average, defaulting to 21 and 55 periods, and fills the space between them as a ribbon. Both lines and the fill are blue when the fast average is above the slow one and red when below. The aver
The first release of a bearish-side detection indicator for lower timeframe charts. It draws numbered signals on the price chart from relative volume tiers, a standard deviation displacement test, a VWMA with ATR Supertrend latch, pocket pivots and fair value
This strategy identifies liquidity sweeps around swing pivot levels and trades reversals aligned with higher-timeframe trend context. It enters long when price pierces a prior pivot low and closes back above it while trading above the daily 200 EMA. Short entr
A Pine Script v5 indicator in a separate pane, the sixth revision of a Hurst spectral oscillator. It filters the hl2 price with bandpass filters for cycles from 1 day to 18 years and plots the waves along with an optional composite line. Every cycle has its ow
This indicator calculates and plots a volume profile histogram directly on the price chart using data from a specified lookback period. It divides the price range into horizontal rows to visualize volume distribution across price levels over recent price actio
Plots three Rank Correlation Index lines of different lengths, 10, 30 and 50 bars by default, in one separate pane, coloured blue, red and green. Horizontal levels at zero and plus and minus 80 frame the range with a shaded area between the outer levels. Sourc
An indicator component that computes a volume weighted average price with a standard deviation band, restarting at the start of each session by default, and plots the line and the band edges with a fill. The code can also anchor on week, month, quarter, year,
A Pine v4 strategy that redraws candles and plots VWAP with wide, inner and tight percentage bands. It signals a long on a green non-doji candle that opens above the tight upper band or closes above the inner one, with red candles for shorts. Inputs set long a
The Recursive Median Filter combines a median percentile calculation with a lowpass exponential filter to smooth price action directly on the main price chart. It calculates the median source value across a specified median length and recursively blends it usi
This strategy calculates the Qualitative Quantitative Estimation (QQE) indicator by applying exponential moving averages to a relative strength index and its ATR range. It identifies shifts between bullish and bearish momentum to generate trading signals on th
BEZQ Tracker visualizes historical buy and sell transactions made by ARK Invest for the BEZQ ticker directly on the price chart. It plots labels at specific historical dates to mark purchase and sale events recorded from ARK Invest data. Users can filter the d
MathExtension is a Pine Script v5 library of exported math helpers and does not plot or trade. It supplies base-2 log, floating-point remainder, fractional part, a digit-scaling integral helper, an atan2 approximation in radians, Euclidean hypotenuse, and a ne
This futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh
This strategy identifies trade opportunities based on candlestick wick imbalances relative to the Average True Range. It enters positions when candle wicks exceed defined thresholds and filters out doji candles using a minimum body ATR requirement. Exits are h
The Bubbles Indicator measures volatility squeezes and expansion bursts using Bollinger Bands combined with a sinusoid oscillator and RSI divergence. It processes price data through scaled Bollinger Bands to highlight volatility changes while confirming trend
Automatic Grid Bot Strategy simulates a grid trading system directly on the main price chart. It sets upper and lower price range boundaries and splits the defined range into grid levels to trade long, short, or both directions simultaneously. Users can config
This indicator plots a cumulative moving average, also called a running mean, of a chosen price series on the price chart. It updates one bar at a time with Welford's method, weighting each new value by one over the bar count so the line is the mean of all his
This indicator plots each bar's opening time as a numeric series in a separate pane. It uses Pine Script's built-in time value and draws one plot, not an overlay on price. There are no inputs, so the line follows the chart's bar timestamps without filters or o
The Interquartile Range (IQR) indicator measures the statistical dispersion of price data over a user-defined lookback window. It computes the 25th percentile (Q1) and 75th percentile (Q3) using array sorting and linear interpolation, plotting the difference b
Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an
This indicator plots a percentage envelope around a moving average of the selected source on the price chart. It computes a simple or exponential moving average as the basis, then places upper and lower bands a fixed percentage above and below that line. The l
Seykota Alt 6 Pure ATR Stop is a trend-following strategy based on Donchian channel breakouts and ATR volatility trailing stops. It enters trades when price breaks out beyond the Donchian lookback channel, provided optional market regime and volume filters are
This strategy trades long and short using TradingLatino rules as ABCBitcoin interprets them. Entries need EMA 10 crossing or aligned with EMA 55 on the one-hour, four-hour, and daily charts, agreeing ADX slope and directional monitor, and price on the matching
This indicator implements a Wyckoff method state machine that tracks accumulation, distribution, markup, and markdown regimes across phases A through E. It identifies structural events including springs, UTADs, SOS, SOW, LPS, LPSY, and climactic bars using ATR
This indicator calculates the overnight session price range (18:00 to 09:30 exchange time) and measures it as a percentage of the 14-day daily Average True Range (ATR). Depending on configurable percentage thresholds, it categorizes the market regime into chop
AuthLib is a Pine Script v5 library that checks a caller username against a fixed list and, when authorized, prepares drawings for six killzone sessions. It stores boxes, labels, trend lines and price labels in a DrawingData type. For each window it tracks the
This overlay indicator combines three Exponential Moving Averages (EMAs) with a Stochastic RSI to plot trend-following trade setup labels on the price chart. It checks for sequential EMA alignment alongside Stochastic RSI crossovers and specific candle price p
This strategy trades USD/JPY on the price chart during Tokyo and London sessions. It enters long when the fast EMA crosses above the slow EMA while price is above the trend EMA and RSI is above its midpoint, and it enters short on the opposite cross. Position
DX SPX VLT is an overlay indicator that evaluates market trends by combining moving average slope analysis, Aroon filters, and DTEK Supertrend components. It plots colored background highlights to represent overall trend direction, displays a moving average li
This Pine Script v5 library provides a drawing function that renders overlapping supply and demand order blocks directly on the price chart. It calculates proximal, distal, and midpoint mitigation price boundaries when an origin trigger condition is met across
Dynamic Gap Probability Tool is a price-chart indicator that plots a selectable moving average and measures how far the close sits from it as a rounded percentage. It stores historical counts of bars above and below that average at each deviation size, then sh
This script provides a consolidated library of moving average calculations in Pine Script v6. It implements FIR functions including ALMA using Gaussian weights, BLMA with Blackman window, and BWMA using Bessel function, along with IIR moving averages from miha
Xiao Martin is a Martingale DCA strategy that buys long positions as price drops. It enters an initial long trade and adds subsequent orders whenever price decreases by a user-defined percentage from the last entry price, subject to a cool-down period and bar
HMD MACD plots a moving-average convergence divergence oscillator in a separate pane. It subtracts a slow moving average from a fast moving average of the chosen source, then smooths that difference into a signal line. Users can select SMA or EMA for both line
This Pine Script v6 strategy isolates and tests market structure events, specifically Break of Structure (BOS) and Change of Character (CHoCH). Using swing points calculated from configurable pivot strength settings, it tracks structural direction and triggers
This Pine Script indicator detects when the closing price crosses above a 20-period simple moving average. When a crossover occurs, it triggers an alert condition, executes a dynamic alert call with the current close price, and plots a value of 1 (and 0 otherw
An overlay indicator that finds swing pivots, with adjustable bars left and right, and turns them into supply and demand zones sized by an ATR multiple. Overlap rules stop zones of the same or opposite type from stacking. Zones can be extended, historical and
This indicator monitors up to twenty cryptocurrency perpetual pairs across four analytical categories: trend, momentum, volatility, and volume. It generates trade signals using multiple modes, including single-method execution, simultaneous confluence requirin
This indicator computes the average height of green and red candles inside a user-selected time range. Inputs define start and end timestamps that filter candle data in real time. When the range is active the script accumulates heights for green candles (where
A price-chart indicator by MarkitTick based on Cardwell RSI ideas. It produces buy and sell signals from a fast and slow smoothed RSI crossover and from an RSI regime check combined with a moving average trend, with bull and bear RSI ranges. A minimum bar gap
A bearish-side detection indicator for lower timeframe charts that draws numbered signals on the price chart. It uses relative volume tiers, standard deviation displacement with a nine multiplier default, a VWMA with ATR Supertrend latch, pocket pivots and fai
This strategy couples a moving average crossover with external macroeconomic data imported via request.seed. It calculates a 20-period SMA on the fetched macro metric to identify Risk-On, Risk-Off, or Neutral market regimes. Long entries trigger when the 12 EM
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.