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 short-only trading strategy combines a 200-period Exponential Moving Average, a Stochastic RSI oscillator, and three distinct Supertrend indicators on the price chart. It evaluates price trend relative to the 200 EMA alongside Stochastic RSI crossunder co
The AG TrendPullback Short strategy identifies short pullback opportunities in downtrending markets. It calculates EMA50 and EMA200 crossovers, RSI2 overbought signals above 90, and ADX trend strength above 20. When these align, it enters a short position size
This library supplies reusable drawing helpers rather than its own indicator output. It draws take-profit and stop-loss levels around an entry price, with translucent fills between those levels and the close, and it can remove those drawings. It also plots a t
This strategy trades alignment of three simple moving averages on the price chart. A long opens when the short average crosses above the middle average while price stays above the long average. The opposite cross closes that long and opens a short. Length, sto
This strategy trades crude oil futures only during the New York session from 09:00 to 14:30. It enters long when a fast EMA crosses above a slow EMA and short on the opposite cross, and only while that session is open. Each entry sets an ATR-based stop loss an
This educational strategy demonstrates basic Smart Money Concepts using breakout logic. It calculates rolling highest highs and lowest lows over a fixed 20-bar lookback to represent liquidity levels and detect Break of Structure (BOS). It enters a long positio
Calculates swing highs and lows using pivot point detection to map market structure on the price chart. It categorizes pivots as Higher Highs, Lower Highs, Higher Lows, or Lower Lows, while connecting swing points with trend lines. A top-left dashboard label d
This indicator scans up to ten user-selected symbols for regular RSI divergence and for RSI extremes. It compares confirmed pivot lows and highs in price and a 14-period RSI, then sends a bullish alert on a price lower low with an RSI higher low and a bearish
MUSLUCA-V2 is an overlay indicator that plots higher-timeframe moving averages on the price chart. It draws an 8-period and a 55-period exponential moving average from the four-hour timeframe, an 8-period daily exponential moving average, and 9-period and 15-p
This strategy calculates a 20-period volume-weighted moving average of the low, a 200-period Hull moving average of the high, and 25-period highest close values. It enters a long position when the high breaks above the previous highest close while the close re
An overlay indicator that calculates multi-timeframe market conditions and displays them in an information panel on the price chart. It evaluates timeframe metrics such as 15-minute and 1-hour periods to monitor RSI values, support and resistance levels, and r
This indicator overlays multi-timeframe exponential moving averages and channel zones directly on the price chart. It calculates a weekly 14-period EMA, monthly 9-period and 14-period EMAs, along with a configurable 233-period high-low EMA channel with a shade
This indicator plots five exponential moving averages on the price chart alongside calculated ATR and fast MACD values. It signals entries when an aligned EMA crossover and a MACD crossover coincide within a window of three bars. It also calculates reference s
This indicator plots an average daily range from hourly high-low ranges stored for each hour across a selectable number of days. It highlights time sessions on the price chart and can show a timeline and the current range box. Optional filters use a volatility
This overlay indicator is a Phase 3 debug demonstration. It exposes toggles for memory profiling, code coverage, test-data collection, and benchmarking, plus a debug level and a maximum bar count. Minimal helper functions estimate memory use, count function ca
This indicator calculates and plots ADX values on a separate pane to gauge overall trend strength from 0 to 100. It combines ADX with DI+ and DI- to classify trends as Strong, Moderate, or Weak based on input thresholds. The script identifies bullish and beari
This strategy executes gap breakout entries directly on the price chart, opening long positions when the current open exceeds the prior high and short positions when the open drops below the prior low. It overlays a custom Supertrend filter, an EMA cloud, a Pa
BTMM Master Dashboard displays a comprehensive monitoring interface on the main price chart based on Steve Mauro's Beat The Market Maker (BTMM) methodology. It aggregates system status, a market clock, key price levels, and signal fusion confluence metrics int
This Pine Script library provides a custom calculation of the Parabolic Stop and Reverse indicator. The exported function accepts parameters for the starting acceleration factor, increment step, and maximum acceleration limit. It evaluates bar highs, lows, and
J's Composite Index combines RSI momentum with simple moving averages in a separate pane. It calculates an unbounded momentum RSI value by adding the bar-over-bar change of a 14-period RSI to a 3-period simple moving average of a 3-period RSI. The indicator pl
The script calculates and plots relative currency strengths for major pairs including EUR, USD, JPY, GBP, CHF, AUD, CAD and NZD in a separate pane. Strength is derived from RSI, CCI, Stochastics or raw Price source, optionally smoothed and filtered by length.
This indicator colors the chart background on intraday timeframes based on the current hour of the day. It applies a continuous 24-color daily gradient transitioning across dawn, day, dusk, and night to help traders visually track time progression. Users can f
This trend-following strategy plots on the price chart and identifies continuation trades during established trends. It calculates dual exponential moving averages alongside an average directional index filter. Entries trigger when price pulls back into the mo
This indicator calculates price midpoints derived from the highest high and lowest low over a customizable base period. It evaluates these range boundaries across the current chart timeframe as well as dynamically scaled 2x and 4x higher timeframes via multi-t
Squeeze Momentum Pro plots a TTM-style volatility squeeze in a separate pane. It compares Bollinger Bands with three Keltner Channel widths to mark wide, normal, and tight compression, and it flags the bar when a normal squeeze releases. A linear-regression mo
MirPapa_Handler_HTF is a Pine Script v6 utility library designed for handling higher timeframe conversions and multi-timeframe data retrieval. It converts standard timeframe strings into minute counts, computes the numerical ratio between higher and lower time
This strategy plots up to three double exponential moving averages on the price chart and looks for crossovers and crossunders between them. With the default lengths, the fastest DEMA crossing the second DEMA is the signal; a third length of zero is ignored, a
The Market Tail Risk Detector evaluates market fragility and compression to identify environments preceding volatile price moves. It calculates a composite tail risk score ranging from 0 to 100 based on realized volatility percentiles, volatility of volatility
This strategy executes trend-following and scalping trades for XAUUSD using a combination of Stochastic, RSI, moving averages (EMA 20/50/200), ATR, and Fibonacci zones. It features confirmation and scalp signal modes, evaluating overbought/oversold conditions
Lakshmi Zones v1 is an indicator that plots demand and supply zones on the price chart. It calculates volume profile zones with user-defined bin counts and lookback periods, fair value gaps from the 4H timeframe, and equal highs and lows using tolerance percen
This strategy calculates the WaveTrend oscillator using exponential moving averages of typical price and plots two signal lines alongside overbought and oversold thresholds in a separate pane. It enters long positions when the primary line crosses above the si
This Pine Script indicator calculates Z-Score based bands for grid trading using a user-selectable moving average. It computes the MA from chosen type, length and source then derives upper and lower bands offset by stddevs. Grid ranges are set by min and max w
This indicator monitors market-wide positioning across major cryptocurrency benchmarks and top altcoins. It calculates the Relative Strength Index and Z-scores across up to 19 assets, mapping them into quadrant zones to identify overbought or oversold crowding
The Average True Range indicator calculates volatility by averaging the true range over a user-defined length. It plots the ATR value as a line in a separate pane below the price chart. The length input sets the period for the calculation, defaulting to 14 bar
This indicator blends a modified multi-timeframe RSI and Quantitative Qualitative Estimation (QQE) logic with an ATR-based Supertrend overlay on the price chart. Users can select between Wilders and Cutlers RSI calculations, adjust the multi-timeframe length m
Data Panel calculates and displays fundamental financial metrics and closing range percentages directly on the price chart in an organized table. It requests financial metrics such as basic earnings per share, total revenue, net income, and total equity across
DataCleaner is a Pine Script utility library providing functions to calculate outlier levels and generate cleaned versions of input data series. It utilizes moving averages and standard deviations to detect extreme statistical deviations, replace outlier value
Relative Volume calculates an exponential moving average and standard deviation of volume over a user-defined lookback period to identify statistical volume anomalies. When volume exceeds standard deviation thresholds and meets a minimum volume level, the indi
This indicator highlights buy setups on the chart when price is trending above an exponential moving average and the Relative Strength Index falls within a narrow neutral-to-bullish zone. When the closing price is above the configured EMA and the RSI is betwee
The HTF Candles & Pivots indicator plots higher timeframe candles alongside traditional pivot points, support and resistance levels on the current price chart. It calculates open, high, low, and close values from a user-selected timeframe and displays them wit
The Moving Average Based Zig Zag indicator computes a smoothed price series with a volume-weighted Hull Moving Average applied to the chosen pivot source, either high-low or open-close. It detects pivot highs and lows on this moving average to construct a conn
This strategy serves as a backtesting boilerplate and starter template using normalized price metrics. It calculates normalized high and low values across user-defined lookback periods to establish directional bias and evaluate divergence thresholds. Users can
This strategy plots a range filter and high and low target bands on the price chart, and colors bars from filter direction. Inputs cover a backtest date window, WaveTrend Cipher B channel and average lengths, overbought and oversold levels, divergence threshol
This strategy detects large and smaller fractals on the price chart by comparing highs or lows across a configurable number of bars. It tracks recent fractal levels, draws optional retest lines, and marks a retest signal when price returns a set percentage of
The script plots the Volume Weighted Average Price on the price chart. It calculates VWAP using a specified source such as hlc3 and an anchor period like Session, Week, Month or Quarter. The main settings control whether to hide the VWAP on daily or weekly tim
An indicator that detects cup and handle patterns from pivots, with inputs for rim similarity, handle retracement range, an invalidation retrace level and a target set as a multiple of cup depth. A Bayesian probability update using a Bollinger squeeze as evide
Draws daily pivot levels on the price chart: open, pivot point, value area high and low, support and resistance, and a dynamic VWAP, with labels showing prices. A swing-based Fibonacci confluence feature marks where fib levels line up with the zones. Settings
A low-turnover long-or-cash strategy on daily closes. It goes long when the close is above a 200-bar SMA by more than a percentage band, moves to cash when the close is below it by more than the band, and otherwise keeps the existing position. The band reduces
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.