Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 88)

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

TRIX

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the classic Triple Exponential Average (TRIX) momentum oscillator in a separate pane. It applies a triple exponential moving average to the natural logarithm of closing prices and computes the 1-bar rate of change multiplied

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of TRIX

Trailering L007

by ruckard
13 stars

This long-only strategy executes automated cryptocurrency trades designed to interface directly with Zignaly webhooks. It triggers entries when a configurable minimum threshold of sub-strategy conditions are met within a lookback window, adjusting position siz

Strategy v5 Scalping
Updated 1 year ago · None stated GitHub repository of Trailering L007

Welles Wilders MAs - MTF

by eddiebelaval
7 stars

Calculates four Welles Wilder Moving Averages (RMA) using a user-specified timeframe and plots them directly on the price chart. The script tracks short, medium, extension, and long trend lines (default periods 34, 72, 89, and 144). Users can configure timefra

Indicator v5 Moving averagesTrend
Updated 3 months ago · None stated GitHub repository of Welles Wilders MAs - MTF
6 stars

The Shved Supply & Demand indicator identifies and draws dynamic supply and demand zones directly on the price chart using fast and slow pivot points. It determines zone height using an ATR multiplier and categorizes levels by strength, including untested, ver

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Shved Supply & Demand Optimized
3 stars

Matt Moheeka Candles repaints price chart candles using custom color rules based on session timing and price action structures. It identifies and highlights session opening candles, long-wick reversal candles such as hammers or shooting stars, and doji pattern

Indicator v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Matt Moheeka Candles

Kernel Regression Toolkit

by regalouisei
2 stars

The Kernel Regression Toolkit calculates and plots non-linear regression estimations directly on the price chart. It provides multiple configurable kernel regression lines using functions such as Rational Quadratic, Gaussian, Periodic, and Locally Periodic ker

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Kernel Regression Toolkit

Moving Box{Morindok}

by morindok
1 stars

This indicator plots geometric structures and moving averages directly on the price chart. It calculates a simple moving average alongside periodic high and low extremes to construct shapes such as boxes, rhombuses, ellipses, or spirals using polylines. Users

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Moving Box{Morindok}
1 stars

A price-chart indicator that plots a zero-lag EMA with an ATR band around it. The trend flips long when price closes above the upper band and short when it closes below the lower band, marked with buy and sell labels and a shaded channel. Optional features inc

Indicator v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Adaptive Zero-Lag Reversal Engine

Squarify 64

by nishpa800
1 stars

Overlays up to 64 buy and sell marker signals on the price chart, built from standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Inputs set displacement multipliers, a first-bar-only switch and per-signal tog

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Squarify 64

True Strength Indicator

by TWODS-CAPITAL
37 stars

This indicator plots the True Strength Index in a separate pane. It double-smooths price change and absolute price change with exponential moving averages, then expresses their ratio as a percentage. A signal line is an exponential moving average of that value

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of True Strength Indicator

Trailering M008

by ruckard
13 stars

Trailering M008 is a Pine Script v5 long-only strategy that draws on the price chart and sends orders through Zignaly alerts. It increases capital as more trigger conditions are met and sets take profit from a percentage or a risk-reward ratio, using price exc

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering M008
6 stars

This indicator plots smart-money market structure on the price chart. It marks internal and swing breaks of structure and changes of character, order blocks, equal highs and lows, fair value gaps, multi-timeframe highs and lows, and premium and discount zones.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Smart Money Concepts [LuxAlgo]
3 stars

This indicator combines Bollinger Bands, fractal detection, and RSI-based swing analysis within a customizable trading session. It identifies regular or Bill Williams fractals during active session hours and generates long or short signals when fractal extreme

Indicator v5 Volatility & bandsSessions & time
Updated 5 months ago · None stated GitHub repository of MCF and Trendy Pipsy
2 stars

This indicator splits volume into buying and selling portions from candle body and wick proportions, then measures the linear-regression slope of those series over a chosen period. It plots the resulting trend strength in a separate pane as columns or another

Indicator v5 VolumeTrend
Updated 8 months ago · None stated GitHub repository of KINSKI Volume Regression Trend

Octahedron

by morindok
1 stars

Octahedron draws a geometric shape on the price chart using two user-defined points for time and price. It computes the delta between those points and plots eight blue polylines connecting points at fixed ratios to form the outline of an octahedron. The main s

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Octahedron

Apex Ultra Engine v3

by vedkanani123
1 stars

An overlay indicator built on a zero-lag EMA with an ATR trailing stop. It reads market regime from ADX, adds RSI and Stochastic RSI momentum filters, and treats volume or oversized candles as spikes with a cooldown. Entries can display three take profit level

Indicator v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Apex Ultra Engine v3

Squarify Atoms v1

by nishpa800
1 stars

A companion verification indicator that exposes only the basic building-block signals, about 60 marker plots, with no combinations. All plots are off by default and each toggle explains its definition. The combination plots, alert aggregator and statistics are

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Squarify Atoms v1

Tweezer Bottom - Bullish

by TWODS-CAPITAL
37 stars

This indicator detects Tweezer Bottom Bullish candlestick patterns on the price chart. It identifies a two-candle reversal during an uptrend, with the first candle long and red followed by a green candle with nearly identical lows. The script calculates trend

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Tweezer Bottom - Bullish

Trailering N006

by ruckard
13 stars

Trailering N006 is a crypto strategy framework designed for automated execution via Zignaly alerts. It calculates trade signals based on price excursion logic across lookback periods to enter positions with dynamic capital sizing. Key settings allow filtering

Strategy v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of Trailering N006
7 stars

This indicator identifies a specific anchor candle based on user-defined start hour, start minute, and time zone inputs. It calculates the high-to-low price range of that anchor bar to project entry levels, stop losses, and target levels for both buy and sell

Indicator v5 BreakoutSupport & resistance
Updated 3 months ago · None stated GitHub repository of XAUUSD Dynamic Breakout + SL Points

SMC Killzone Engine

by alboogycOdR
6 stars

This overlay indicator tracks smart-money points of interest during optional London, New York, and Asian killzones. It can detect fair value gaps, order blocks, breakers, and mitigation blocks using separate entry, point-of-interest, and structure timeframes.

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of SMC Killzone Engine

Calculates and plots a multi-band envelope on the price chart based on mean reversion principles and Keltner Channel concepts. Instead of standard moving averages, it uses advanced filters such as Ehlers SuperSmoother, Butterworth, Gaussian, or traditional ave

Indicator v5 Mean reversionVolatility & bands
Updated 5 months ago · None stated GitHub repository of Mean Reversion Channel - MRI Variant

The Linear Regression Oscillator [ChartPrime] calculates a slope and intercept using linear regression over a specified lookback period, normalizing the values with a 100-period z-score calculation. It plots the normalized oscillator in a separate pane with dy

Indicator v5 TrendOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Linear Regression Oscillator [ChartPrime]
1 stars

This indicator detects pivot highs and lows on the price chart using configurable left and right bars. It extends lines from recent pivots in green for lows and red for highs with Fibonacci 1.618 ratio projection. It calculates crossing points of the extended

Indicator v5 Support & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Painting Of Price by BITMOON618

Extrapolated Previous Trend

by vedkanani123
1 stars

An overlay indicator that fits a linear regression to closing prices of the previous period on a chosen timeframe, such as the prior day, and extends that line into the current period. The line is teal when the slope was up and red when it was down, candles ar

Indicator v5 TrendSupport & resistance
Updated 2 months ago · None stated GitHub repository of Extrapolated Previous Trend

Squarify HTF v1

by nishpa800
1 stars

Overlays up to 46 buy and sell marker signals on the price chart, built from standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Inputs set three displacement multipliers, a first-bar-only switch and per-sign

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Squarify HTF v1

Tweezer Top - Bearish

by TWODS-CAPITAL
37 stars

This overlay indicator marks a two-candle Tweezer Top bearish reversal on the price chart. It looks for a prior long bullish candle in an uptrend followed by a bearish candle whose high is nearly the same as the previous high, using an EMA of candle body size

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Tweezer Top - Bearish

Trailering O002

by ruckard
13 stars

This long-only strategy plots on the price chart and sizes entries according to how many trigger conditions are met. It manages exits by tightening the stop and extending the take profit from the price's maximum excursion, with optional take profit and risk-re

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering O002

This strategy calculates a 10-period and a 20-period simple moving average directly on the price chart. It triggers long entries on SMA bullish crossovers and short entries on SMA bearish crossunders, formatting alert payloads into JSON string templates for we

Strategy v5 Moving averagesTrend Repaints
Updated 5 months ago · None stated GitHub repository of Messing with Alerts & Calc Every Tick

The LOWESS indicator applies locally weighted scatterplot smoothing to price data to reduce noise and highlight trends. It calculates a smoothed line based on user-defined length. Additionally, it identifies pivot highs and lows using specified bar counts and

Indicator v5 Moving averages
Updated 8 months ago · None stated GitHub repository of LOWESS (Locally Weighted Scatterplot Smoothing)
1 stars

The Parallel Lines Live indicator draws geometric Fibonacci-based horizontal lines on the price chart. It computes a fractal phi ratio using the user-set Fibonacci expansion multiplier and tracks historical price touches along with bullish and bearish outcomes

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Parallel Lines Live by BITMOON618

Grok Apex Flip Engine v1

by vedkanani123
1 stars

An always-in flip indicator on the price chart, written in Pine version 5, where BUY exits a short and enters long and SELL does the reverse. It uses a wide Supertrend-style ATR trail with a cap on how far the trail can move per bar, plus an optional volume-we

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Grok Apex Flip Engine v1

Squarify v2 BT

by nishpa800
1 stars

A strategy backtest version of a 46-signal study that combines standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Each enabled signal can trigger a buy or sell on the price chart. Inputs set three displaceme

Strategy v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Squarify v2 BT

Ultimate Oscillator

by TWODS-CAPITAL
37 stars

The Ultimate Oscillator combines short-term, medium-term, and long-term price momentum into a single bounded oscillator. It calculates buying pressure and true range across three configurable period lengths, defaulting to 7, 14, and 28 bars. By applying higher

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Ultimate Oscillator

Trailering P010

by ruckard
13 stars

A trading strategy that combines k-nearest neighbors (KNN) classification logic with custom position management and automated Zignaly signal execution. It evaluates historical price excursions and KNN patterns to identify entry opportunities and set dynamic ex

Strategy v5 AI / machine learning
Updated 1 year ago · None stated GitHub repository of Trailering P010
6 stars

This multi-timeframe indicator combines Smart Money Concepts (SMC) with customizable session killzones for London and New York trading. It identifies market structure points such as Break of Structure (BOS) and Change of Character (CHoCH), alongside Points of

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of SMC Killzone State Engine Enhanced

MFI Divergences

by g-moe
3 stars

This indicator plots price data and is designed to detect divergences between price action and the Money Flow Index (MFI). It uses pivot highs and lows to identify potential regular and hidden bullish or bearish divergence signals. By evaluating momentum shift

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences

This indicator calculates a volatility-adaptive SuperTrend by applying k-means clustering to ATR values over a user-defined training period. It segments historical volatility into high, medium, and low clusters to dynamically adjust the SuperTrend bands to shi

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Machine Learning Adaptive SuperTrend [AlgoAlpha]
1 stars

This indicator plots dynamic parallel lines based on logarithmic fractal price grid levels adjusted by a phi ratio multiplier. It scores price levels using a weighted quantitative model incorporating estimated order flow delta, kinetic volatility energy, liqui

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 weeks ago · None stated GitHub repository of Parallel Lines Live V2
1 stars

An overlay indicator that detects pivot highs and lows and marks bullish and bearish market structure breaks with dotted or dashed lines. After a break it trails a stop level that follows price, with an increment factor controlling how fast it tightens. The st

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

TNT Opening Drive OD

by nishpa800
1 stars

Detects opening drive moves on the price chart by combining displacement, swing structure and return-to-level checks into named bull and bear signals. Inputs set sensitivity, swing length, the displacement deviation length and multiplier, and return percentage

Indicator v5 Sessions & timeVolatility & bands
Updated 2 months ago · None stated GitHub repository of TNT Opening Drive OD

Up/Down Volume

by TWODS-CAPITAL
37 stars

This indicator calculates and visualizes buying versus selling volume by aggregating lower timeframe data onto the current chart. It uses intrabar price movement to classify volume as positive or negative, plotting positive volume as green columns and negative

Indicator v5 Volume
Updated 3 years ago · MIT GitHub repository of Up/Down Volume

Trailering Q004

by ruckard
13 stars

Trailering Q004 is an execution strategy that generates automated trading signals integrated with Zignaly webhooks. It uses historical statistical advice and price excursion limits to enter long or short positions based on sub-strategy trigger conditions. The

Strategy v5 TrendMean reversion
Updated 1 year ago · None stated GitHub repository of Trailering Q004

SMC Luxmod Nuburo0

by alboogycOdR
6 stars

This indicator maps Smart Money Concepts (SMC) directly onto the price chart. It detects both internal and swing market structure breakouts, labeling Changes of Character (CHoCH) and Breaks of Structure (BOS). It also highlights bullish and bearish internal an

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of SMC Luxmod Nuburo0
3 stars

This indicator plots the Money Flow Index in a separate pane and marks bullish and bearish divergence from pivot highs and lows. It stores recent pivot prices, MFI values, and bar indexes, then checks regular or hidden divergence across a chosen number of dots

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences Lower

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