Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 23)

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

This indicator identifies significant volume spikes on daily and weekly timeframes by comparing current volume against moving averages over user-defined lookback periods. It plots the daily volume ratio as a histogram in a separate pane, with blue columns for

Indicator v5 Volume
Updated 1 year ago · GPL-3.0 GitHub repository of ezVolume Spike Detector
1 stars

This indicator plots envelope bands based on a moving average or exponential moving average of a chosen price source. It computes RSI with user-set length and source. Signals trigger on crossovers: buy when price crosses the lower envelope band while RSI falls

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of ENVELOPE - RSI - Buy Sell Signals

ETHBTC MTPI

by Mikelkulla
1 stars

ETHBTC MTPI is a multi-indicator trend-following strategy designed for crypto pairs to determine relative market strength. It combines up to five toggleable components: Liquidity-Weighted Supertrend, dual exponential moving averages, DEMA Supertrend, DEMA AFR,

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of ETHBTC MTPI
1 stars

This strategy computes a Donchian channel from the highest high and lowest low over a set period, plus a middle line. It goes long when the close breaks above the previous channel high and short when it breaks below the previous channel low. Each trade has an

Strategy v5 BreakoutTrend
Updated 1 year ago · None stated GitHub repository of Donchian Channel Breakout
1 stars

A separate-pane indicator that computes the Money Flow Index and adapts its overbought, neutral and oversold levels using a clustering routine trained on recent data. Inputs set the MFI length, the number of training bars and the iterations per bar. An adjuste

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · None stated GitHub repository of AI Adaptive Money Flow Index
1 stars

This strategy compares current bar volume and price direction against the previous bar using a lookback period. It plots colored volume columns in a separate pane to visualize bullish or bearish volume trends and draws a liquidation level threshold line. Long

Strategy v5 VolumeSupport & resistance
Updated 1 year ago · MIT GitHub repository of BuySell Volume Strategy

BTC Trend

by mkdir700
1 stars

A separate-pane indicator that plots the Bitcoin price from the BTCUSDT symbol, scaled by an adjustable factor so it fits beside other panes, whatever chart symbol is open. The line is coloured green when the latest change is up or zero and red when it is down

Indicator v5 Trend
Updated 1 year ago · None stated GitHub repository of BTC Trend
1 stars

This overlay indicator finds pivot highs and lows from high/low or close/open prices and uses them to draw support and resistance channels and trend lines on the price chart. Minimum strength, maximum channel width, and a cap on how many S/R levels appear filt

Indicator v5 Support & resistanceMoving averages
Updated 1 year ago · None stated GitHub repository of AMD-strategy (All Fixes)
1 stars

This strategy plots price and Bollinger Bands on the chart using a 120-bar SMA basis and 2 standard deviation multiplier. It generates signals from band touches and an exit SMA of 110 bars. Risk management limits losses to 6 percent of trade value. Money manag

Strategy v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy

Support Resistance - Dynamic v2

by MuhammadHussain07
1 stars

Support Resistance - Dynamic v2 finds pivot highs and lows on the price chart and groups nearby pivots into support and resistance channels. Settings set the pivot period, whether highs and lows or open and close are used, how many pivots are stored, the maxim

Indicator v5 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Support Resistance - Dynamic v2
1 stars

A Pine v5 indicator, with Spanish labels, that draws liquidity voids, meaning fair value gaps, as boxes on the price chart. It can show gaps that have already been filled, add text labels, and switch between a historical mode and another mode. A bar count sets

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Liquidity Voids (FVG)
1 stars

HMA-Kahlman Trend & Trendlines plots a smoothed directional trend ribbon directly on the price chart by combining Hull Moving Average calculations with an optional Kalman filter. It evaluates two moving lines alongside their average, changing color to reflect

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of HMA-Kahlman Trend & Trendlines

Fractal Enculfing Caldles

by fiji-solutions
1 stars

This indicator identifies bullish and bearish engulfing candlestick patterns directly on the price chart. To refine signal quality, it provides three optional filters: an ATR filter to cap maximum candle size relative to volatility, a swing high or low filter

Indicator v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Fractal Enculfing Caldles

Jinni v1

by Hurairahengg
1 stars

Jinni v1 is an overlay indicator that highlights the Sydney trading session and plots buy or sell signals based on dual exponential moving average trends. It draws a dynamic box around the Sydney session price range and applies time filters to exclude Fridays

Indicator v5 Sessions & timeMoving averages
Updated 2 years ago · None stated GitHub repository of Jinni v1

Average True Range

by JoeTonDev
1 stars

An ATR indicator in a separate pane with four display types: regular price units, percentage of close, ticks or currency value for a chosen position size. The smoothing method can be EMA, RMA, SMA or WMA, and an EMA of the ATR is plotted and colored by rising

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of Average True Range

algo-trade-forex

by akash-yellgetti
1 stars

A strategy-type script that draws on the price chart and combines two ideas. Pivot-based support and resistance lines are plotted from left and right bar counts, with breakout labels when price crosses a level on rising volume, and alerts for broken support or

Strategy v5 Support & resistanceBreakout
Updated 2 years ago · None stated GitHub repository of algo-trade-forex

theIndicator v1.9

by darkshloser
1 stars

Overlays several SuperTrend-style trailing stop lines on the price chart, each built from an ATR period, ATR multiplier and source, with a choice of using wicks or closes. Lines are green while the direction is up and red while it is down, with a flip when pri

Indicator v5 Trend
Updated 2 years ago · Apache-2.0 GitHub repository of theIndicator v1.9

RSI Strategy

by SOWRAJ
1 stars

This strategy calculates the relative strength index of the close and plots that oscillator plus oversold and overbought horizontal levels on the price chart because overlay is on. It opens a long when RSI crosses above the oversold level and a short when RSI

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of RSI Strategy

TD_Indicator

by subhrapratim07
1 stars

This indicator implements Tom DeMark Sequential logic directly on the price chart. It calculates TD buy and sell setups by comparing closes against four bars prior, tracks setup counts up to nine, and evaluates bar lows and highs to identify perfected setup co

Indicator v5 Mean reversionTrend
Updated 2 years ago · None stated GitHub repository of TD_Indicator
1 stars

A two-sided strategy that looks for a fan of fast EMA, medium EMA and slow SMA in order, a pin bar candle and a bar piercing one of the averages. It then places a stop order beyond the previous bar high or low. Exits combine a hard stop in pips with a trailing

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

Rocket Launches

by yankeexlr
1 stars

An overlay for crypto charts that follows a staged sequence built from RSI and four simple moving averages. It flags bearish candles with RSI under 20, records their lows, watches for crosses above the 50-period and 300-period averages, and stores the low of a

Indicator v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Rocket Launches

TrendChecker

by RobACurtis
1 stars

A Pine library that exports three functions, bullish, bearish and getTrend, which judge market direction on the current symbol and timeframe. Each call takes three switches to include a Stochastic RSI cross, a MACD line versus signal check and a comparison of

Library v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of TrendChecker
1 stars

This strategy trades mean-reversion bounces using Bollinger Bands and constructs JSON webhook payloads for automated execution. It opens a long position when the price crosses back above the lower band within a specified date filter and closes the position whe

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · MPL-2.0 GitHub repository of Bolinger Bands Strategy

MACD VWAP Supertrend

by kritarth2121
1 stars

This strategy combines a MACD crossover, a positive histogram, VWAP versus the open and a Supertrend direction change within the last few bars to open long trades. It closes the position when MACD crosses back under its signal line or Supertrend turns bearish.

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of MACD VWAP Supertrend
1 stars

A strategy that enters long when the MACD histogram crosses above zero, price is above both EMAs and the Supertrend has just turned up. It enters short on the mirror conditions. Positions are reversed by the opposite signal, and the code has no separate stop l

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of MACD & EMA & Supertrend Strategy

This indicator scans price charts to identify multiple classic bullish, bearish, and neutral candlestick patterns, including Hammers, Engulfing patterns, Dojis, Stars, and Marubozus. It evaluates prevailing market trends using simple moving average rules (SMA5

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Woverine - Candlestick Patterns

WoodwindVault

by govindthange
1 stars

A Pine v5 library that supplies auxiliary calculation functions for the author's Woodwind Playbook script. The visible part includes a function that works out the gains after a position is scaled down, taking entry, exit, quantity, remaining quantity and direc

Library v5
Updated 3 years ago · Custom licence GitHub repository of WoodwindVault
1 stars

An indicator in a separate pane that compares a symbol's performance with a reference symbol, set to a Polish index by default. Performance is measured over the four quarters of a year with the most recent quarter weighted more, and falls back to recent quarte

Indicator v5 Oscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of Relative Strength (IBD Style)

Stx Ma-Trend Finder

by arrabyte
1 stars

Plots one moving average on the price chart and colours it by slope strength. The average type can be SMA, EMA, HMA, RMA, WMA, SWMA, VWMA or TEMA, with adjustable length and source. The slope of each bar is compared with the largest slope seen so far; when it

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Stx Ma-Trend Finder

MPB2_0

by sourdiesel1202
1 stars

A Pine library that exports condition checks for long and short setups, selected by a position type string. The simple moving average check uses a 10-bar average and requires the close, and for longs the low, to sit on one side of it with a matching candle col

Library v5
Updated 3 years ago · None stated GitHub repository of MPB2_0

Aroon RSI Adjusted Net

by JohnsonHsiao
1 stars

The Aroon RSI Adjusted Net indicator combines the standard Aroon oscillator with RSI calculations over a user-defined rolling period. It calculates Aroon Up and Aroon Down values for both raw price and the RSI indicator, measuring the spread between price Aroo

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of Aroon RSI Adjusted Net

DMI+OBV+RSI

by rajatjpatel
1 stars

A separate-pane tool that merges three studies. A histogram shows normalized On Balance Volume minus its moving average, with different colors for growing and falling bars above and below zero. A shaded band between the 30 and 70 lines uses the directional mov

Indicator v5 VolumeOscillators & momentum
Updated 4 years ago · None stated GitHub repository of DMI+OBV+RSI

MACD Delta Strategy

by juliencrn
1 stars

This Pine v5 strategy computes MACD and takes the difference between the MACD and signal lines. It goes long when that histogram crosses above zero and short when it crosses below, reversing the position. A percentage stop loss measured from the average entry

Strategy v5 Oscillators & momentumTrend Archived
Updated 4 years ago · None stated GitHub repository of MACD Delta Strategy

Barbwire v3.0.0

by itmakesyousick
1 stars

Detects barbwire zones, runs of bars with unusually small size, and boxes them on the price chart. Bar size defaults to a hybrid blend of Heikin-Ashi, open-close and high-low measures. A mixed method is on by default, with optional stochastic and percent-rank

Indicator v5 Candlestick patternsVolatility & bands
Updated 4 years ago · None stated GitHub repository of Barbwire v3.0.0

Utils

by tyler314
1 stars

This Pine Script library provides utility functions for script development and backtest reporting. It includes a function to display debug text labels on the chart, a rounding utility to round floating-point values to a specified number of decimal places, and

Library v5
Updated 4 years ago · None stated GitHub repository of Utils
1 stars

This strategy uses the same smoothed ATR-above-its-low measure as the matching indicator, shown in a separate pane. It opens a long when the close turns up after a down close while the volatility value is rising, and a short when the close turns down after an

Strategy v5 Volatility & bandsBreakout
Updated 4 years ago · None stated GitHub repository of ATR Volatility Power Strategy
330 stars

Double Supertrend [Alorse] is a trend-following strategy that calculates two Supertrend indicators with distinct ATR periods and multiplier factors directly on the price chart. It enters long or short positions when the fast Supertrend signals a trend. Exits o

Strategy v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Double Supertrend [Alorse]
318 stars

Calculates and plots moving averages on selected VIX volatility terms (VIX9D, VIX, VIX3M, or VIX6M) in a separate pane. The script computes user-defined short and long moving averages using EMA or SMA. It shades the background red when the short-term moving av

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of [TVT] VIX Short Term Danger

AnalysisInterpolationLoess

by ricardosantos79
261 stars

This Pine Script v5 library provides a LOESS local weighted smoothing routine for paired x and y sample arrays. It builds a local neighborhood around each sample, applies a tricubic distance weight, and fits a weighted local regression. A separate polynomial w

Library v5
Updated 4 years ago · None stated GitHub repository of AnalysisInterpolationLoess
220 stars

This indicator identifies bullish and bearish engulfing candlestick patterns and plots them directly on the price chart. Users can filter patterns by setting minimum body-to-range percentages for both the prior and current candles. Additional filters require t

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Candlestick Pattern - Engulfing

LiqSpikeBounceLong Feb2026

by agutinbaigo28
147 stars

LiqSpikeBounceLong Feb2026 is an indicator designed to identify long bounce entries following high-volume liquidation cascades in bearish market contexts. It checks if price is below an exponential moving average, then detects large single-bar drops exceeding

Indicator v5 Volatility & bandsVolume
Updated 6 weeks ago · MIT GitHub repository of LiqSpikeBounceLong Feb2026
114 stars

This indicator estimates the next bar's price with a k-nearest neighbors model built from consecutive price samples. It ranks one-dimensional distances, averages the nearest neighbors, and can adjust that projection. Optional signals hint at the next bar's dir

Indicator v5 AI / machine learning
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN (New Approach)
106 stars

This strategy trades the three-candle strike pattern filtered by trend direction and time sessions. It calculates market regime using linear regression and exponential or smoothed moving averages to distinguish between ranging and trending conditions. Risk man

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Candle Strike Strategy

Bollinger Bands Strategy

by cklose2000
105 stars

This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po

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

This overlay strategy combines a Chandelier Exit with a zero-lag least squares moving average. Although the header mentions Heikin Ashi candles, the calculations use ordinary closes. An ATR trailing stop sets long and short levels, and direction flips when pri

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Chandelier Exit & ZLSMA Strategy

MLExtensions

by artificial-intelligence-edge
75 stars

MLExtensions is a Pine Script library providing utility and mathematical helper functions for machine learning indicators, specifically optimized for approximate nearest neighbors classification in Lorentzian space. It includes functions to normalize series de

Library v5 AI / machine learning
Updated 4 days ago · MIT GitHub repository of MLExtensions

Bar States

by be-thomas
65 stars

Bar States is an educational utility indicator that demonstrates Pine Script bar state variables directly on the price chart overlay. On every bar, it evaluates execution context properties including historical status, real-time status, new bar creation, bar c

Indicator v5
Updated 6 days ago · GPL-3.0 GitHub repository of Bar States

Pair Trade: Apple & Google

by PythonForForex
64 stars

This pair trading strategy calculates the daily price movement ratio of Google using multi-symbol data requests and plots it in a separate pane. When Google drops by more than 5% within a day, the strategy enters a long position of 100 units on the chart symbo

Strategy v5 Mean reversion
Updated 4 years ago · None stated GitHub repository of Pair Trade: Apple & Google

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