Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 18)

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

1 stars

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

Strategy v5 Mean reversionVolatility & bands
Updated 8 months ago · None stated GitHub repository of AU RSI + ATR Trailing Stop

MES Gamma (1DTE)

by Juice-zhi
1 stars

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

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of MES Gamma (1DTE)
1 stars

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

Strategy v5 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of Dual Momentum Strategy

CommonSignals

by Yavuz365
1 stars

CommonSignals is a Pine Script utility library providing standardized signal generation functions for technical analysis scripts. It normalizes trade directions across diverse indicators into consistent integer values: 1 for buy, 0 for neutral, and -1 for sell

Library v5
Updated 9 months ago · MIT GitHub repository of CommonSignals

MACD + Elder Force Index

by htmlfarmer
1 stars

An indicator in a separate pane that plots a standard MACD with its signal line and a histogram coloured by direction and whether momentum is growing or shrinking. Triangles mark MACD and signal crossovers, optional dots mark where histogram momentum turns, an

Indicator v5 Oscillators & momentumVolume
Updated 9 months ago · None stated GitHub repository of MACD + Elder Force Index

Calculates and plots various classical chart patterns directly on the price chart using swing high and low detection libraries. It automatically identifies formations such as double and triple tops or bottoms, head and shoulders, flags, pennants, wedges, Ellio

Indicator v5 Support & resistanceBreakout Repaints
Updated 9 months ago · None stated GitHub repository of All Chart Patterns [theEccentricTrader]

Multi-Timeframe Trend Detector

by IamTamheedNazir
1 stars

A Pine v5 indicator that compares the close with a 50-period EMA on five timeframes, by default 5 minute, 15 minute, 1 hour, 4 hour and daily, and scores each as bullish, bearish or neutral. The scores are summed into an overall bias from strong bearish to str

Indicator v5 TrendScreeners & dashboards
Updated 9 months ago · Custom licence GitHub repository of Multi-Timeframe Trend Detector

Breaks and Retests [HG]

by christonomous
1 stars

This indicator identifies pivot highs and pivot lows to map support and resistance levels directly on the price chart. It detects breakouts beyond these zones and signals subsequent retest attempts with visual labels and boxes. Users can adjust the pivot lookb

Indicator v5 Support & resistanceBreakout Repaints
Updated 11 months ago · None stated GitHub repository of Breaks and Retests [HG]

Breakout Probability

by angrysky56
1 stars

Measures how often price has reached levels placed at fixed percentage steps above and below a reference and shows those hit counts as probabilities. It draws a set number of level lines on the price chart, optional labels and a statistics table, and can fill

Indicator v5 BreakoutSupport & resistance
Updated 11 months ago · MIT GitHub repository of Breakout Probability

This indicator, drawn in a separate pane, pulls Bitcoin and Ethereum prices from two user-chosen symbols, forms the BTC to ETH price ratio and converts it to a z-score against a rolling average and standard deviation (30 bars by default). Upper and lower thres

Indicator v5 Mean reversionOscillators & momentum
Updated 11 months ago · None stated GitHub repository of BTC/ETH Pairs Trading Z-Score & RSI/MACD
1 stars

The Bollinger Squeeze Indicator measures volatility contraction by comparing Bollinger Bands with Keltner Channels. It calculates standard deviation-based bands and ATR-based channels around a simple moving average. When the Bollinger Bands contract inside the

Indicator v5 Volatility & bandsBreakout
Updated 11 months ago · None stated GitHub repository of Bollinger Squeeze Indicator

CHoCH Signal TRXUSDT

by gnuhhung317
1 stars

A generated indicator on the price chart that draws a short fixed set of hard-coded lines and a label for TRXUSDT on the 30 minute chart. Three aqua dashed lines mark pivot highs, three yellow dashed lines mark pivot lows, and a lime label marks a change of ch

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 11 months ago · MIT GitHub repository of CHoCH Signal TRXUSDT

A Pine version 5 price-chart indicator that marks the opening range of each session, taken from a chosen time period or a custom session and timezone. It plots the range high and low with a shaded box and prints breakout signals when price closes outside the r

Indicator v5 Sessions & timeBreakout
Updated 12 months ago · MIT GitHub repository of LuxAlgo Opening Range with Breakouts and Targets v5

ichiV1 Ichimoku Trend

by ChiChasesCheese
1 stars

A long-only strategy ported from a Freqtrade bot, aimed at five-minute crypto charts. It combines an Ichimoku-style cloud with a ladder of EMA pairs and a fan magnitude ratio that must keep growing, so it only enters in strong trends. Exits come from a time-st

Strategy v5 Trend
Updated 12 months ago · None stated GitHub repository of ichiV1 Ichimoku Trend

FaRSI

by feliperazeek
1 stars

This strategy detects regular and hidden RSI divergences using pivot points on a 9-period RSI and plots them on the price chart with labels. By default it only opens long positions, on bullish divergences, and exits when RSI reaches a take-profit level or by a

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of FaRSI
1 stars

This strategy identifies trend re-entries by combining volatility spikes, short-term pullbacks, and moving average crossovers. It detects strong bar expansions using an ATR multiplier, checks a lookback window for pullbacks, and triggers entries when price cro

Strategy v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of ATR Retracement EMA Strategy

Sell Spike

by dsjrego
1 stars

A simple overlay that prints a red sell label above a bar when two conditions occur together. The bar's upper wick must be longer than its body and longer than half of a 14-period ATR, and the bar's high must pierce the upper Bollinger Band. The band length an

Indicator v5 Volatility & bandsCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Sell Spike

A price-chart overlay that combines several tools. It draws a Nadaraya-Watson kernel envelope with a repainting smoothing option, a Hull moving average band in three variants that can optionally come from a higher timeframe, and an ATR trailing stop in the sty

Indicator v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of UT Bot, Nadaraya-Watson, Hull Suite and Reversal Combo

CandleAnalysis

by MarcosACH
1 stars

CandleAnalysis is a Pine Script library providing exportable helper functions for detailed candlestick analysis in custom scripts. It evaluates whether a specified bar is bullish, bearish, or break-even, and computes metrics including body size, top wick size,

Library v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of CandleAnalysis
1 stars

This strategy uses Bill Williams indicators including the Alligator (jaw, teeth, lips with RMA smoothing and offsets), Awesome Oscillator, and Accelerator Oscillator. It also plots fractals on the chart. Long entries occur when the Alligator is aligned bullish

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Bill Williams NTD Strategy
1 stars

This strategy executes long trades based on price interaction with a daily simple moving average. It calculates a higher-timeframe daily SMA and its derivative using a three-point backward difference formula. Long entries trigger when the close sits within a s

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Price Crossover Strategy

TrendTwisterV1.5

by Axden27
1 stars

TrendTwisterV1.5 is a Pine Script strategy that uses a 12-period Hull Moving Average and a 5-period EMA shifted forward by 2 bars to identify trend changes. It plots the Hull MA in orange and the shifted EMA in blue on the price chart with buy and sell signal

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TrendTwisterV1.5

This strategy enters long when price closes above the upper Bollinger Band after being at or below it on the prior bar, and enters short on a close below the lower band. Each trade gets an ATR-based stop loss and take profit using separate multipliers. Band le

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Bollinger Band Breakout Strategy
1 stars

A separate-pane indicator that calculates ADX and the plus and minus directional indicators with Wilder smoothing and shows their difference as a coloured histogram. Optional lines show ADX and ADXR, which averages ADX with its earlier value. Two threshold inp

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Histogram with DI Lines

BuySell vol

by mrgunkin
1 stars

The BuySell Volume Indicator plots volume as histogram columns on the price chart and optionally a moving average of volume in a separate pane. It compares current price and volume with values from lookback bars to color bars green for bullish volume and red f

Indicator v5 Volume
Updated 1 year ago · MIT GitHub repository of BuySell vol

TB: Main Indicators

by farias-hecdin
1 stars

This indicator collects overlay tools for the price chart in one script. It draws two configurable vertical time separators, tints the background by day of week, and plots two EMAs of 100 and 50 periods. It also marks support and resistance from pivot highs an

Indicator v5 TrendMoving averages
Updated 1 year ago · MIT GitHub repository of TB: Main Indicators

This overlay indicator draws a Fibonacci golden zone between two selectable ratios based on swing pivots. It plots an anchored VWAP that can be hidden on daily and higher charts and colored by trend. Divergence markers compare price with VWAP using a lookback

Indicator v5 Support & resistanceDivergence
Updated 1 year ago · None stated GitHub repository of Fib Golden Wave + VWAP Divergence + RSI (Kernel Optimized)

Bollinger Bands

by zhuzp98
1 stars

This indicator plots Bollinger Bands volatility bands calculated from the input source price. The middle band uses an EMA of the source over the specified length, with bands formed by adding and subtracting the standard deviation multiplied by the mult. It als

Indicator v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands
1 stars

Measures how far price has moved from its 50-period moving average in multiples of ATR percent, using daily data. A dot is plotted when the distance exceeds a chosen multiple, with ten as the default, and an optional info table shows the readings. Settings cha

Indicator v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of ATR% Multiple from 50-MA

Chop and Explode

by techteam92
1 stars

This indicator identifies consolidation zones and potential breakout moves by processing price data through optional high-pass cleaning, minimax scaling, and RSI calculation. Relative strength values between 40 and 60 represent ranging or chop zones, while cro

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Chop and Explode

Dojis

by fiji-solutions
1 stars

This indicator identifies and plots bullish and bearish Doji candlestick patterns directly on the price chart. It defines a Doji by comparing body size to the total candle range and ensuring upper and lower wicks are balanced within a customizable ratio. Signa

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Dojis

Jinni v1

by Hurairahengg
1 stars

Jinni v1 is a Pine Script indicator that plots buy and sell signals on the price chart. It calculates two EMAs, one on close with length 34 and another on input source with length 65, to detect uptrend and downtrend. Additional checks include candle direction,

Indicator v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Jinni v1

ATR Channel Breakout

by JoeTonDev
1 stars

A strategy template titled for an ATR channel breakout. The code sets non-pyramiding, a starting capital, a cash commission per order and slippage, then lists numbered section headings for settings, calculations, long and short conditions and entry and exit or

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · None stated GitHub repository of ATR Channel Breakout

Algo Trade Indian

by akash-yellgetti
1 stars

A strategy script for the price chart that marks the high, low and midpoint of the first part of each trading session, starting at a configurable hour and minute. It also plots a volume-weighted average price line and a 50-period exponential moving average, an

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of Algo Trade Indian

SuperChandelierIndicator

by darkshloser
1 stars

Draws three ATR-based SuperTrend lines on the price chart, each with its own ATR period, multiplier, source and a wicks-or-close option. A second timeframe input supports a higher timeframe view, and a Chandelier-style exit layer with ATR length, multiplier, c

Indicator v5 TrendVolatility & bands
Updated 2 years ago · Apache-2.0 GitHub repository of SuperChandelierIndicator

Tripple Supertrend Strategy

by danielhyuncoder
1 stars

The Tripple Supertrend Strategy calculates three separate Supertrend indicators using different length and multiplier parameters to gauge trend concurrence. It enters a long position when all three Supertrend instances align in a bullish direction. The strateg

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Tripple Supertrend Strategy

Ultimate RSI

by ranguchamy
1 stars

Calculates a modified RSI in a separate pane with a selectable smoothing method such as RMA or EMA, an adjustable length and source, and a smoothed signal line. Overbought and oversold levels default to 80 and 20, with colour fills for each zone. Settings chan

Indicator v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Ultimate RSI
1 stars

Calculates standard Bollinger Bands alongside the Relative Strength Index (RSI) directly on the main price chart. It plots the upper band, lower band, and simple moving average midline. An upward green arrow signals potential long setups when price crosses bac

Indicator v5 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Bollinger Bands & RSI with Arrow

Grail Only Shorts

by Wendigooor
1 stars

A short-only strategy that combines a slow SMA, medium and fast EMAs, a pin bar test, a stochastic filter, an MFI filter on a separate timeframe and a stochastic momentum index. Exits use a trailing stop plus a hard stop expressed in pips. Inputs include stop

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

Gravity Points

by yankeexlr
1 stars

An overlay that tracks a multi-step sequence of conditions using RSI and simple moving averages. It flags bearish candles that close while RSI is below 20, remembers the low of the latest such candle, notes when price crosses above the 50-period average, and t

Indicator v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Gravity Points
1 stars

This indicator redraws price as relative candles, coloured by whether highs and lows are rising or falling versus the prior bar. It also works as a risk planner: for a chosen earlier bar it sets an entry and stop loss, with an optional custom entry, custom sto

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Relative Candles + Risk Manager

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, and adds a zigzag line driven by a price deviation percentage and pivot leg count. Pivot lengt

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

Surfr 5-Minute Variant

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, with a Stochastic RSI direction check and a cap on the stop distance in points. A confirmation timeframe, 5 minutes by default, supplies

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Surfr 5-Minute Variant

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