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.
This strategy implements Linda Raschke's classic trend pullback setup. It measures market trend strength using the ADX indicator and identifies pullbacks to an Exponential Moving Average (EMA). When ADX exceeds a specified threshold and price touches the EMA,
SMC Exit Signal is an overlay companion indicator that manages position lifecycle states driven by external Smart Money Concepts engine outputs. It monitors trigger levels, stops, and take-profit targets to track active trades directly on the chart. It can dyn
This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses
This Pine Script v6 indicator tests every supported input type including integers floats booleans strings textareas sources colors times prices symbols timeframes and sessions. It sums all selected input values then plots that total along with the close price
This indicator calculates the distance in ATR units to the nearest higher timeframe OHLC level from the current close price. It identifies the closest level above or below the price and computes the average of near and big levels distances. The script plots we
This indicator calculates and plots mirrored price action and fractal pivot points directly on the price chart overlay. Users set two mirror price levels and anchor times interactively on the chart. The script then projects inverted price candles based on refl
Types Demo is an educational indicator designed to illustrate fundamental Pine Script variable types, including boolean, integer, float, string, and color. It checks whether the current bar is bullish and plots the closing price in green within a separate pane
This Pine Script v6 strategy plots fast and slow moving average crossovers on the price chart to generate buy and sell signals. It calculates EMA or alternative MA types on a selectable source and triggers entries when the lines cross, subject to confluence fi
This strategy models a zero-days-to-expiration (0DTE) Opening Range fade system on the price chart, designed around Mini-SPX index options. It calculates an opening range box and gauges directional sentiment from an external symbol like ES futures. Bullish con
REQ TEST is a minimal diagnostic utility indicator that tests external symbol data accessibility using security requests. It fetches daily closing price data for specified US market tickers including major index ETFs and market indicators such as SPY, QQQ, XLK
Composite Price Stats is a trend-following overlay strategy that evaluates statistical metrics on price components. It calculates cumulative true range, variance, deviation, and ADX on hlc3 price data, while plotting an averaged price series. Long entries trig
This Pine Script strategy combines bullish and bearish engulfing candlestick patterns detected on the price chart with a stochastic oscillator for entry signals. The stochastic is calculated using inputs for K period, D period, and smoothing. Long entries trig
This indicator computes the Kalman filter applied to the chosen source to measure trend strength and generate oscillator values. It plots these values along with optional ZigZag swing points in a separate pane. The script overlays PO3 ghost candles from a high
This strategy trades intraday price interactions with the Volume Weighted Average Price (VWAP). It offers bounce and crossover entry modes, filtered by an Exponential Moving Average trend filter and a customizable trading session window. Stop loss levels are c
Calculates volatility bands using a simple moving average and standard deviation, coupled with Average True Range for risk control. It enters long positions when price crosses back above the lower band and short positions when price crosses back below the uppe
This indicator overlays statistical standard deviation bands around a basis (SMA or VWAP) and generates momentum-filtered breakout and pullback signals during a specified trading session. Long and short signals trigger on band crosses confirmed by Heikin Ashi
This indicator plots an overlay version of the MACD directly on the main price chart alongside optional Zigzag multi-depth calculations and pivot analysis. It calculates traditional, histogram-based, leader, or source-based MACD oscillators and displays signal
This indicator calculates a standard Supertrend using an ATR period of 10 and a multiplier factor of 3. It plots the trendline directly on the price chart, coloring it green for uptrends and red for downtrends, alongside semi-transparent background fills to th
This educational indicator illustrates how variable persistence functions across historical and real-time bars. It maintains three counters: a standard bar counter using the var keyword, a tick counter using varip that increments on every intrabar update witho
This indicator is built for a separate pane and compares Bollinger Bands with three Keltner Channel widths to mark low, mid, and high squeeze conditions. Length, price source, and moving-average type for both calculations are selectable among SMA, EMA, WMA, VW
Calculates two TRIX (Triple Exponential Average) lines based on logarithmic close prices over different lookback periods. The fast TRIX uses a primary period length, while the slow TRIX adds an offset factor to determine its longer period length. Both TRIX lin
This script provides a developer testing framework for Pine Script v5 that executes custom test suites and assertions. It logs test specifications, skips marked tests, and evaluates array equality across data types. The tool renders a visual test reporter dire
This overlay indicator screens a pasted list of symbols for ICT market structure shifts, or for retracements toward an optimal trade entry or order block. It uses a zig zag built from highs and lows or opens and closes, then lists matching bullish and bearish
Strategy Tester is an overlay trading strategy that combines linear regression momentum, Directional Movement Index (DMI), and Average True Range (ATR) volatility levels. It seeks long entry setups when pivot highs form on the custom momentum oscillator while
ACHR Tracker visualizes historical buy and sell transactions made by ARK Invest funds for Archer Aviation (ACHR). It plots colored labels directly on the price chart at historical timestamps, indicating whether ARK ETFs purchased or sold shares and showing the
DebugConsole is a Pine Script v5 library that stores debug text in a fixed-length string array and shows it in a single chart table cell. init creates a bottom-left table and an empty line buffer whose size defaults to 20. queue drops the oldest line and appen
This strategy overlays a volume-weighted moving average of open prices and standard-deviation bands on the ES futures chart, aimed at the one-minute timeframe. It requests open and low from several higher timeframes with lookahead enabled. Percentage inputs se
STRG-HOLP is a trading strategy that identifies High of Low Period (HOLP) and Low of High Period (LOHP) breakout setups. It tracks the lowest low or highest high over a user-defined lookback window. A long trade opens when the close breaks above the high of th
This educational indicator detects local swing highs across a rolling nine-bar window. It checks whether the high from four bars ago equals the highest high of the nine-bar period. When confirmed, it plots an asterisk and the letter H directly on the price cha
Calculates consecutive bar sequences that fail to create new price extremes and identifies potential reversal breakout points. When a run breaks, the script plots measured move projection arrows, high-water mark lines, and Fibonacci levels directly on the pric
This indicator overlay generates buy and sell signals based on Aroon extreme levels combined with optional volume or volatility filters. It calculates Aroon Up and Aroon Down lines using localized high and low lookbacks, generating trade entries when Aroon rea
This strategy plots 50-, 100- and 200-period simple moving averages on the price chart. After a user-chosen start date, it enters a long position when the 50-period average crosses above the 100-period average, using 100 percent of equity. A short order is cod
Calculates and plots an Autoregressive Finite Impulse Response (AFIRMA) moving average directly on the price chart. It weights historical price data using selectable windowing functions, including Hanning, Hamming, Blackman, and Blackman-Harris filters. An opt
This indicator draws a separate OHLC bar series in its own pane using plotbar. Each bar is colored lime when the close is greater than or equal to the open, and red when the close is below the open. It has no user inputs, no signals, and no entry, exit, stop,
This strategy template implements an EMA trend filter paired with MACD momentum confirmations. Long positions trigger when the fast EMA is above the slow EMA alongside a bullish MACD crossover and positive histogram, while short positions require the reverse.
This overlay indicator maps market structure and draws supply and demand zones on the price chart. It marks swing points, optional structure mapping, sweep marks, and bubbles, and can color candles from its trend detection. It plots the last selected order blo
Simple RSI calculates and plots the standard Relative Strength Index oscillator in a separate pane. It tracks price momentum based on a user-defined calculation length, defaulting to 13 bars, applied to a selectable price source such as the close. Dashed horiz
This overlay indicator calculates the 14-period Relative Strength Index to identify overbought and oversold market conditions. When RSI crosses key thresholds, it plots initial long or short entry labels directly on the price chart. If price continues moving a
Calculates the Composite Fractal Behavior metric across multiple depth tiers to analyze trend persistence and cycle behavior. It evaluates fractal pattern ratios across logarithmic period steps, smooths the resulting index, and applies Jurik Moving Average fil
Session Raid Stats highlights custom session price ranges and projects range extension lines at fixed point intervals above and below session highs and lows. It identifies liquidity raids exceeding user-defined point thresholds within a specified time cutoff f
This overlay indicator marks Williams fractal highs and lows on the price chart. It compares each bar’s high and low with a user-set number of bars on either side and plots a tiny triangle above a confirmed up fractal and below a confirmed down fractal. The on
Donald - AI Futures is a price-chart strategy that estimates inner and outer high-low zones and a smoothed close with rational quadratic kernel regression. It builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving
This indicator plots the Awesome Oscillator in a separate pane. It subtracts a 34-period simple moving average of the high-low midpoint from a 5-period simple moving average of the same midpoint. Rising bars are drawn as teal columns and falling bars as red co
Zen Trading Toolkit is an overlay indicator that plots average bar range measured-move targets from the prior regular-hours close, plus optional yesterday high, low, close and range projections. It draws an N-bar opening-range box and a volatility table of ave
This indicator identifies and plots bullish and bearish Fair Value Gaps (FVG) directly on the price chart. It detects three-bar imbalances where gaps occur between the high of the first candle and the low of the third candle, or vice versa. The tool includes a
KC15 is a price-chart strategy that configures two moving averages, a Bollinger Band Width Percentile filter, and PMARP entry and exit thresholds for long and short trades. Users can switch each average between SMA and EMA, set lengths and colors, and toggle l
The Trailing Drawdown indicator calculates and visualizes the percentage drop of a price series from its peak over a user-specified lookback period. It tracks maximum price levels within a rolling window and measures the current deviation from those peaks. Tra
This strategy plots Bollinger Bands on the price chart and calculates RSI plus Bollinger Band width from one shared length. It enters long when band width crosses under 0.01, with a stop order at the lower band. It adds short orders when price crosses the uppe
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.