Synced with GitHub · updated yesterday

Free TradingView Pine Scripts

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.

New scripts by RSS
10,850 scripts

SuperBollingerTrend

by eduardofx
1 stars

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

Indicator v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of SuperBollingerTrend

GetTrend Strategy

by Bojack960
1 stars

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

Strategy v4 Trend Repaints
Updated 2 years ago · None stated GitHub repository of GetTrend Strategy
1 stars

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

Strategy v5 Mean reversion
Updated 2 years ago · None stated GitHub repository of Markov Down-Streak Strategy
1 stars

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

Indicator v5 Candlestick patterns
Updated 2 years ago · MIT GitHub repository of Candlestick Patterns Detector

Engulf Indicator

by theomgdev
1 stars

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

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Engulf Indicator

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

Indicator v5 Volatility & bandsMean reversion
Updated 3 years ago · GPL-3.0 GitHub repository of Bollinger Bands Fibonacci Ratios

2Mars Strategy

by facejungle
1 stars

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

Strategy v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of 2Mars Strategy
1 stars

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

Indicator v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Wonverine - Lines

ROE / PER

by parksb
1 stars

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

Indicator v5
Updated 3 years ago · None stated GitHub repository of ROE / PER

Thange Woodwind Playbook

by govindthange
1 stars

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

Indicator v5 TrendSupport & resistance
Updated 3 years ago · Custom licence GitHub repository of Thange Woodwind Playbook

Schaff Trend Cycle

by goki75
1 stars

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

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Schaff Trend Cycle

My Strategy

by athul-22
1 stars

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

Strategy v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of My Strategy
1 stars

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

Indicator v5 Volatility & bands
Updated 3 years ago · GPL-3.0 GitHub repository of Barrier Volatility Estimator

Kondor EMA

by arrabyte
1 stars

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

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Kondor EMA
1 stars

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

Strategy v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of Money Printer Go BRRRRRR Backtest
1 stars

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

Indicator v5 Moving averagesTrend
Updated 3 years ago · MIT GitHub repository of EMA 36/200 + 200 SMA
1 stars

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

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of WaveTrend with Crosses

X Trend

by Sikako
1 stars

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

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of X Trend
1 stars

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

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of FXFUNDINGMATE Trend Indicator
1 stars

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

Indicator v4 Support & resistanceOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Auto Fib Retracement + Extension
1 stars

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

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of Bollinger Band Width Percentile

Nilmiya Heikin Ashi

by jubayernil
1 stars

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

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · None stated GitHub repository of Nilmiya Heikin Ashi

YIGITBOX PHL2

by hassonya
1 stars

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

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · None stated GitHub repository of YIGITBOX PHL2

Jiaolong 10

by coderbullbull
1 stars

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

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of Jiaolong 10

12-BB

by sam30606
1 stars

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

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of 12-BB

RSI Dynamics

by nvFede
1 stars

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

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of RSI Dynamics

ATR

by AliSawari
1 stars

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

Indicator v5 Volatility & bandsTrend
Updated 3 years ago · MPL-2.0 GitHub repository of ATR
1 stars

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

Strategy v5 Oscillators & momentumMean reversion
Updated 3 years ago · GPL-3.0 GitHub repository of Fluffy 15M Stochastic RSI Top
1 stars

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

Strategy v5 Moving averagesMean reversion
Updated 3 years ago · MIT GitHub repository of Advanced Crypto Trading Strategy

Sweeps

by lesari08
1 stars

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

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 years ago · None stated GitHub repository of Sweeps

Sabarobe

by jinjernot
1 stars

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

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Sabarobe

Keltner Width KW

by Kasra-Saeid
1 stars

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

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Keltner Width KW

FTSMA

by timurista
1 stars

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

Strategy v4 Moving averagesTrend Repaints
Updated 3 years ago · None stated GitHub repository of FTSMA

N Pattern

by itmakesyousick
1 stars

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

Indicator v5 Support & resistanceBreakout Repaints
Updated 3 years ago · None stated GitHub repository of N Pattern
1 stars

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

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of Standard Deviation Refurbished

LP Breakeven v2

by ubiquity
1 stars

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

Indicator v5 Support & resistance Archived
Updated 3 years ago · None stated GitHub repository of LP Breakeven v2

ADX Expand

by JohnsonHsiao
1 stars

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

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of ADX Expand
1 stars

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

Indicator v4 Support & resistanceBreakout
Updated 4 years ago · None stated GitHub repository of Universal Support and Resistance
1 stars

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

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Bootsie's Boom and Crash Combo

Altcoin Analyzer [Lysergik]

by LysergikProductions
1 stars

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

Indicator v5 Volatility & bandsCandlestick patterns Repaints
Updated 4 years ago · AGPL-3.0 GitHub repository of Altcoin Analyzer [Lysergik]

Btcperp H1

by WMW333
1 stars

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

Strategy v4 VolumeBreakout
Updated 4 years ago · None stated GitHub repository of Btcperp H1

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

Indicator v5 Candlestick patternsVolume
Updated 4 years ago · None stated GitHub repository of My Comprehensive Trading Indicator
1 stars

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

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Strategy Template
1 stars

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

Indicator v5 Oscillators & momentum Archived
Updated 4 years ago · None stated GitHub repository of Commodity Channel Index

Nadaraya-Watson Envelope

by 0xfffangel
1 stars

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

Indicator v5 Mean reversionVolatility & bands Repaints
Updated 4 years ago · None stated GitHub repository of Nadaraya-Watson Envelope

About the Pine Script Library

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.

Compare brokers