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.
Calculates market regime conditions by combining RSI, MACD, and ADX/DMI indicators. It evaluates whether the market is in a strong bullish, strong bearish, neutral, or non-trending regime. The script plots a colored line overlaying the close price to reflect t
This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations. It plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. I
Fractal Model is a price-chart indicator that tracks multi-timeframe liquidity sweeps, reversal confirmation, and forward projections. It draws higher-timeframe candles beside price, marks high and low sweeps, and tracks CISD plus later IC-CISD levels after a
Consolidation Filter identifies market indecision and sideways ranges characterized by low volatility. It computes a forecast oscillator variant comparing price against an exponential moving average or a McGinley dynamic across three selectable methods. When t
This strategy executes a long-only trend-following system based on a simple moving average, designed primarily for daily charts. It plots the moving average directly on the price chart and evaluates trading signals strictly on a user-defined day of the month,
This strategy combines Smart Money Concepts (BOS and CHoCH) with moving average trend filtering and volume spikes to generate trade signals. It checks for 20 EMA and 50 EMA alignment, along with volume 20% above its 20-period SMA. Long entries require a bullis
This strategy combines Bollinger Bands with a short RSI to fade moves that leave the bands and then return. A long requires the prior bar below the lower band and oversold, then a close back inside the band while RSI is between 30 and 50. Shorts mirror that at
The Absolute Price Oscillator (APO) script calculates the difference between a fast exponential moving average (EMA) and a slow EMA for a specified source series. It uses explicit EMA calculations featuring warmup compensation to handle early bar initializatio
This overlay indicator draws horizontal lines at ten hardcoded ETH long-liquidation prices and ten short-liquidation prices from a Hyperliquid snapshot. Longs use red and amber and shorts use green and cyan, with the three nearest levels on each side drawn thi
This strategy executes trend-following long trades during pullbacks and scales out dynamically. It enters when a fast EMA exceeds a trend EMA by a minimum slope percentage, price pulls back near the fast EMA, and price trades above a 60-period EMA filter. Posi
KernelFunctions is a Pine Script v5 library that exports kernel weight functions for Nadaraya-Watson style estimation. It calculates a Rational Quadratic kernel, a Gaussian kernel based on a radial basis function, and a periodic kernel that models repeating be
Hull Keltner Channel calculates and plots a customized Keltner Channel overlaid directly on the price chart. It replaces the traditional moving average baseline with a Hull Moving Average variation, offering standard HMA, exponential EHMA, and triple THMA opti
This indicator calculates the RSI with a 20-period length and plots it on the chart. It marks upward crossovers above 50 with green arrows and downward crossovers below 50 with red arrows. A horizontal line appears at the 50 level. The script sends alerts when
This indicator requests Apple's daily closing price and calculates a 20-period simple moving average of that series. It plots the moving average on the price chart as an overlay. There are no user inputs, so the symbol, daily timeframe, and length stay fixed i
This script demonstrates type declarations supported in Pine Script v6. It defines imaginary library exports including user-defined types with fields of int float string bool color array matrix and map types as well as enums. The script also shows primitive va
This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute
This strategy plots a MACD in a separate pane and enters on zero-line or signal-line crosses, with an optional early momentum trigger. Volume and a trend moving average can filter signals, and shorts can be disabled so only long trades are taken. It sizes posi
This overlay indicator highlights candles with a body smaller than 50% of their total range by coloring them white on the price chart. Simultaneously, it calculates and plots horizontal lines for open prices across multiple higher timeframes, such as daily, we
This indicator automatically identifies structural pivot highs and pivot lows using a fixed 15-bar left and right evaluation window. It stores recent pivot values and timestamps in dynamic arrays and, on the current bar, plots extended trendlines connecting th
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim
This strategy combines multi-timeframe RSI analysis with exponential moving average filters to execute trades on price bounces. It evaluates daily and weekly RSI levels alongside pip-distance thresholds between fast, slow, and long-term EMAs. Position entries
Delta Histogram is a separate-pane indicator that plots per-bar volume delta as a histogram alongside a 20-period simple moving average. It visualizes net buying and selling pressure for each bar, helping traders track changes in order flow aggression relative
This indicator calculates the acceleration of price action by computing the slope of the linear regression slope over a rolling window. It utilizes two sequential rolling linear regression stages implemented with circular buffers to ensure deterministic comput
This indicator plots the Hash Ribbon metric by calculating 30-day and 60-day simple moving averages of Bitcoin network hash rate data. Designed for long-term market cycle analysis, it draws in a separate pane and displays hash ribbons alongside optional buy si
The AM TBR indicator calculates statistical levels for NQ futures using standard deviation. It plots a sigma ladder showing touch levels at 0.5 to 2.0 standard deviations, marks touch points, displays Mean Absolute Error (MAE) zones after touches, and shows Me
This indicator tracks and visualizes cryptocurrency net positioning across multiple derivative exchanges, including Binance, BitMEX, and Kraken. It calculates aggregated net longs, net shorts, net delta, and ratio metrics, or an optional Position RSI, renderin
This overlay indicator monitors moving-average relationships for up to ten symbols. For each market it requests the close and three exponential moving averages from a user-chosen timeframe, defaulting to twelve hours, and builds a status for the faster-versus-
This indicator calculates and plots two Relative Strength Index (RSI) lines in an oscillator pane alongside standard reference bands at 30, 50, and 70. By default, it plots a short-period RSI and a secondary RSI. On the 3-minute and 15-minute chart intervals,
This strategy executes trades based on pivot levels, an exponential moving average, and a multi-stage smoothing trend line. It identifies support and resistance points from pivot highs and lows, combining them with price relationship rules against a custom smo
This indicator maps planetary positions onto W.D. Gann's Square of Nine grid using astronomical ephemeris algorithms. It tracks pivot highs and lows with corresponding planetary longitude degrees, projects future target degrees ahead on the chart, and supports
This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra
This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend
The Macro Alert System is a quantitative macroeconomic monitoring indicator designed to evaluate risk regimes, interest rates, spreads, and multi-horizon market stability. It computes composite macro risk scores using empirical percentile distributions, Welch-
This indicator detects a bearish Abandoned Baby candlestick pattern on the price chart. It looks for an uptrend, a white candle, a doji that gaps away from that candle, and a following black candle that gaps below the doji. The trend filter can use a 50-period
This indicator plots the Average Directional Index (ADX) alongside a static threshold line in a separate pane. It calculates directional movement using the true range and directional indicators smoothed with running moving averages. Users can adjust the smooth
This strategy trades on the price chart using multiple indicators. It enters long positions when price dips meet conditions on Bollinger Bands 40 and 20, RSI, MFI, volume and other thresholds. It exits at custom ROI profit levels based on RSI or after timeout
This indicator demonstrates several Pine Script v6 language features on the price chart. It requests the daily close for a fixed list of stock symbols and writes those prices to the log. On the last bar it draws labels using exact point sizes and bold or itali
This indicator estimates Bitcoin energy value from joules of mining energy input, supply growth, and a fiat factor, then plots that value as an oscillator in a separate pane. A simple moving average of the energy value is drawn using a user-set length in days.
This overlay indicator is an unfinished alert template. Placeholder buy and sell conditions track an open long or short state and can fire entry alerts immediately or only after a bar closes. It calculates optional stop-loss and take-profit prices from a fixed
This indicator calculates fast and slow moving averages based on predefined Fibonacci ratio pairs, such as 89/144 or 21/34, along with a combined Golden Ratio moving average. Users can choose from multiple weighting types, including Simple, Exponential, Runnin
This indicator plots Bollinger Bands on the price chart using a 15-bar simple moving average of ohlc4 as the basis line. It calculates upper and lower bands at one standard deviation multiplied by 1.12, plus additional outer levels at 1.5, 1.75, and 0.5 deviat
This indicator simulates a crypto hedge-scalping grid in a separate pane and tracks cumulative profit after commission. It builds a short EMA and places four long grid levels plus one deeper short hedge level as percentages below that EMA. Equity shares of a U
Zen ABR Ladder plots multiple Average Bar Range (ABR) lookbacks (2, 4, 8, 16, 32) alongside an Average Daily Range (ADR) scalp threshold in a separate pane. It measures bar ranges in price points and displays layered translucent shading between the scalp line
The indicator calculates a triple-smoothed moving average and a corresponding signal line to identify trend direction and potential reversal points directly on the price chart. Users can select from EMA, SMA, RMA, or WMA for both the main triple smoothing and
This indicator calculates an approximate volume profile directly on the price chart for a specified block of historical bars. It divides the high-low price range of the block into discrete rows, distributes bar volume across overlapping rows, and visually plot
This library exports a Band type and functions that build a simple-moving-average basis with upper and lower envelopes from standard deviation. It classifies a source as above, below, or inside those envelopes, measures band width, and scales an imported z-sco
The Relative Volume Strength Index (MZ RVSI) is a separate-pane oscillator designed to measure volume momentum and trend strength. It allows users to choose between various volume oscillator types, including On Balance Volume, Klinger Volume Oscillator, and Vo
This indicator calculates directional probabilities based on price position relative to Bollinger Bands and a simple moving average over a rolling lookback window. It computes breakup, breakdown, and combined prime probability percentages, plotting up to 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.