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 price-chart overlay that builds a trailing line from Bollinger Bands calculated on highs and lows. The line follows the lower band while price is above it and the upper band while price is below, flipping colour when price crosses. Each flip can draw a zigza
This strategy tracks trends by comparing higher-timeframe open and close prices fetched via security calls. When the higher-timeframe close crosses above the open, a buy signal triggers, and a cross below triggers a sell signal, plotted with chart labels and c
A very simple strategy that opens a long position when the close has fallen for six bars in a row, and closes it on the first bar that closes higher than the previous bar. It sizes each trade at all of the account equity and has no stop loss or take profit. Th
This indicator scans each bar for a handful of candlestick patterns and marks them on the price chart with small symbols. It checks Doji, Hammer, Inverted Hammer, Shooting Star, Hanging Man, Bullish and Bearish Engulfing, Morning Star and Evening Star. Context
The Engulf Indicator calculates a custom candlestick metric in a separate pane by evaluating the ratio of candle body size to total candle range, comparing it with the previous bar's body size, and normalizing the result with the Average True Range (ATR). It p
An overlay indicator that draws Bollinger-style bands around a 20-period simple moving average using four standard deviation multipliers based on Fibonacci ratios: 2, 2.618, 3.618 and 4.618 by default. Upper bands are red and lower bands green, and the outermo
A multi-entry strategy combining a moving average cross, Bollinger Band touches and an optional SuperTrend confirmation. Extra orders can open when price reaches chosen outer bands, up to three entries in the same direction. Take-profit levels use standard dev
Wonverine - Lines calculates and plots multiple Simple Moving Averages (SMA) and Exponential Moving Averages (EMA) directly on the main price chart. It features predefined periods including 20, 50, 100, 200, and 500 bars to help identify short-term, medium-ter
This indicator retrieves fundamental financial metrics and calculates valuation ratios for equity analysis in a separate pane. It fetches return on equity, earnings per share, and book value per share to compute price-to-earnings, price-to-book, and the ratio
A chart indicator built on Ichimoku-style components, with short-term, mid-term and long-term equilibrium lines, a lagging span and a cloud called the resistance band. It shows entry and exit signals and plans position size from an account size and maximum ris
This indicator plots five distinct exponential moving averages directly on the price chart. It calculates EMAs using bar close prices across lengths of 9, 20, 50, 100, and 200, displaying each line in a dedicated color for visual trend identification. Despite
Schaff Trend Cycle is a trend following indicator that computes a smoothed version of the MACD difference between fast and slow EMAs applied to close prices. It normalizes this difference over a specified length, applies iterative smoothing, and plots the resu
This strategy generates trading signals using simple moving average crossovers combined with closed trade results. It opens a long position when a 14-period simple moving average crosses above a 28-period simple moving average, and opens a short position when
An indicator in a separate pane that estimates annualised volatility with a barrier method. It resets a price barrier whenever high or low moves beyond a set fractional distance, records how long each exit took, averages those times over a window, and converts
Strategy that trades crossovers of a 7-period and a 25-period EMA, filtered by a 200-period EMA: longs when the fast line crosses above and the slow line is above the trend line, shorts in the opposite case. Stop loss uses an ATR multiple, with a risk-reward t
A strategy that scores MACD, on-balance volume, ADX and DMI conditions into a single value and trades on that value. Inputs set long entry and exit thresholds and short entry and exit thresholds, along with DMI and ADX lengths and signal levels. Long and short
This indicator plots three moving averages on the price chart: a 36-period exponential average in red, a 200-period exponential average in yellow and a 200-period simple average in purple. The area between the 200 EMA and the 200 SMA is shaded. Lengths and col
This indicator overlays linear regression candles and a UT Bot style ATR trailing stop on the price chart. When linear regression is enabled, open, high, low and close are replaced by regression values, and rising candles are green while falling candles are re
A separate-pane port of the LazyBear WaveTrend oscillator. It plots a fast and a slow line, overbought and oversold levels, a shaded difference area and circle markers where the lines cross, coloured by direction, and also colours the cross bars. Channel and a
X Trend is an overlay strategy that identifies trend direction and potential entry points using a custom X Trend trailing line, exponential moving averages, and Half Trend calculations. It includes optional Impulse MACD filtering designed to avoid ranging mark
A strategy that combines an Ichimoku-style cloud built from Donchian midpoints, MACD, a stochastic and ATR on the price chart. ATR-based stop loss and take profit multipliers, each defaulting to 1.0, set exit distances. A position side setting limits trading t
Auto Fib Retracement + Extension draws selectable Fibonacci retracement and extension levels on the price chart from recent price pivots. A lookback sets how far back pivots are found, and a setting extends earlier Fibonacci sets. Traders can show or hide indi
A separate-pane indicator that ranks the current Bollinger Band Width against its own history and shows the result as a percentile line from 0 to 100. Settings include the price source, basis moving average type, band length, a lookback of 252 bars, line colou
Nilmiya Heikin Ashi calculates and plots custom Heikin Ashi candlesticks in a separate indicator pane below the main chart. It fetches the smoothed open, high, low, and close values for the active symbol and timeframe using security calls. Bullish bars where t
An overlay that draws two sets of pivot levels from the previous day's range: a classic pivot with first resistance and support, and a close-based pivot with levels half a range above and below. The range comes from daily data, or weekly or monthly on higher c
An oscillator-style indicator in a separate pane, rewritten from a Chinese charting platform formula. It builds EMA-difference momentum series from the chart price and from hourly Bitstamp BTCUSD data, plus a smoothed stochastic-like trend line over a 55-bar r
This overlay strategy combines a Bollinger-style band with separate ATR upper and lower envelopes and optional ADX, Volume Flow Indicator, and RSI filters. It sizes positions as a percentage of equity. Settings change band length and multiplier, ATR periods an
A bundle indicator on the price chart that plots four exponential moving averages (lengths 7, 14, 28 and 84), each with an optional smoothing line, along with a SuperTrend, a Parabolic SAR and Bollinger Bands. Inputs set the lengths, sources, offsets, smoothin
A Pine v5 oscillator in a separate pane that plots a five-bar simple moving average of the RSI. Horizontal lines are drawn at 25 and 75 with a shaded band between them. Inputs set the RSI length, 14 by default, and the source. It has no signals or alerts and s
An indicator that draws stop-loss and take-profit style lines on the price chart using a 14-period ATR. A 200-period EMA decides direction: in an uptrend the lower line sits one ATR below the close and the upper line one ATR above, and in a downtrend they swap
A strategy written for 15-minute charts that looks for pullbacks within an uptrend. It requires the 50 EMA above the 200 EMA, the close below the 50 EMA, a recent oversold reading on a smoothed Stochastic RSI, and a stochastic cross up that is higher than an e
A long-only strategy hard-coded to the BTCUSDT 5-minute series through a security request. It enters long when price crosses a 9-period simple moving average while RSI is below 50. It closes all positions when price is one percent above the average entry price
The Sweeps indicator detects and plots bullish and bearish liquidity sweeps and raids directly on the main price chart. It identifies instances where price moves beyond significant swing highs or lows on a selected timeframe without closing past them, indicati
An overlay indicator that stacks many familiar tools on one chart: Bollinger Bands, simple moving averages at 5, 10, 50, 100 and 200, exponential averages at 10, 55, 100 and 200, and an Ichimoku cloud. It also marks triangles when a reversal-style candle forms
The Keltner Width indicator calculates the percentage width of Keltner Channel bands based on a moving average of a selected source price multiplied by a range such as ATR or True Range. It plots the resulting width value in a separate pane using column style
A strategy that uses a Fourier transform of recent prices, with a selectable lookback and three chosen sinusoid components, together with fast, medium and slow moving averages of selectable type, including EMA, ALMA and FRAMA. Optional linear regression smooth
This indicator searches recent pivots for an N-shaped pattern of points A, B and C and projects a future point D on the price chart. Pivot left and right bars, lookback, and validation rules based on ATR and leg volume control which patterns qualify. Projected
Standard Deviation Refurbished plots the standard deviation of a chosen source in a separate pane, with optional smoothing using several moving average types and optional normalization to a 0 to 100 range. Up to ten moving averages of the standard deviation ca
This indicator charts a Uniswap V3 liquidity position against price, for an ETH and stablecoin pair. The user enters the deposit time and price, the original and current token amounts, and unclaimed fees. It draws dotted lines at the fixed range bottom and top
This indicator calculates the Average Directional Index alongside a simple moving average to evaluate trend strength. It plots the raw ADX line and its moving average in a separate pane below the price chart. Users can configure the ADX period, the ADX smoothi
An overlay indicator that plots the previous week high and low as stepped lines and uses them with previous month and quarter levels to decide when a close counts as support or resistance. Circles mark those support and resistance points, and the chart backgro
A combined oscillator pane built for a Boom and Crash style strategy. It plots a very long RSI, a short moving average, and a ribbon of five very short EMAs, with price high and low pivots over a lookback window and optional horizontal levels. It adds a True S
This indicator plots the relative price of an altcoin against Bitcoin by dividing the current symbol's OHLC values by INDEX:BTCUSD data. It displays the synthetic pair as either a simple line or custom candlesticks with an optional Heikin-Ashi calculation in a
This Pine v4 strategy trades Bitcoin perpetual futures on an hourly chart using candle spikes and volume. It goes short on a green candle with a large upper spike and goes long on a red candle with a large lower spike, when volume exceeds a threshold, the prio
A candlestick overlay that marks hammer and hanging man candles with up and down arrows, coloured by whether volume on the signal candle was above its 12-bar average. It also highlights inside bars, outside bars and several multi-bar combinations of these thro
This strategy template plots indicators directly on the price chart, including exponential moving averages, relative strength index, and average directional movement. It incorporates position management options such as account leverage, percentage-based positi
Commodity Channel Index plots the standard CCI in a separate pane. It measures how far the typical price (HLC3 by default) sits from its simple moving average, scaled by the mean deviation. Dashed lines at plus and minus 100 mark the usual upper and lower band
An overlay that fits a Nadaraya-Watson kernel regression curve to recent prices and wraps it with upper and lower bands set at a multiple of the mean absolute error. The window size, bandwidth, band multiplier and source are adjustable. Arrows mark where price
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.