Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 12)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

Trend Reversal

by Trader-IKU
1 stars

Combines an ATR-based Supertrend with an On Balance Volume momentum oscillator. The Supertrend bands, with adjustable ATR period, source and multiplier, appear on the price chart with up and down trend highlighting. The OBV momentum compares a short and a long

Indicator v5 TrendVolume
Updated 2 years ago · MIT GitHub repository of Trend Reversal
1 stars

A Pine v5 overlay that plots four EMAs (20, 50, 100 and 200) together with a daily central pivot range, taken from the previous day's values, and a full set of pivot point support and resistance levels. Pivot types include Traditional, Fibonacci, Woodie, Class

Indicator v5 Support & resistanceMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Scalping EMA and Daily Pivots

Grail Only Longs

by Wendigooor
1 stars

A long-only strategy based on a trailing stop approach, using a slow SMA, medium and fast EMAs, a pin bar test, and optional stochastic and money flow index filters that can read other timeframes. Exits use a trailing stop plus a hard stop expressed in pips. I

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Grail Only Longs

Absolute Swings Crypto

by yankeexlr
1 stars

A strategy-type script for crypto that combines Bollinger Bands (22 periods, 1.62 deviations) with %B and an 18-period RSI. It looks for %B crossing back above zero together with RSI crossing back above 28 as one sequence, and %B falling below 1.33 together wi

Strategy v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Absolute Swings Crypto

Multi Indicator

by ali-rezahashemi
1 stars

This indicator combines four tools on the price chart: three simple moving averages (12, 24 and 50 by default), a SuperTrend with an inner zone band and a slower long-term SuperTrend, NSDT HAMA-style candles with gradient colours, and a UT Bot style trailing s

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Multi Indicator
1 stars

This indicator requests quarterly financial statement data for the current symbol and shows it in a table at the bottom right of the price chart. It groups readings under growth sustainability and solvency, including return on invested capital, reinvestment ra

Indicator v5 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of Table of Fundamental Data & Ratios
1 stars

This indicator combines a squeeze momentum histogram with an ADX line in a separate pane. The squeeze part compares Bollinger Bands with Keltner Channels and marks the squeeze state with coloured crosses on the zero line, while the histogram shows a linear reg

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of ADX + Squeeze Momentum Indicator

3Commas Bot

by amico1234
1 stars

This strategy plots two moving averages on the price chart and uses their relationship to bias long or short trades. Entries can be limited to one direction or allowed to reverse. Stops sit beyond a swing high or low by an ATR multiple, and a reward-to-risk li

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of 3Commas Bot

LWTI-pro

by 78i87
1 stars

LWTI-pro is a custom momentum oscillator plotted in a separate pane. It computes a normalized line from the difference between current and per-bar-close prices divided by ATR then scaled to center at 50. Optional smoothing applies SMA EMA WMA or RMA to the lin

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of LWTI-pro
1 stars

Plots a modified Bollinger setup on the price chart. It draws a 20-bar EMA basis with inner bands at one standard deviation and outer bands at an adjustable multiplier, plus a 13-bar EMA and a 200-bar EMA coloured by price position. Band width is compared with

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of Modified Bollinger by Alex

Kavi's Custom Indicators

by kavichelvan
1 stars

A chart overlay combining pivot-based support and resistance lines, five smoothed moving averages (10, 21, 50, 100 and 200), and a zigzag with order block and breaker block boxes. Break labels appear when price crosses a pivot level with a volume-oscillator fi

Indicator v5 Support & resistanceMoving averages
Updated 2 years ago · None stated GitHub repository of Kavi's Custom Indicators
1 stars

A smart money concepts overlay that marks swing pivots, break of structure and change of character events, liquidity sweeps, and liquidation wicks on the price chart. The pivot length and liquidation validity window are adjustable, candles can be coloured by c

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 years ago · None stated GitHub repository of SMC Market Structure

Surfr

by RobACurtis
1 stars

A strategy that trades when price closes across a 50-period moving average after the previous close was on the other side. It also needs a Stochastic RSI condition on the chart timeframe, a limit on the stop distance in points, and agreement from a higher time

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Surfr
1 stars

An unfinished multi-timeframe envelope script on the price chart. The visible code sets a single input, the SMA period with a default of 25, uses the close as source and defines a helper to compare the current timeframe with a given one. No plots, signals or a

Indicator v5 Moving averages
Updated 2 years ago · None stated GitHub repository of MultiTF Envelope Symbols

12/26-IT Strategy

by PlusGenie
1 stars

12/26-IT Strategy is a trend-following trading strategy that calculates 12 and 26 exponential moving averages alongside resistance levels and RSI bounds. It triggers long entries upon EMA crossovers, optionally filtered by resistance pivots and RSI ranges. The

Strategy v5 TrendMoving averages
Updated 2 years ago · MPL-2.0 GitHub repository of 12/26-IT Strategy

This intraday strategy opens a long when the MACD histogram crosses above zero and a short when it crosses below, only inside a chosen session and only while ADX is below a threshold of 25. Each trade has a fixed point-based stop loss and take profit relative

Strategy v5 Oscillators & momentumSessions & time
Updated 2 years ago · None stated GitHub repository of Day Trading With MACD and Point Target Stop

ADX Breakout

by merdunal
1 stars

A strategy that treats a low ADX, below 18 by default, as consolidation. It draws a box from the highest high and lowest low of the last 20 bars and enters when price crosses the box edge while ADX is low. The stop loss is half the box width and the profit tar

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · None stated GitHub repository of ADX Breakout
1 stars

A strategy that applies a k-nearest-neighbours classifier to RSI, ROC, CCI or volume features to estimate the next move, then trades long and or short with an optional moving average filter and volatility filter. Each position uses an ATR-multiple stop loss, a

Strategy v5 AI / machine learningTrend Repaints
Updated 2 years ago · None stated GitHub repository of kNN-Based Trend Following

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
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 3 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 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

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers