Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 45)

Scripts written for Pine Script version 6, the current version of TradingView's language. They paste into the Pine Editor and run as they are.

Pine scripts4,367
Code shown here2,412open licence
Updated in a year4,021
No repaint flag3,857

Pine Script v6: Indicators, Strategies and Libraries

Mirpapa Lib HTF

by alvinng214
2 stars

Mirpapa Lib HTF is a Pine Script v6 utility library designed for higher timeframe (HTF) data processing and chart timeframe conversions. It exports a custom data structure for caching open, high, low, close, and time values across multiple bars, alongside util

Library v6
Updated 2 months ago · None stated GitHub repository of Mirpapa Lib HTF

This indicator calculates Stan Weinstein's Mansfield Relative Strength (MRS) comparing a security against a chosen benchmark index, such as the S&P 500. It measures outperformance and underperformance relative to a zero line using a moving average baseline. Th

Indicator v6 TrendOscillators & momentum
Updated 3 months ago · Apache-2.0 GitHub repository of Mansfield Relative Strength (Weinstein Method)

Lakshmi Zones

by voletiramu
2 stars

Lakshmi Zones calculates and plots unmitigated daily order blocks, supply and demand zones, and key levels directly on the price chart. It processes historical daily candlestick bodies and wicks to generate zone boxes, tracking whether subsequent daily closes

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of Lakshmi Zones

This indicator builds a Supertrend-style channel from ATR and the median price, then tracks the highest and lowest prices between trend flips. It plots a grid high, grid low and midpoint, shifted by an offset, and can filter the channel by minimum and maximum

Indicator v6 TrendVolatility & bands Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Supertrend Channel [psyll]

This indicator plots net positions for Commercial and Non-Commercial (Large Speculators) traders using Commitment of Traders (COT) legacy report data. It automatically converts root symbols to their corresponding CFTC codes to fetch daily long and short positi

Indicator v6 Volume
Updated 8 months ago · None stated GitHub repository of COT Net Commercial vs Net Non-Commercial Positions

Average Daily Range (ADR)

by mushroom-men-Trading
2 stars

This indicator calculates the range of each bar as high minus low and smooths those ranges into an average daily range. The user chooses a lookback length and a smoothing method: simple, exponential, or weighted moving average. It plots the resulting value as

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Average Daily Range (ADR)

Zebra Week

by etnt
2 stars

Zebra Week paints alternating background stripes on the price chart so consecutive time periods are easier to see. On a daily chart it shades even weeks; on a 15-minute chart it shades every other trading day using the week number and weekday. A single toggle

Indicator v6 Sessions & time
Updated 1 year ago · MPL-2.0 GitHub repository of Zebra Week

Supertrend

by mydcc
1 stars

Supertrend is a trend-following overlay indicator that computes dynamic trailing bands based on the Average True Range and price action. It calculates the standard Supertrend line using customizable ATR length and factor multiplier inputs. Green lines plot bel

Indicator v6 TrendVolatility & bands
Updated 2 days ago · Custom licence GitHub repository of Supertrend

Structure & Flow

by majixai
1 stars

A smart money style indicator that detects swing structure and breaks of structure with an ATR buffer, then marks order blocks found within a lookback, extends them forward and hides or removes them when mitigated by a wick or a close. Signals are graded in ti

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of Structure & Flow

TSMOM L/S SMA50

by nvolpe2007-cell
1 stars

An always-in-the-market strategy that goes long when the daily close is above a 50-bar SMA and short when below, with an optional hysteresis band and a switch to disable shorts. It simulates a perpetual futures position with a funding cost charged over the hol

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of TSMOM L/S SMA50

HLC Bar Chart

by ankurksoni
1 stars

A price-chart overlay that redraws each bar as a candle whose open equals its close, leaving only the high, low and close visible. Bars are coloured by comparing the close with the previous close, using one colour for a close at or above it and another for a l

Indicator v6
Updated 3 days ago · None stated GitHub repository of HLC Bar Chart

Engulfing Candles

by jayadevrana
1 stars

The Engulfing Candles indicator automatically identifies and highlights bullish and bearish engulfing candlestick patterns directly on the price chart. It checks whether the current bar fully wraps around the body of the previous bar and exceeds a customizable

Indicator v6 Candlestick patterns
Updated 4 days ago · MPL-2.0 GitHub repository of Engulfing Candles
1 stars

This library builds real-time Smart Money Concepts context frames on each bar. It derives StructureFrame using engine primitives for BOS, CHoCH, trend and S-R levels. ImbalanceFrame tracks FVG lifecycle, BPR overlap, liquidity void and zone-bias. ZoneFrame man

Library v6 SMC / ICT / price action
Updated 4 days ago · None stated GitHub repository of SMC Context Engine Private

Conduit OBV AccDist

by pineforge-4pass
1 stars

A long-only strategy that requires two volume flow measures to agree: On Balance Volume and Accumulation/Distribution, each compared with its own EMA. It enters long when both are above their signals for the first time and price is above a longer EMA filter. I

Strategy v6 VolumeTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Conduit OBV AccDist

I_vol

by GammaExpansion
1 stars

Plots a wide array of built-in Pine Script volatility calculations in a separate pane. It outputs true range variations, average true range across multiple periods, standard deviation, variance, mean absolute deviation, Bollinger Bands and Bollinger Bands Widt

Indicator v6 Volatility & bands
Updated 7 days ago · MIT GitHub repository of I_vol
1 stars

A long and short strategy based on five moving averages of 10, 20, 50, 100 and 200 bars. It can require the averages to be in perfect order with aligned slopes, filter entries by ADX range, and optionally by RSI and a higher timeframe moving average. A strict

Strategy v6 Moving averagesBreakout
Updated 8 days ago · None stated GitHub repository of Qullamaggie MA Breakout L+S

A strategy that detects classic chart patterns from pivot points on the price chart: double and triple tops and bottoms, head and shoulders, flags, pennants, wedges, triangles, rectangles and cup and handle shapes. Each can be switched on or off, with toleranc

Strategy v6 BreakoutSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Auto Pattern Detector Targets with Session Strategy

DEPV2 A8 · Onay Makinesi

by YuceSezar89
1 stars

This indicator implements a multi-metric confirmation engine that validates trading signals across four core dimensions: trend level scores based on an HLC3 SMA, momentum z-scores derived from rate of change, volatility expansion ratios comparing fast and slow

Indicator v6 TrendOscillators & momentum
Updated 13 days ago · None stated GitHub repository of DEPV2 A8 · Onay Makinesi

SR+Trend v12

by MuhammadMuhamid
1 stars

A long-only crypto spot strategy whose support and resistance section can be switched on or off and set as the main entry trigger or as a secondary filter. When enabled, it uses pivots on four timeframes, ATR-sized touch zones and a retest window. Trend filter

Strategy v6 Support & resistanceTrend
Updated 13 days ago · None stated GitHub repository of SR+Trend v12
1 stars

Calculates the WaveTrend oscillator using channel and average exponential moving averages alongside a simple moving average signal line in a separate pane. It plots the dual oscillator lines, their difference area, and configurable overbought and oversold thre

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 2 weeks ago · MPL-2.0 GitHub repository of Taught to Trade - WaveTrend Audit

Higher Close Demo

by Alaamo7
1 stars

Higher Close Demo is a Pine Script v6 teaching indicator drawn on the price chart. It checks whether the current close is greater than the previous close. When that condition is true, it plots a green upward triangle below the bar. The script has no user input

Indicator v6
Updated 2 months ago · Custom licence GitHub repository of Higher Close Demo

Linear Regression Volume

by vedkanani123
1 stars

An overlay indicator that computes a volume-weighted price average using SMA, RMA, HMA or ALMA, fits a linear regression to it as a fair value baseline, and draws bands at one, two and three standard deviations of price around it. The baseline and band fills t

Indicator v6 TrendVolume
Updated 2 months ago · None stated GitHub repository of Linear Regression Volume
1 stars

Draws volume order blocks on the price chart and adds three tiers of asymmetric buy and sell volume signals: a percentage-threshold tier, a one-sided volume tier and a super volume tier. A cooldown spaces signals. High-volume proximity markers fire when a roll

Indicator v6 SMC / ICT / price actionVolume
Updated 2 months ago · None stated GitHub repository of VOB Asymmetric HV Proximity v1.1

Smooth Trend Radar

by raybird
1 stars

A trend strategy on the price chart built on a double-smoothed Supertrend using WMA and EMA smoothing, with pivot rejection entries when price touches the baseline. Settings scale automatically by timeframe. Stop loss can use the flip candle, baseline or swing

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Smooth Trend Radar
1 stars

This large indicator applies ICT-style smart money analysis to gold on the price chart, covering order blocks, breaker blocks, liquidity pools, premium and discount positioning and market structure. Buy and sell signals can be gated by a discount or premium fi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Quantum Flow v19 Fully Configurable

STT SR TMA Plan

by majohnst
1 stars

This strategy executes trades based on Triangular Moving Average (TMA) crossings, support and resistance structures, and breakout logic. It evaluates multiple confluence conditions including daily pivots, anchored VWAP, and multi-day moving averages alongside

Strategy v6 Moving averagesTrend
Updated 4 months ago · None stated GitHub repository of STT SR TMA Plan

SMC Strategy

by mrdungx2603
1 stars

This Smart Money Concepts (SMC) strategy identifies market structure, order blocks, imbalances, and premium or discount zones directly on the price chart. It executes long trades in discount zones and short trades in premium zones based on order block retests,

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of SMC Strategy

Pivot Break

by riegodavid-git
1 stars

An overlay indicator that tracks the most recent confirmed swing high and swing low and prints a small label when the close crosses beyond them. A green B label appears below the bar when the close crosses above the last pivot high, and a red S label appears a

Indicator v6 BreakoutSupport & resistance
Updated 4 months ago · None stated GitHub repository of Pivot Break

HA Moving Average

by rubbermetal
1 stars

HA Moving Average calculates a moving average from Heikin Ashi prices fetched for the chart symbol, while the chart itself can stay on normal candles. Users choose the average type (EMA, SMA, RMA or WMA), the length and the Heikin Ashi source. The line changes

Indicator v6 TrendMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of HA Moving Average

Trailing Call Comma

by Snappni
1 stars

This strategy plots a 12-period and a 26-period exponential moving average on the price chart. It enters long when the fast average crosses above the slow average and enters short when the fast average crosses below the slow average. Opposite signals reverse t

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Trailing Call Comma
1 stars

Overlays higher-timeframe context on the price chart, using lower-timeframe data to find volume spikes inside each higher-timeframe bar. It combines RSI pivot divergence with a volume conviction check, and can show a ghost of the previous bar, stacked imbalanc

Indicator v6 VolumeDivergence Repaints Archived
Updated 5 months ago · None stated GitHub repository of HTF Volume Spike, Divergence & Conviction
1 stars

An overlay toolkit for crypto charts that combines a volume profile with value area, an anchored VWAP, EMA lines, a higher-timeframe EMA bias and an order flow proxy from lower-timeframe delta, relative volume and cumulative delta, plus swing and ATR-based pri

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v7 Clean Execution
1 stars

This strategy generates buy and sell signals on the SP500 4H chart using EMA crossovers confirmed by MACD, filtered by ADX trend strength, RSI levels, and active London or New York sessions. It plots EMA 9, EMA 21, and EMA 200 on the price chart. Buy signals e

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Señales EMA + MACD v4b [SP500 4H]
1 stars

This compact indicator labels Elliott Wave counts on the price chart. It runs a zig-zag at several depths, chooses the depth that gives the best fit, and applies Elliott Wave rules, with a strict mode that forces an A-B-C count when the rules break. A correcti

Indicator v6 Support & resistance Repaints
Updated 6 months ago · None stated GitHub repository of Mini Elliott Wave 2026-2
1 stars

An indicator that shows an adaptive True Strength Index in a separate pane while projecting signals onto the price chart. It detects the instrument type, such as gold, silver or major indices, and the timeframe to pick parameters, adapts reactivity to ATR, and

Indicator v6 Oscillators & momentumScalping
Updated 6 months ago · None stated GitHub repository of TSI Adaptive Scalper v4.2 OVL-SP

Double MACD

by AlanGuo
1 stars

A strategy that plots two MACD histograms in a separate pane, a slower trending pair (89 and 144) and a faster energy pair (13 and 21). Backtesting is switched on by a setting, with a long or short direction and a mode choice between trend following and diverg

Strategy v6 Oscillators & momentumDivergence Repaints
Updated 7 months ago · None stated GitHub repository of Double MACD

BTC ATH Scaling

by ymlee1104
1 stars

BTC ATH Scaling tracks the all-time high price and calculates the percentage drawdown from that peak. It displays a real-time label offset to the right of the latest price candle showing the ATH level, current price, and percentage drop. The label color dynami

Strategy v6 Support & resistanceScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of BTC ATH Scaling
1 stars

A chart-overlay indicator that tracks a Hull moving average and issues buy and sell signals when price crosses it in the direction of the slope. Entries are filtered by a score built from momentum, RSI and volume, a price-volume-trend check, and an optional bl

Indicator v6 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of RAPF Anti-Chop Fusion

Flags and Pennants

by turnupdigital
1 stars

An indicator on the price chart that finds flag and pennant chart patterns using up to four zigzag settings of different lengths and depths. Inputs limit pattern error, flatness, maximum retracement and optionally bar ratio, and an option avoids overlapping pa

Indicator v6 Support & resistanceBreakout
Updated 1 year ago · None stated GitHub repository of Flags and Pennants

TeeLek Best Position

by theteelek
1 stars

A long-only accumulation strategy that buys near the lower edge of a smoothed channel, built from an EMA of the highest high and lowest low over an adjustable range. A buy needs price at the lower line while RSI turns up from an oversold reading, with at most

Strategy v6 Mean reversion
Updated 1 year ago · None stated GitHub repository of TeeLek Best Position

Supertrend Strategy

by Studentcodee
1 stars

A Pine v6 strategy that follows the built-in Supertrend indicator on the price chart. The ATR length and the multiplier factor are inputs. When the Supertrend direction flips to bullish the strategy enters long, and when it flips to bearish it enters short, so

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Supertrend Strategy

RelativeValue

by ivansoft
1 stars

A Pine Script v6 library for comparing current volume or another series with its history over matching points in time. It collects values within a period that restarts on an anchor timeframe, then averages the values from past periods at the same time offset.

Library v6 Volume
Updated 1 year ago · None stated GitHub repository of RelativeValue
947 stars

The Quick Moving Average calculates a triangular-weighted moving average on the price chart. It plots the average line and can color it green when rising or pink when falling. Price bars and chart background receive matching colors based on slope. Settings con

Indicator v6 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Quick Moving Average

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