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 strategy calculates the difference between a fast RSI and a slow RSI to generate long trades. Within a configurable backtest date window, it enters a long position when the fast RSI equals or exceeds the slow RSI. It closes the position when the fast RSI
This indicator plots an adaptive trend channel and market profile directly on the price chart. It calculates linear regression channels either automatically or using a fixed bar period, with support for logarithmic scaling. The script divides the channel into
The Holt-Winters Moving Average (HWMA) indicator applies a triple exponential smoothing algorithm to track price trends by filtering noise while maintaining responsiveness. It computes level, velocity, and acceleration components from a chosen price source ove
Hull + Volatility + Boom Hunter is a strategy overlay that combines Hull Moving Average variations with Boom Hunter oscillator components. Drawn directly on the main price chart, it tracks market trend direction and momentum. Settings allow switching between s
This educational Pine Script indicator demonstrates how to plot custom price bars using the built-in plotbar function. The script determines whether the current bar is bullish or bearish by comparing the close price to the open price, applying a green or red c
A multi-part chart overlay that draws fan lines from short, mid and long lookback windows and shows a forecast label gated by a minimum confidence level. It adds head and shoulders and double top or bottom detection, a regime filter using ADX and a higher-time
Volatility Regime Lab ranks the current ATR against its own recent history and labels the market Quiet, Normal, or Wild. It shades the price-chart background by that regime. On the last bar it shows a table of how often each regime occurred, the average N-bar
This overlay indicator plots an anchored VWAP and marks reclaim setups on the price chart. It can signal a simple VWAP cross or a reclaim, retest, and breakout of a rolling pullback high or low, filtered by trade direction and optional matching VWAP slope. A p
A minimal strategy using MACD with fixed 12, 26 and 9 settings. It enters long when the MACD line crosses above the signal line and short when it crosses below, reversing the position each time. It has no inputs, no stop loss and no take profit. The script is
P_err_undefined_namespace_function is a Pine Script v6 syntax test fixture created for compiler and parser validation. The script attempts to call and plot an undefined function within the built-in technical analysis namespace. It is designed to verify proper
A strategy that trades around an anchored VWAP with standard-deviation bands. The VWAP can reset each session, week, month, quarter or year, with two adjustable band multipliers. A volume spike filter, a time-of-day filter with an optional lunch-hour exclusion
This indicator monitors and analyzes up to 20 cryptocurrency pairs across four core analytical dimensions: trend, momentum, volatility, and volume. It generates signals using several selectable modes, including single-factor triggers, simultaneous multi-method
Volume Power Zones {Morindok} is a price-chart overlay that divides a short lookback of candles, including the live bar, into several horizontal price zones. It draws outer boxes and zone boxes for the previous and current windows, and colors each zone as stro
A pivot and structure indicator on the price chart. It marks swing highs and lows with a configurable length, grades them against ATR, and can draw a zigzag, active horizontal levels, break of structure and change of character events, and missed reversals. A F
The bearish half of a split detection indicator that draws about thirty-six signals as plotted shapes on the price chart. It combines high-volume ladders from 50 to 1000 bars and all-time high volume with standard deviation displacement and a pullback-and-jump
A long-only breakout strategy built on a Donchian channel, 25 bars by default, drawn on the price chart as upper and lower lines. At a chosen exchange hour each day it places a buy stop at the previous upper band. The order is cancelled if not filled within a
A strategy version of a multi-timeframe breakout approach. It reads trend from 9 and 18 period EMAs on three higher timeframes, with the chart timeframe optional, and can trade long and short sides independently. Settings include a risk-to-reward target, a ris
A Pine Script v5 indicator in a separate pane, the fourth revision of a Hurst cycle peak marker. It runs the hl2 price through bandpass filters covering cycles from 1 day to 18 years, then draws labels and lines at detected peaks. Each cycle has separate bandw
The VWAP EMA Trend Continuation strategy plots VWAP and multiple EMAs on the price chart. It generates long signals on fast EMA crossover with VWAP or price crossover with both when in uptrend with volume filter and slope confirmation. Short signals mirror for
Combination by yzz is an overlay indicator that scans for regular and hidden divergences across multiple technical oscillators simultaneously, including RSI, MACD, Stochastic, CCI, OBV, CMF, MFI, Momentum, and VW-MACD. It identifies pivot points on price and i
Draws a single box on the price chart that represents one candle from a higher timeframe, using a custom type to hold its open, high, low and close. Past higher-timeframe candles are drawn as boxes when they complete, and the current one updates as price moves
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
A Pine v4 strategy using a 12/26 MACD, a 14-period RSI and rolling highs and lows over lookbacks of sixty and two hundred twenty bars. Inputs set take-profit and stop-loss percentages for longs and shorts, and a maximum of four adds. Counters of new highs and
The Holt Exponential Moving Average (HEMA) indicator calculates a trend-following line using double exponential smoothing. It accounts for both level smoothing via the alpha length and trend adjustment via the gamma length. The indicator overlays directly on t
This indicator calculates the Relative Strength Index from a chosen source and length and plots it in a separate pane with 70, 50, and 30 bands plus a background fill. It locates RSI pivot highs and lows, then draws regular and hidden bullish and bearish diver
This overlay indicator marks historical ARK Invest buy and sell activity for the stock ARCT on the price chart. It places dated labels above or below bars, colored red for sells and green for buys, with a same-day ETF count such as X1. An ETF setting switches
This Pine Script library provides helper functions to detect and validate harmonic patterns using price and time ratio calculations. It includes utilities to calculate price and time rates between consecutive pattern points, check if values fall within specifi
Snag - SPY is an overlay indicator that tracks market trends using three Weighted Moving Averages (WMA 13, WMA 48, and WMA 200). It plots the three WMAs directly on the main price chart and calculates crossovers between price and the moving averages, as well a
This indicator calculates and plots trend direction across four customizable timeframes in a separate pane. It evaluates whether the close is above or below a moving average for each timeframe, assigning directional values that sum into an aggregate alignment
This script plots pivot-based support and resistance levels on the price chart while generating directional trade labels tagged with RSI values to measure momentum at turning points. It overlays multi-timeframe open and close step lines with background fills t
Calculates the AlphaTrend indicator using ATR combined with the Money Flow Index or RSI, plotting the primary trend line and its two-bar lagged counterpart directly on the price chart. The strategy opens long positions when AlphaTrend crosses above its lagged
This indicator calculates the Chande Momentum Oscillator (CMO) to evaluate price momentum over a specified lookback period. It computes the difference between unsmoothed sums of positive and negative price changes using an efficient circular buffer implementat
This script calculates a 20-period Relative Strength Index (RSI) based on close prices and plots it in a separate pane with a fixed horizontal midline at level 50. It monitors for centerline crossings, displaying upward green triangles at the bottom when RSI c
This indicator plots a Hanning-window finite impulse response moving average of a selected price source on the price chart. It weights the lookback with the classic raised-cosine Hanning coefficients, rebuilds those weights when the effective window grows duri
Initial Balance Statistical Mapping plots the high, low, and midpoint of a defined initial balance session, such as the first hour of trading, directly on the main price chart. It projects statistical extension levels using fixed percentile multipliers (25th,
This indicator plots the Directional Movement Index in a separate pane. It calculates plus directional movement and minus directional movement from changes in highs and lows, smooths them with the DI length, and derives the ADX from the absolute difference of
This trend-following strategy generates long and short breakout signals using volatility channels plotted around a simple moving average. It calculates ATR bands for entries and trailing exits, calculating position sizing based on account equity and ATR risk p
This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters
Calculates a composite carry and decay oscillator fusing impulse-autocorrelation half-life, a Hurst exponent approximation, path efficiency, and range expansion ratios. It evaluates whether an impulse is likely to persist or mean-revert, plotting the oscillato
This indicator tracks breakouts to new highs along with intermediate pullbacks directly on the main price chart. It measures pullback depths, recovery durations, and distance between consecutive breakouts using custom user-defined data structures. The primary
Apex Protocol - The SMC Engine is a Smart Money Concepts indicator designed for price chart analysis across multiple timeframes. It automatically detects key SMC market structure events including Break of Structure (BOS), Market Structure Shifts (MSS), Order B
This short-only strategy combines multi-timeframe exponential moving averages with MACD crossovers to find bearish trade opportunities. It calculates and plots two higher-timeframe EMAs directly on the price chart while monitoring MACD line crosses and zero-li
The indicator calculates classic pivot points from the previous day's high, low, and close using request.security. It plots the central pivot (PP) along with resistance levels R1 R2 R3 and support levels S1 S2 S3 directly on the price chart. The only setting s
The CSW Ø-Lag Oscillator is a modified MACD indicator designed to reduce lag using zero-lag moving averages and a custom leader calculation. It plots a zero-lag line, a lagging signal line, and a histogram in a separate pane. The oscillator uses three distinct
This indicator scans multiple symbols using RSI for overbought and oversold levels, TSI for trend strength, ADX for trend direction and strength, and Supertrend for trend reversals. It plots buy and sell signals on the price chart for each enabled symbol based
SSL Algo calculates and displays multi-moving-average SSL hybrid channels directly on the price chart. It combines a customizable baseline, a continuation channel, an exit indicator, and optional ATR bands alongside support EMAs. Users can toggle baseline line
This indicator plots ICT balanced price ranges together with fair value gaps and inversion fair value gaps on the price chart. It marks bullish and bearish BPR zones and optional FVG and IFVG boxes, then tracks mitigation at a proximal, midpoint, or distal lev
This strategy adaptation of LazyBear's Squeeze Momentum Indicator combines Bollinger Bands and Keltner Channels to identify periods of market squeeze followed by expansion. It calculates linear regression momentum and plots a color-coded histogram in a separat
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.