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.
An indicator that calculates relative volume, meaning current volume divided by its moving average, across ten timeframes from 1 minute to weekly. The averaging length shrinks slightly for higher timeframes. When any value reaches the trigger level, it sends o
This indicator plots an EMA line with length 50 on the price chart to show the trend direction. It evaluates whether price sits above the EMA for three custom timeframes and displays the results as UP or DOWN labels in a table at the top right. The table color
This Pine Script library provides core enumeration types used across the SMC script ecosystem. It exports standardized definitions for moving average options including SMA, EMA, RMA, WMA, VWMA, Hull, and Zero Lag variations. Additionally, it defines break mode
This strategy computes bullish flags for 1-minute bars using request.security_lower_tf on a 15-minute chart. It tallies the number of bullish sub-bars and enters a long position when the count reaches at least 9 and the 9-period EMA crosses above the 21-period
This test script is a fixture designed to verify type conversion error handling in Pine Script. It assigns a string value to a float variable and plots the resulting variable in a separate indicator pane. The script contains no user-configurable settings, tech
An indicator that watches for shifts in volatility in a separate pane. Each bar it ranks the last N log returns and computes a rank-based Mood scale statistic over all candidate split points, taking the largest standardized value. When that value passes a thre
DEPV2 DEBUG S16 is a multi-symbol indicator that plots trading signals for 20 major Binance cryptocurrency pairs including BTCUSDT, ETHUSDT, SOLUSDT and others. It applies four distinct methods: TREND, MOMENTUM, VOLATILITY and VOLUME to generate signals. Three
This indicator analyzes order flow, dollar volume changes, and price movement across up to five configurable currency symbols in a separate pane. It calculates volume flow scores using normalized metrics such as percent change or Z-scores, integrated with Chai
An overlay Supertrend that is built on a volume-weighted moving average instead of raw price, with a choice of nine average types and a length. It uses an ATR period with separate long and short multipliers, so the two band sides can sit at different distances
Large overlay indicator that merges many detections into numbered signals on the price chart. It includes pocket pivot volume tests, standard deviation displacement, a VWMA with ATR Supertrend and PBJ filter, relative volume, high-volume and opening-drive zone
The TN Causal Matrix Weights Sovereign v6 is a Pine Script v6 strategy that calculates a causal score through matrix multiplication of weighted factors derived from trend EMA changes, momentum ROC, volatility ATR deviations, volume imbalance, and higher-timefr
This indicator plots four smoothed moving averages of lengths 21, 50, 100 and 200 on the price chart. It fills the area between a two-period EMA and the 200-period SMMA to highlight trend direction. It marks bullish and bearish 3-line strike patterns with arro
Utility State Series is an EMA crossover strategy that tracks state variables and past event prices. It calculates 12-period and 26-period exponential moving averages, plotting the close price at the most recent crossover with a color reflecting whether a bull
A Pine Script v5 indicator in a separate pane that runs a bank of Hurst bandpass filters, from 1 day to 18 year cycles, over the hl2 price and marks cycle peaks with labels and lines. Auto or manual modes control cycle selection, peak selection, composite line
This overlay indicator estimates intraday reversal probabilities from a daily session VWAP and its standard-deviation bands. It scores upside and downside setups with RSI extremes, band touches, a 9/21 EMA relationship, and candle direction, then reduces a sco
This indicator automatically draws trend lines on the price chart based on detected pivot points. It identifies pivot highs and lows using a user-specified period and checks combinations of these points to determine valid trend lines that do not get violated b
An indicator on the price chart that tracks the day's opening price, high and low and marks bars where the bar range moves away from the previous bar, as pressure. A small down character above the bar marks downward pressure, a small up character below the bar
This indicator plots aggregated net long and short positions from selected crypto perpetual markets in a separate pane. It can show net longs, shorts, delta, and ratio as candles, a line, or columns, and it can switch to a position RSI view. Users choose Binan
The Vertical Horizontal Filter indicator determines whether an asset is trending or consolidating. It calculates the ratio between the highest-lowest price range over a set lookback period and the sum of absolute price changes over the same period. The script
A Pine v4 strategy that goes long when a MACD bottoming pattern or an RSI bottoming pattern below 30 appears while price trades under a VWAP band set half a percent below the close. It can add to longs on further RSI bottoms up to a maximum, reopen longs, and
Gaussian Filter is a trend-following indicator that overlays a smoothed moving average line on the main price chart. It uses a multi-pole Gaussian filter equation derived from a specified cycle period to reduce noise with minimal lag. Users can set the filter
This multi-symbol indicator evaluates a combined trading condition across up to 40 user-defined symbols. It processes MACD bullish crossovers, RSI thresholds, Bollinger Band boundaries, and DMI/ADX trend filters using security calls. When buy or sell criteria
API Tracker visualizes historical buy and sell activity by ARK Invest funds directly on the main price chart. It plots date-specific chart labels indicating transaction dates, trade direction, and the count of participating funds for a specific equity. Users c
This Pine Script v5 library exposes methods for a generalized neural network. It builds random weight arrays, runs a forward pass through stacked layers using an imported layer function, and begins a backward pass that compares output nodes with targets. Calle
Snag - ES 1m Strategy Candle Bar is an overlay strategy designed for 1-minute index futures charts like the S&P 500 E-mini. It plots dynamic support and resistance levels derived from pivot highs and lows alongside a custom smoothed filter line and a 3-period
Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m
This indicator identifies standard deviation breakout signals by comparing standard deviation against its simple moving average. A long signal triggers when standard deviation crosses above its moving average during a bullish candle, while a short signal occur
This strategy executes trades based on Exponential Moving Average (EMA) crossovers filtered by an Arnaud Legoux Moving Average (ALMA) baseline. It enters long positions when the moving averages cross while price remains above the ALMA, and enters short positio
The Bulls Bears Index (BBI) calculates a composite moving average by taking the arithmetic mean of four separate Simple Moving Averages (SMAs) with distinct lookback periods: ultra-short, short, medium, and long. Optimized for streaming efficiency using circul
This demonstration script plots the high, median (hl2), and low price values using multiple overlapping line plots with distinct transparency levels and line widths. Designed to showcase color styling in Pine Script v5, it illustrates how using color.new with
Major Buy Setup plots a 20-period and a 50-period simple moving average on the price chart. It marks a buy when the current bar is both a bullish engulfing candle and a bald bull candle, defined as a green candle whose upper shadow is no more than five percent
Fisher04 is an oscillator that implements John Ehlers' 2004 Fisher transform from Cybernetic Analysis. It normalizes the midpoint of high and low against the highest and lowest values over the length input, then applies a recursive smoothing step and clamps th
This indicator draws hourly statistics and reference levels on the price chart. It plots optional target lines for the previous hour open, high, low, and midpoint, plus the current hour open. Dashed reversal lines mark the 25th, median, and 75th percentile swe
This indicator calculates the Cumulative Volume Index (CVI) by measuring market breadth across major US exchanges. It requests advancing volume and declining volume data for a chosen exchange, computes their net difference, and tracks the cumulative sum over t
This trend-following strategy identifies breakout entries using Donchian channels and plots signals directly on the price chart. It executes long and short trades, adding fractional units when relative strength index values confirm momentum. Exits rely on aver
This strategy measures the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will fill the gap. It plots signals and execution levels directly on the price chart. Users can confi
Calculates and plots a three-tiered moving average framework consisting of Fast, Base, and Anchor curves directly on the price chart. It evaluates moving average slopes, curvature, separation, and price extension to categorize market conditions into states suc
Assistant is an overlay indicator that marks candles with small or missing upper and lower wicks, using a threshold relative to body size. It plots three-candle and five-candle swing fractals as triangles two bars back, and fires alerts when a bullish or beari
Volume Details calculates estimated buy and sell volume based on intraday price location relative to the high-low bar range. It fetches daily volume history to derive a 30-day daily average volume and compares current volume against this metric. An on-screen t
Calculates Smart Money Concepts market structure elements including internal and swing breaks of structure, change of character, and order blocks directly on the price chart. It highlights bullish and bearish structures, customizable internal and swing order b
VuManChu B Divergences is a momentum indicator that plots WaveTrend oscillator values and an MFI area in a separate pane. It calculates signals for long entries on bullish crosses below zero levels and short entries on bearish crosses above zero levels. The sc
The MACD + Support / Resistance Short Strategy is a Pine Script v4 strategy that generates short signals on the price chart. It plots the 100-period EMA as a trend filter, the MACD line and histogram, and pivot highs and lows as support and resistance levels.
This intraday strategy executes trades on the Nikkei 225 index based on exponential moving average crossovers restricted to Tokyo Stock Exchange trading hours (09:00 to 15:30 JST). Long and short positions are taken on fast and slow EMA crossovers during activ
This indicator overlays smart-money structure on the price chart. It draws supply and demand zones from swing highs and lows, labels those swings as higher or lower highs and lows, and marks zones broken by a close as break-of-structure lines. Fair-value gaps
Price Action Concepts [StratifyTrade] identifies smart money concepts directly on the price chart. It plots swing and internal market structure breaks, changes of character, order blocks with volume activity metrics, and equal highs or lows. In addition, it di
This indicator plots daily support and resistance levels, volume-filtered fractal levels, and an optional VWAP overlay on the price chart. It calculates daily pivot highs, lows, and their midpoint, alongside fractal support and resistance based on candle swing
This indicator overlays higher-timeframe structure on the price chart. It draws HTF range boxes, an HTF candle, remaining time, and optional bias from a chosen higher timeframe. Sweep boxes mark swept ranges, CISD lines mark delivery shifts, and an SMT view ca
The RSI Divergence indicator calculates the difference between a fast and a slow Relative Strength Index. It plots this divergence value as a colored line in a separate pane, shifting to lime green above zero and red below zero. The primary settings control th
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.