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 evaluates trading opportunities using a probabilistic scoring model combined with Smart Money Concepts (SMC) pattern detection, including Break of Structure (BOS), Fair Value Gaps (FVG), and Order Blocks. It overlays signals directly on the price
Momentum Rotation (Top 3) ranks ten large-cap US tech stocks by their six-month returns using daily closes. It rebalances monthly and holds the top three performing stocks long only on the price chart. A ranking table shows the current order. Main settings adj
This strategy executes mean-reversion trades when the Relative Strength Index rebounds from overbought or oversold zones in the direction of a higher-period trend EMA. It calculates indicators using confirmed bar closes to prevent live-bar recalculation. Entri
This indicator calculates the RSI oscillator using a user-defined length. It then applies a custom Parabolic SAR function to the RSI values to generate dynamic trend levels that function as support and resistance zones. The SAR levels are plotted in a separate
This overlay indicator combines several time filters so later logic can keep only bars that pass them. It checks an exchange session window, optional weekday presets or custom days, and an optional calendar date range. Separate switches skip a chosen number of
This indicator serves as a test script for Pine Script v6 to demonstrate and validate user-defined functions that return tuples. It defines custom functions returning numeric arithmetic pairs, boolean price conditions, mixed-type tuples, and technical indicato
This strategy plots a 10-period and a 30-period simple moving average on the price chart. It opens a long position when the faster average crosses above the slower one and closes that long when the faster average crosses back below. Green and red markers and p
This strategy combines candlestick price action with Exponential Moving Average, RSI, and MACD filters to identify short-term trend trades. A long signal occurs when a bullish candle engulfs the previous open while price remains above the EMA, RSI stays below
Calculates three exponential moving averages and compares them against a faster 13-period baseline exponential moving average. It displays three horizontal rows of circular plots in a separate pane to represent each moving average length comparison. A circle t
The script is a Pine Script v4 strategy that generates buy and sell signals from crossovers of fast EMA (period 5) and slow EMA (period 10). It overlays signals directly on the price chart for cryptocurrency trading. Additional filters check for hammer candles
The Dereköy-Darvas indicator combines Darvas Box boundary levels with dual Bollinger Bands plotted directly on the main price chart. It calculates top and bottom box lines based on recent high and low extremes to outline price consolidation zones. Simultaneous
This indicator plots scheduled macroeconomic calendar events directly onto the price chart using vertical lines. It categorizes events into five user-defined groups, such as central bank meetings, PMI releases, retail sales, inflation data, and other announcem
Dead Cross Over is a trend-following strategy that calculates a 10-period fast EMA and a 100-period slow EMA directly on the price chart. It enters a long position when the fast EMA crosses above the slow EMA while price sits above the slow EMA. The position i
This indicator scores price from a basket of moving averages and oscillators and plots the result as pump waves in a separate pane. Users can base the rating on moving averages, oscillators, or both, and toggle the total, moving-average, and oscillator waves p
Divergences (Brahim) identifies regular and hidden divergences between price pivots and up to ten technical indicators, including RSI, MACD, Stochastic, CCI, and OBV, along with an optional external source. Plotted directly on the price chart, it renders conne
This indicator identifies long-term trend directions and momentum shifts using weighted moving averages. It plots 13, 48, and 200-period WMAs directly on the price chart. The script evaluates price crossovers relative to each average as well as moving average
This indicator classifies a market regime by comparing a Heikin Ashi close with an exponential moving average of that close. It requests Heikin Ashi open, high, low, and close from a user-selected timeframe, then plots no lines and colors the pane background g
This strategy enters long or short when a moving average of open prices crosses a moving average of close prices. It plots those averages and optional trend-coloured bars on the price chart. Settings choose the average type and length, an alternate-resolution
This overlay study is a boilerplate template for building TradingView studies. Entry logic is left as false placeholders, so it does not generate trades by itself. It can restrict signals to longs or shorts, swap long and short opens, and count consecutive sig
This indicator plots an exponential moving average taken from a selected higher timeframe and colors both the line and the chart background by whether the close is above or below that average. It requests the EMA through request.security and, when the chosen t
Calculates 50-period and 200-period Exponential Moving Averages alongside standard and wide Bollinger Bands. It generates buy and sell signal labels on the chart when the Bollinger Band basis crosses above or below the 50 EMA. The script also includes volume-w
ZigZag OrderBlock Retracement plots multi-layer ZigZag swing structures, order blocks, breaker blocks, and optimal trade entry (OTE) zones directly on the price chart. It supports up to four distinct ZigZag depth layers to analyze both short-term and long-term
This script plots up to three ATR-based Supertrend lines directly on the price chart. Each line uses customizable ATR periods and multipliers to establish trailing support or resistance levels based on median price calculations. Green lines below price indicat
This indicator plots a fast and a slow exponential moving average on the price chart. It marks bullish and bearish crosses with optional labels and circle markers, and it shades the background according to which average is higher. Users can change both lengths
This indicator plots a stop-loss price on the main chart as green crosses. It compares the previous bar's high-low range with a 13-period ATR and offsets the current open by one, two, or three ATR multiples, or by the previous low plus ATR. Length variables na
This indicator tracks consecutive closing price movements to identify trend changes. It maintains separate counters for periods where close is higher than close[4] (buy direction) and lower than close[4] (sell direction). Counters reset when the condition no l
This indicator draws Smart Money Concept (SMC) elements directly on the price chart. It detects swing highs and lows, swing structure points, and order blocks (bullish and bearish OBs), displaying them using boxes and labels. It also features customizable wate
The 3MA Average indicator calculates three separate moving averages using customizable lengths and types, including SMA, EMA, WMA, HMA, and VWMA. It then computes the arithmetic mean of these three values to create a composite moving average plotted directly o
This Pine Script v5 indicator tracks code coverage for debugging TradingView scripts. It monitors execution of functions, conditions, loops, and lines using internal arrays and counters triggered by debug functions. Coverage metrics are shown in a table on a s
This Pine Script v5 file is an overlay strategy skeleton rather than a finished trading system. It sets initial capital, percent-of-equity order size, and a percent commission, then leaves placeholders for inputs, indicator calculations, entry and exit conditi
This indicator detects institutional or large-scale market activity using candle body size and trading volume. It compares current candle bodies against a 20-period simple moving average and checks for volume spikes above an adjustable moving average filter. I
This indicator classifies market conditions into Bull Market, Correction, or Bear Market regimes using a 50-week Simple Moving Average (SMA). It requests weekly timeframe data to track consecutive weekly closes relative to the 50W SMA. A Bear Market regime is
This indicator computes Root Mean Square Error (RMSE) relative to benchmark moving averages such as EMA or ALMA and applies Bollinger Band envelopes or iterative loop thresholds. It plots the RMSE metric and threshold bands in a separate pane to signal trend c
The Spot Buy Marker + PnL indicator tracks manual spot trading positions directly on the price chart. Users specify a buy price, entry timestamp, and either coin quantity or total USD investment. The script computes real-time profit and loss as a percentage of
Calculates the price ratio between the S&P 500 (defaulting to SPY) and Gold (defaulting to GLD) to evaluate macro valuation extremes. It tracks the ratio alongside a simple moving average and evaluates market status across customizable warning, danger, and ext
This indicator plots five exponential moving averages on the price chart using lengths of 5, 13, 50, 200 and 800, labeled as a food system. It scores directional bias against a user threshold, includes an optional 15-minute-and-above rule, and shows the result
MOTO ka AnjalikaAstra is an overlay indicator that combines Ichimoku Cloud concepts with Average True Range volatility filters. It calculates custom Tenkan-Sen, Kijun-Sen, and Senkou Span components using ATR bands rather than standard high and low price chann
Sapphire Fibonacci Strategies is a multi-mode strategy that combines Momentum Breakout, Mean Reversion, and Fibonacci Retracement models built on Fibonacci-period moving averages. It generates long and short trade signals based on price crossovers and moving a
This indicator identifies the classic three-bar bearish evening star reversal pattern directly on the price chart. It checks for a strong initial bullish candle, followed by a middle doji or weak candle, and completes when a subsequent bearish candle closes be
This strategy implements a trend-following system based on Donchian breakout channels and volatility-adjusted position sizing. It generates long entry signals when the close price breaks above the multi-bar highest high, provided an optional benchmark trend fi
Combined Liquidity, Channels, RSI, and VWAP is an overlay indicator that plots multiple technical analysis metrics directly on the price chart. It calculates Keltner and Donchian Channels, volume-based metrics like cumulative volume delta (CVD), VWAP with stan
The Scalp Agiota strategy calculates RSI and MFI values to identify overbought and oversold conditions for cryptocurrency scalping trades. It plots upward triangles on the price chart below the bar when RSI drops to 20 or lower and MFI to 10 or lower, signalin
This overlay indicator plots a 30-period and a 100-period simple moving average of close on the price chart and fills the space between them. It marks a sell label when the slower average crosses above the faster one and a buy label when it crosses below, and
MA & DMI is a strategy that combines moving average crossovers with Directional Movement Index filters to identify trade setups. It calculates a slow SMA, a medium EMA, and a fast EMA alongside ADX and DI values. Trade risk management uses an ATR-based multipl
Currency Strength Chart measures and compares relative strength across major fiat currencies and optional commodities. It aggregates price data for major Forex pairs from selected brokers and plots smoothed strength lines for each currency in a separate chart
Plots Donchian Channels and identifies trading setups based on price testing the channel extremes during high volume spikes. In long mode, it places limit buy orders when the low touches the lower Donchian band with volume exceeding a volume moving average mul
RSI Bounce calculates custom Relative Strength Index levels scaled back onto price, creating nine price-equivalent RSI band series centered around a median RSI baseline. It combines short-term RSI extreme checks with customized MACD signal line crossovers to i
This overlay indicator plots the 50- and 200-period simple moving averages on the price chart and evaluates Bitcoin regime conditions from RSI, ADX, and those averages. It colors the background when price is above the averages or in a full bear state, defined
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.