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.
A long-only strategy for stocks that enters when the close is above both a 50-period and a 200-period SMA, RSI is above a set minimum, volume exceeds a multiple of its average, price has stayed above the 50 SMA for several bars and dollar volume passes a floor
An indicator that combines several normalised oscillators, namely RSI, CCI, Fisher, DMI, Z-Score and a moving-average ratio, into one composite, then groups values into clusters over a rolling lookback. Lower and upper percentile settings mark extreme zones, a
This indicator draws up to six configurable moving averages on the price chart. Each has its own type (SMA, EMA, SMMA, WMA or VWMA), length, source, offset and optional higher timeframe. Defaults are 50 and 200 averages on the chart timeframe plus hourly 21 EM
Compact visual companion that labels market structure on the price chart using fractal pivots: break of structure, change of character and market structure shift, with a sweep lookback for liquidity sweeps. It can mark CISD displacement candles, where a body e
A strategy version of a price-action signal set with eleven switchable entry setups, such as trend breakout, trend pullback, false breakout of a key level, range edge, breakout retest and double top or bottom. Levels come from clustered swing points, with 20,
A long-only first-hour breakout strategy for Nasdaq futures on the 15-minute chart. It records the 9:30 to 10:30 New York range, then enters at the close of the first bar after 10:30 that closes above it while price is above a 50-period EMA. The stop is an ATR
Beginner EMA + RSI + ATR is a long-only trend-following strategy plotted directly on the price chart. It identifies an uptrend when the 50-period EMA trades above the 200-period EMA, triggering long entries when the 14-period RSI crosses above the 50 centerlin
Kill Zone Liquidity Sweeps tracks the Asian trading session high and low prices and monitors for liquidity sweeps during the London session. When price temporarily breaches the prior Asian high or low during the London kill zone but closes back within the rang
Indicatorv5SMC / ICT / price actionSessions & time
Marks break of structure events on the price chart, based on swing pivots found with a leg-detection routine. It tracks two structure levels: a swing level with a default length of 50 and an internal level with a default length of 5. Each can be shown or hidde
A combined overlay for the price chart that joins an ATR Trend module with a smart money concepts module. The trend line is built from an ATR band with ten smoothing types, a fast trend, an optional smoothed range channel and buy and sell markers on trend flip
An overlay indicator that shades four trading sessions, New York, London, Tokyo and Sydney, with editable hours, colours, labels, range boxes and dividers. It also detects pivot-based order blocks and draws them on the chart, with a mitigation setting that dec
Detects bullish and bearish order block zones from swing structure and draws them as boxes on the price chart. Each zone can carry volume information and an optional mirrored volume bar. Settings control swing length, how many zones are shown, whether a Wick o
A strategy version of an oscillator indicator built on a channel length, average length and short length. It opens long and short positions from the oscillator signals, uses 10 percent of equity per order and allows a very high pyramiding count, so many same-d
An indicator in a separate pane that builds volume profiles from cumulative volume delta using lower-timeframe volume. A model setting switches between CVD, imbalance ratio, activity and USD volume. Profiles reset daily or from a fixed start time, with an adju
This strategy trades reversal candlestick patterns such as hammer, doji, engulfing, stars, harami, piercing line and shooting star on the price chart. Pattern strength, ratios and size are adjustable, and optional filters use volume, a trend EMA, RSI, moving a
Estimates the mean-reversion half-life of price in bars by fitting an Ornstein-Uhlenbeck model with a rolling regression on log prices. A lookback input sets how many bars feed the regression, and the half-life is capped for display. Optional bands show the me
My TPO is an overlay market profile indicator that builds time price opportunity profiles for each four-hour, daily or weekly period and draws them on the price chart. It plots the point of control, value area high and low with a configurable percentage, an in
This Pine Script strategy detects ICT smart money concepts including order test zones, fair value gaps, and wicks on BTC and XAUUSD price charts. It calculates swings using pivot high and low. Signals enter long or short when the order test zone is hit with su
A long-only strategy that combines a market breadth index, the percentage of stocks above their 50-day average, with a long moving average of 225 periods. When price is above the average, it buys if breadth drops below 25. In bear mode, which is off by default
This indicator marks bullish and bearish engulfing candles on the price chart. A bullish signal needs a green candle that engulfs the prior red candle, volume above the previous bar, and a prior downtrend over a user-set lookback. A bearish signal needs the op
The NQ SSR Strategy is a trading strategy for Nasdaq futures contracts. It generates buy and sell signals based on multi-timeframe pivot high and low detection across 4H, 1H and 5M timeframes. Signals are plotted directly on the price chart as entry and exit p
Risk & Lot Calculator is an overlay position-sizing tool for forex. The user sets an entry time, entry price and stop loss on the chart, plus account balance and risk percentage. The script draws the stop and two take-profit levels, from reward-to-risk ratios
Overlays fast, slow and trend EMAs with an optional cloud, cross triangles and volume spike markers on the price chart, and pulls spot gold, silver and a list of ASX gold and silver miners through security requests. A table summarises daily change, RSI, volume
A strategy for automated order routing that formats alert messages for a MetaTrader connector service. Inputs cover a license identifier field, symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage. Selected i
A stock-oriented strategy that scores each bar from minus 100 to plus 100 by combining RSI, an impulse MACD, VIDYA, volume spikes, a spread and wick proxy for market depth, and sector ETF strength against a benchmark. Buy entries need the score above a thresho
An overlay indicator that builds a volume profile on the price chart over the visible range, a fixed number of bars or a custom time span. Rows split volume into buy and sell parts, and the script marks the point of control, value area high and low, buy and se
BTC ATH Golden Cycle is a long-only position trading strategy designed for Bitcoin. It tracks price drawdowns relative to All-Time High (ATH) levels to execute a five-stage dollar-cost averaging entry schedule. As prices decline by configurable percentage tier
An indicator for one-hour charts that plots a Donchian channel from the highest high and lowest low over a set number of bars. A close beyond the prior channel edge marks a long or short breakout, and an ATR-multiple trailing stop line tracks the exit. An opti
A Pine v6 indicator that combines two smart money tools on the price chart. It finds supply and demand zones from an impulse, base candles, impulse pattern measured against ATR, and it marks breaker blocks, which are order blocks that price later closes throug
A price-chart overlay for DAX, based on the Advanced School Run Strategy. Inside a configurable session window in Berlin time, it numbers the opening five candles, takes the fourth candle's high and low and draws buy and sell breakout lines offset by a buffer
This indicator serves as a validation test suite for the McClellan Oscillator. It fetches NYSE advancing and declining issues data and computes the oscillator using ratio-adjusted net advances. The script cross-checks manual EMA calculations against ta.ema for
This strategy identifies the Initial Balance session on the chart and detects confluence with VWAP levels for trade signals. It enters positions when price shows rejection at the confluence zone via a candle with sufficient wick to body ratio. The main setting
This strategy implements the classic Turtle Trading System using Donchian channels. It enters long when the price breaks above the upper entry channel and short when it breaks below the lower channel, with an optional filter that skips signals following a winn
Draws a standard 12, 26, 9 MACD with signal line and histogram in a separate pane, together with a 200-period EMA used as a trend filter. A buy label appears when MACD crosses above its signal while price is above the EMA, and a sell label when it crosses belo
A separate-pane tool that looks for potential reversals by combining momentum, volume and candle shape. It uses RSI, MACD and a stochastic reading for momentum, volume spikes and dry-ups against a volume average, Bollinger Band extremes, wick rejection and eng
Buy/Sell Signals - Multi-Condition combines the Relative Strength Index (RSI) with fast and slow Exponential Moving Averages (EMA) to identify trend pullback opportunities. It displays buy signals when the RSI drops below an oversold threshold during an establ
A Pine v5 strategy that trades engulfing candle patterns on the price chart. A pattern needs the current body to cover a set percentage of the previous body, with options for opposite color, doji handling and a maximum previous body size in ATR. Optional confi
Plots the Relative Strength Index in a separate pane with adjustable period, optional EMA smoothing and an optional higher timeframe calculation. Overbought and oversold lines are drawn at configurable levels, defaulting to 70 and 30. It has no entry or exit r
A Pine v5 long-only strategy that buys when RSI falls below an entry level and then trails an exit level behind the highest close using an ATR multiple. The position is closed when the close drops below that trailing level, which is drawn as a red line on the
A price-chart indicator that combines an opening-range style bias with a candle range trigger. It compares a lower-timeframe pulse against the previous closed candle's high and low on several higher timeframes, counts disagreements and accepts a signal only wi
A price-chart overlay that draws a static set of options gamma levels for MES (Micro E-mini S&P 500 futures, scaled from SPY options) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated
This strategy demonstrates a training, testing, and deployment lifecycle for Pine Script strategies. It calculates a simple moving average (SMA 20) and generates buy signals on crossover. The runMode input selects between Training, Testing, and Deployment. In
A long-only strategy generated from the TrendLab research project, drawn on the price chart. It calculates the Parabolic SAR with acceleration start 0.01, step 0.08 and maximum 0.37. It buys when the close crosses above the SAR and closes the position when the
An overlay indicator that detects turtle soup setups, where price takes out a higher-timeframe pivot high or low and then reverses. It uses an imported price action library for market structure, with separate pivot lengths for the trend structure and for the l
Reports how volatile each part of the trading day has been, shown as columns in a separate pane. It groups intraday bars by time slot and compares their ranges using a daily ATR period, defaulting to 20. The output can be set to median, with high and low volat
This indicator draws a trading range box on the price chart, based on a rolling lookback, the previous day or the previous week. Inside it, it marks golden pocket Fibonacci zones, liquidity areas near the range extremes and fair value gaps that extend a set nu
This indicator calculates and plots Momentum, an exponential moving average of momentum, the Relative Strength Index (RSI), and KDJ oscillator lines in a separate pane. It evaluates Bollinger Band bandwidth expansion alongside momentum acceleration to generate
A monthly rotation strategy based on the global equity momentum approach. It requests monthly closes for a US equity ETF, an international equity ETF and a bond ETF, compares their returns over a lookback in months and checks the stronger equity against a manu
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.