8,340 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.
Omar MMR is a long-only price-chart strategy that combines three exponential moving averages, RSI, and MACD. It enters long when price is above the slowest average, the fastest average is above the middle one, the MACD line crosses above its signal, and RSI is
This indicator plots the implied volatility term structure for US equities in a separate pane. It requests close data for four Cboe volatility indexes: VIX9D (9-day), VIX (30-day), VIX3M (3-month), and VIX6M (6-month) on the current timeframe. For each index,
6618-tracker overlays historical buy and sell transactions executed by ARK Invest funds directly onto the price chart using hardcoded labels. It visualizes daily buy and sell actions, displaying share volume, portfolio percentage weight, and trade counts for s
BinaryDecimalConversion is a Pine Script utility library designed for converting data between decimal integers and binary string representations. It exports functions to convert an integer value into a binary string and to parse a binary string back into a dec
This indicator uses a Lorentzian distance k-nearest neighbors classification algorithm to predict market direction based on up to five technical features, such as RSI, WaveTrend, CCI, and ADX. It compares current feature values against historical bar patterns
Swoosh Indicator is an overlay that marks directional conditions on the price chart. It checks whether four simple moving averages are stacked in order and whether the MACD line is above or below its signal line. When both agree, it plots a green up arrow belo
An educational Pine Script v4 indicator demonstrating how to plot volume histograms on the main price chart using unscaled axes. The code includes examples and commented templates for creating vertical line markers at specific dates or time zones, such as mark
A minimal boilerplate script written in Pine Script v6 for creating overlay indicators directly on the main price chart. It serves as a foundational starter file generated by the PineScript Agents development environment, designed to be populated with custom t
Williams %R (v.4) is a custom momentum indicator displayed in a separate pane that calculates a scaled Williams %R oscillator over a user-defined lookback period. It enhances standard analysis by layering a secondary confirmation feature—selectable among CCI,
A multi-timeframe Dollar Cost Averaging (DCA) trading strategy that combines signals from three RSI indicators, three CCI indicators, and Bollinger Bands. It places up to five weighted scale-in safety orders to lower the average entry price. The script offers
Calculates the Archer Moving Averages Trends (AMAT) indicator by comparing fast and slow Exponential Moving Averages (EMAs) alongside their slope directions. A bullish trend (+1) is identified when the fast EMA exceeds the slow EMA with both rising, while a be
The indicator detects liquidity sweeps across key price levels and calculates a cumulative volume delta proxy. It uses pivot high and low lookbacks to identify swing points, marking sweeps when price breaks beyond a level and quickly closes back inside. Featur
This indicator plots the close price in a separate pane and colors each value by the current candle. When the close is above the open it uses teal, and when the close is at or below the open it uses red. It has no user inputs and does not generate entries, exi
This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC
This indicator calculates an Exponential Moving Average and a Zero-Lag Moving Average to identify market trends on the price chart. It plots both moving averages and fills the space between them with color to highlight trend direction. Upon a crossover or cros
This indicator plots a standard MACD oscillator in a separate pane. It calculates the MACD line, signal line, and histogram from the close using fixed lengths of 12, 26, and 9. It draws the MACD line in blue and the signal line in orange, plus a column histogr
This strategy identifies long entry opportunities based on short-term price pullbacks below a major trend filter. It enters long when three consecutive lower closes occur below the 200-period simple moving average, followed by the current bar closing back abov
This indicator calculates Bollinger %B in a separate pane. It tracks a simple moving average and population-style variance of the selected source with a circular buffer and running sums, then places the source between the lower and upper bands scaled by the st
This overlay indicator maps a fixed New York session from 8:00 AM to 4:00 PM into an on-chart noon curve. It draws a range box, a solid noon line, and dashed quarter lines at 10:00 AM and 2:00 PM. It plots AM high and low lines plus offset likely AM levels at
This indicator plots five customizable moving averages from a chosen higher timeframe directly on the price chart. It does not provide trading signals, trade execution, or automated alerts. Users can configure the target resolution, adjust individual period le
This strategy designed for Binance SOLUSDTPERP futures trading generates entries based on pivot high and low support or resistance levels, a 3-period EMA, and a custom smoothed trend filter line. It opens long or short positions when price confirms movement re
This indicator plots retrograde periods for up to eight planets in a separate pane. It fills historical retrograde spans without a box limit and draws boxes for future projections out to a configurable number of bars. A histogram shows how many planets are ret
This indicator builds a table of relative strength for up to six user-chosen symbols against a benchmark, defaulting to SPY. It measures strength over four lookback periods, can average the visible periods, and can add relative volume as current volume divided
Auto Fib Retracement finds swing pivots on the price chart and draws Fibonacci retracement lines between the latest significant high and low. Deviation, scaled from ATR relative to price, and Depth decide how large a move must be before a new pivot replaces th
This indicator detects price swing legs using a threshold-reversal algorithm scaled to a multiple of the prior day's average daily range (ADR). When a leg completes, it plots up to six customizable pullback percentage levels directly on the price chart. Users
This Pine Script v5 library exports thin wrappers around built-in technical analysis functions. It covers moving averages, momentum measures such as RSI and CCI, volatility tools including ATR and standard deviation, range extremes, cross detection, and runnin
This indicator draws a two-by-two table in the top-right of the price chart and plots the close. On the last bar it writes labels into the first row and merges those two cells into one. There are no inputs and no trading signals, entries, exits, or risk rules.
Calculates the Stochastic RSI oscillator and automatically identifies regular and hidden bullish or bearish divergences against price movement. It detects pivot points in the oscillator line using configurable left and right lookback lengths and compares them
This indicator plots a Cipher B-style oscillator in a separate pane and can source its calculations from Heikin Ashi candles when that option is on. It draws WaveTrend lines with optional buy, gold, sell, and divergence dots, plus overbought and oversold level
MTF State of Delivery tracks lower timeframe and higher timeframe orderflow delivery states by identifying bullish and bearish delivery levels across timeframes. It plots confirmed and pending orderflow lines directly on the price chart and provides an optiona
This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona
Upstox Brokerage Calculator is an Indian equity brokerage and transaction fee calculation utility tool for TradingView. It uses customizable input parameters for position quantity, purchase price, and sale price to calculate estimated brokerage fees, regulator
This strategy combines the Relative Strength Index with Bollinger Bands to generate mean-reversion entries. It plots the RSI oscillator and threshold lines in a separate pane, while calculating hidden Bollinger Bands and band width. Long entries trigger when R
This price-chart strategy trades Donchian channel breakouts in the style of a Seykota trend system. It enters long or short when price touches the entry channel, using the bar high or low when intrabar mode is on, and can add units after further moves of a set
This indicator combines Centered Triangular Moving Average (TMA) bands offset by Average True Range (ATR) with Smart Money Concepts (SMC) market structure analysis on the price chart. It calculates upper, center, and lower bands alongside swing and internal ma
Trend Compass 15m is an intraday trend analysis overlay designed for 15-minute charts. It calculates a triple exponential moving average ribbon, higher-timeframe reference EMAs from 1H, 4H, and Daily periods, RSI and MACD divergences, On-Balance Volume trends,
This strategy trades bullish and bearish body engulfing patterns on the price chart. It allows longs only when price is above the 200-period exponential moving average and shorts only when price is below it. A long needs three consecutive red candles followed
This indicator identifies core Smart Money Concepts on the main price chart, focusing on Fair Value Gaps (FVGs), market structure, swing points, and Change in State of Delivery (CISD). It highlights bullish and bearish imbalances using dynamic boxes that can a
This strategy replays a fixed sequence of historical Bitcoin trades on the price chart instead of calculating indicators. It sends long and short orders at preset bar close times, prices, and quantities, then closes each numbered position at a later timestamp.
This indicator is a minimal example of dynamic alert messages. It plots the symbol's closing price in a separate pane under the title priceClose. It also declares one alert condition named Alert Close whose message inserts that plotted value and the ticker thr
This indicator calculates and aggregates Bitcoin derivatives volume across multiple cryptocurrency exchanges, including Binance, BitMEX, Deribit, Kraken, Huobi, and FTX. It fetches volume data using security calls for both USD and USDT perpetual pairs and plot
TPCharts Asia Extensions calculates and identifies horizontal price extension levels based on the high and low range of the Asian trading session defined in GMT hours. It projects session levels and extended target lines directly onto the main price chart alon
Candle Pressure & Response (JMA) evaluates price action dynamics by calculating bidirectional candle pressure, upper and lower wick rejection fractions, body efficiency, and range expansion metrics relative to ATR. Each output series is smoothed using a Jurik
QPulse is a multi-factor indicator that draws in a separate pane to evaluate market momentum, volume flow, and volatility dynamics. It calculates volume delta, a cumulative delta proxy, advanced adaptive ATR, and a hybrid volume-weighted RSI with overbought an
LuckyFX RBtrader strategy is a price-chart candle filter. It marks a bullish condition when the current candle is bullish, the previous candle is bearish, and optional checks pass: body size between a minimum and maximum share of the previous body, prior candl
This strategy calculates the Money Flow Index (MFI) to identify momentum shifts, overbought or oversold states, and price divergences. It opens long entries when MFI crosses above the oversold level or displays bullish divergence while under the midline. It en
This indicator calculates the Variance Ratio Test statistic to evaluate random walk behavior across multiple sampling periods. It computes log returns, base period variance over a specified lookback window, and scaled multi-period variances to determine test Z
ATX-Long-Term Strategy is an overlay strategy built around a selectable moving average, ATR, and ADX. Settings offer eight average types, including Tilson T3, an optional second average, Heikin-Ashi prices, and a custom timeframe. Separate ATR multipliers appl
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.