Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 61)

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

99 stars

The Bilateral Filter indicator calculates an edge-preserving smoothed price line based on bilateral filtering principles. It combines spatial domain distances across past bars with range domain price amplitude differences using dual Gaussian weighting function

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bilateral Filter (BILATERAL)
47 stars

This indicator calculates John Ehlers' Sine Wave cycle indicator and plots it in a separate pane. It detrends the chosen input price using a two-pole high-pass filter, smooths the result with a two-pole Super-Smoother filter, and resolves the cycle into in-pha

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Ehlers Sine Wave (SINE)

This strategy trades Donchian channel breakouts with ATR-based risk. It allows long and short entries, sizes the first unit from a risk percent, and adds up to four fractional units as price moves in favor. An initial ATR stop moves to breakeven after a set pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 31: Fractional + BE Lock

This indicator plots Fibonacci retracement levels anchored to a confirmed structural reference swing and scores them based on historical internal price reactions. Instead of relying purely on geometric levels, it detects ATR-weighted micro-pivots inside the sw

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Fib Reaction Memory [WavesUnchained]
7 stars

This indicator identifies market displacement, structure breaks, and Fair Value Gaps (FVGs) directly on the main price chart. It highlights displacement candles using an average range lookback and multiplier factor, with optional structure break filtering usin

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of [CT] Displacement FVG Toolkit
4 stars

This strategy tracks gold price trends using three exponential moving averages with lengths of 8, 21 and 55. It calculates ADX for trend strength filter and ATR for dynamic risk levels. The script enters long positions when the EMAs align bullishly with suffic

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Gold Triple EMA [trugurpala]

Mirpapa_Lib_Structs

by alvinng214
2 stars

Mirpapa_Lib_Structs is a Pine Script library designed to assist in detecting Smart Money Concepts (ICT) market structure shifts. It provides exported custom types and helper functions to manage trend state, track swing highs and swing lows, and verify structur

Library v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Mirpapa_Lib_Structs
2 stars

This indicator builds a pairwise similarity matrix for a user-supplied list of assets, defaulting to major stock indices. It collects a rolling window of returns or volume-modified returns for each ticker, then applies a selected distance or similarity functio

Indicator v6 Screeners & dashboards
Updated 8 months ago · None stated GitHub repository of Multi Asset Similarity Matrix

Exponential Moving Average (EMA)

by mushroom-men-Trading
2 stars

This indicator plots an exponential moving average of a chosen price source on the price chart. It calculates the average with exponential smoothing and applies a warmup compensator so a value is available from the first bar instead of waiting through a long s

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of Exponential Moving Average (EMA)

Session Stats

by jayadevrana
1 stars

Session Stats highlights Asia, London, and New York trading sessions on the chart with distinct background colors while tracking performance metrics. It plots session high and low lines directly on price action and presents a summary table displaying average s

Indicator v6 Sessions & timeScreeners & dashboards
Updated 4 days ago · MPL-2.0 GitHub repository of Session Stats

SMC Session Context

by skipp-dev
1 stars

This indicator displays session context, market structure shifts, and session scoring in a separate pane using imported pre-generated profile data. It plots a context score column chart colored by bullish, neutral, or bearish thresholds, highlights active kill

Indicator v6 SMC / ICT / price actionSessions & time
Updated 4 days ago · None stated GitHub repository of SMC Session Context

Highest Lowest Breakout

by pineforge-4pass
1 stars

A channel breakout strategy using the highest high and lowest low over an adjustable lookback. It enters long when the current bar sets a new high and price is above a 50-period EMA, and short when it sets a new low below that EMA. Positions close when price c

Strategy v6 BreakoutSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of Highest Lowest Breakout

P_err_reassign_undeclared

by GammaExpansion
1 stars

The script is an indicator in Pine Script version 6 that plots a constant value of 5. It assigns the value 5 to a local variable x and then plots x. The indicator draws its plot in a separate pane. There are no input settings, no trading signals, no stop loss,

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_err_reassign_undeclared

Liquidity Entry Zones

by rosijay17-cmd
1 stars

A liquidity sweep entry tool built as a strategy. It stores recent swing highs and lows as liquidity levels, detects sweeps through them, checks that price reclaims and that the candle meets wick, body and range requirements in pips, then confirms within a sho

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Liquidity Entry Zones

DEPV2 DEBUG S10

by YuceSezar89
1 stars

Calculates and coordinates trading signals across up to twenty cryptocurrency instruments using four core analytical dimensions: trend, momentum, volatility, and volume. Users can configure signals to trigger from single dimensions, simultaneous multi-factor c

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S10

Plots the highest high and lowest low of a lookback window, default 20 bars, plus mirrored levels placed the same distance beyond each extreme, on the price chart. It estimates how much volume traded in the gap between each extreme and its mirror over up to 50

Indicator v6 VolumeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of MTF Symmetrical Gap Volume Colored

True RSI

by vedkanani123
1 stars

A separate-pane oscillator by MisinkoMaster that rebuilds RSI by weighting each bar's gain and loss with Aroon up and down values over the lookback, then scaling to a 0 to 100 line. Trend turns long when the value crosses above a long threshold and short below

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of True RSI

For In Loop Examples

by ivansoft
1 stars

Teaching script that demonstrates for-in loops in Pine. It counts how many of the open, high, low and close values exceed a 20-bar average of close and plots that count, marks which values of a fixed array are positive with a label on the last confirmed histor

Indicator v6
Updated 1 year ago · None stated GitHub repository of For In Loop Examples

Market Speedometer

by TradersPost
228 stars

Market Speedometer plots a 0-100 market speed reading in a separate pane. It measures movement by bar-to-bar change, true range, or a short average of recent bars, then ranks that movement against ATR and a percentile lookback. An EMA smooths the reading, and

Indicator v6 Volatility & bandsOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Market Speedometer

This indicator calculates the Bill Williams Market Facilitation Index as the high-low range divided by volume, or zero when volume is zero. It compares the index and volume with the previous bar and assigns one of four zones: green for both rising, fade for bo

Indicator v6 VolumeOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bill Williams Market Facilitation Index

This indicator calculates the Ehlers Trendflex oscillator and plots it in a separate pane. It applies a two-pole SuperSmoother low-pass filter to the chosen source, sums the cumulative slope over the lookback with a running buffer, and divides that slope by an

Indicator v6 Oscillators & momentumTrend
Updated 8 months ago · MIT GitHub repository of Ehlers Trendflex Indicator (TRENDFLEX)
16 stars

This strategy enters long or short on Donchian channel breakouts and can add units when price moves in the trade direction and RSI confirms momentum. It sizes each unit from a risk percent of equity and exits with an ATR initial stop, a chandelier trail that t

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 32: Momentum + Time
9 stars

Fibonacci Retracement Quality evaluates how accurately price pullbacks align with key Fibonacci levels (0.236, 0.382, 0.5, 0.618, and 0.786) following confirmed swing moves. It filters out noise using ATR and calculates a score from 0 to 100 based on proximity

Indicator v6 Support & resistance
Updated 3 days ago · MIT GitHub repository of Fibonacci Retracement Quality
7 stars

ACCVOL 1j (SMA5 + SMA10) - AD/B is a price chart overlay indicator designed to identify volume accumulation and bullish swing trading setups. It evaluates current bar price gains, volume expansion, and volume relative to a moving average against historical pri

Indicator v6 VolumeMoving averages
Updated 3 months ago · None stated GitHub repository of ACCVOL 1j (SMA5 + SMA10) - AD/B

Ichimoku [trugurpala]

by trugurpala
4 stars

This indicator plots the standard Ichimoku Kinko Hyo components directly on the price chart. It calculates the Tenkan-sen conversion line, Kijun-sen base line, Chikou Span lagging line, and Senkou Span A and B leading lines. The area between Senkou Span A and

Indicator v6 TrendSupport & resistance
Updated 2 months ago · MIT GitHub repository of Ichimoku [trugurpala]

Mirpapa_Lib_Unicorn

by alvinng214
2 stars

The Mirpapa_Lib_Unicorn library defines data structures and logic for the Unicorn pattern within smart money concepts trading. It creates UnicornData types that track order blocks, fair value gaps, their overlaps into Unicorn zones, CHoCH confirmations, retest

Library v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Mirpapa_Lib_Unicorn

This indicator plots several linear regression channels on the price chart. Each channel can be hidden or drawn as a channel, bands, or both, and its lookback is anchored to price, volume, oscillator extremes, calendar periods, sessions, or corporate events. P

Indicator v6 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Multi-Anchored Linear Regression Channels [TANHEF]

Exponential Weighted MA Volatility

by mushroom-men-Trading
2 stars

This indicator calculates exponentially weighted moving average volatility from log returns of a chosen price source and plots the result in a separate pane. Squared returns are smoothed with an RMA-style weighting, bias-corrected, then converted to volatility

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Exponential Weighted MA Volatility

Signal Forge

by jayadevrana
1 stars

Signal Forge is a trend-following overlay indicator that combines an ATR trailing stop with a customizable Exponential Moving Average trend filter. It plots dynamic trailing stop lines and colors bars based on whether price action aligns with the EMA baseline.

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

SMC Session Context

by skipp-dev
1 stars

SMC Session Context is an indicator that tracks trading sessions across Tokyo, London, and New York time zones. Operating in a separate pane, it monitors session highs and lows, previous session extremes, cumulative volume, and initial opening ranges. It ident

Indicator v6 Sessions & timeSMC / ICT / price action
Updated 4 days ago · None stated GitHub repository of SMC Session Context

HMA Crossover

by pineforge-4pass
1 stars

A moving average crossover strategy using two Hull Moving Averages. It enters long when the fast HMA crosses above the slow HMA and short when it crosses below, reversing the position each time. Both lengths are adjustable, and both lines are drawn on the pric

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of HMA Crossover

P_err_recursion

by GammaExpansion
1 stars

This Pine Script v6 indicator defines a recursive factorial function and plots the computed output of factorial five in an indicator pane. The script implements a basic mathematical recursion pattern where a function calls itself until reaching a base conditio

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_err_recursion
1 stars

A trend continuation strategy that filters setups with ADX, rate of change, smoothed balance of power, an ATR expansion band, EMA 20 and 50 alignment and DI alignment. Entries can use pullback and reclaim, breakout or liquidity sweep triggers, with limits on e

Strategy v6 TrendVolatility & bands Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of LMSE-Lite Trend Continuation Risk Engine

DEPV2 DEBUG S11

by YuceSezar89
1 stars

This indicator processes signals across multiple cryptocurrency symbols including BTCUSDT, ETHUSDT, SOLUSDT, and additional Binance pairs. It evaluates trend, momentum, volatility, and volume methods to generate trading signals. Four signal modes are available

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S11
1 stars

This indicator draws geometric ruler lines on the price chart from a user-chosen base time. It stores confirmed pivot highs and lows using left and right bar counts, and can use highs, lows, or both. Settings set colors and width for upper-shadow, lower-shadow

Indicator v6 Support & resistanceVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Ruler V2 Morindok by BITMOON618

Volatility Adjusted Cloud

by vedkanani123
1 stars

An overlay indicator that draws a cloud around a VIDYA, a volatility-adaptive moving average. Cloud width comes from the standard deviation of price over a history window, with separate positive and negative multipliers for the upper and lower edges. The cloud

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Volatility Adjusted Cloud

Draws volume order block zones with asymmetric signals on the price chart, then adds a proximity layer that checks how close those signals sit to high-volume, displacement and tier conditions. Version 1 is a tick-friendly build. It is an indicator only.

Indicator v6 SMC / ICT / price actionVolume
1 stars

A strategy that trades a 10 and 21 period EMA crossover, going long on a cross up and short on a cross down. Each entry has an ATR-based stop, 2.5 times ATR by default, and a profit target at 2.5 times the stop distance. Position size comes from a chosen risk

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Adaptive Risk Matrix

For Loop Examples

by ivansoft
1 stars

Small teaching script showing how for loops work in Pine. One plot counts how many of the previous bars closed above the current close over a 14-bar lookback, and a second plot sums array elements using a loop step of five. It appears in a separate pane and ha

Indicator v6
Updated 1 year ago · None stated GitHub repository of For Loop Examples
228 stars

This indicator maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Market Structure + Supply/Demand

This indicator plots the binomial cumulative distribution function in a separate pane. It min-max normalizes the selected source over a lookback window into a probability between zero and one, then sums the chance of k or fewer successes across n trials. Log-g

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Binomial Distribution CDF (BINOMDIST)
47 stars

This indicator plots an Endpoint Moving Average on the price chart. It calculates a linearly weighted average of the selected source over a lookback window, assigning the largest weight to the newest bar and smaller weights to older bars. The period input sets

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Endpoint Moving Average (EPMA)
16 stars

A Donchian channel trend-following strategy featuring progressive breakeven stop-loss levels based on ATR (N). It enters on a 55-period Donchian breakout with an initial risk set at 2.0 N. As profit reaches key ATR milestones, the stop advances through progres

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 33: Progressive BE

This indicator calculates an advanced Fisher Transform oscillator in a separate pane, using customizable smoothing algorithms, a signal line, and defined overbought and oversold thresholds. It incorporates a slower trend context line, detects market stall or a

Indicator v6 Oscillators & momentumTrend
Updated 3 days ago · MIT GitHub repository of Fisher Transform Advanced [WavesUnchained]
4 stars

This indicator calculates the Moving Average Convergence Divergence (MACD) line, signal line, and histogram in a separate pane. It uses configurable fast, slow, and signal lengths to compute standard momentum values. The histogram is dynamically shaded with di

Indicator v6 Oscillators & momentumMoving averages
Updated 2 months ago · MIT GitHub repository of MACD Histogram [trugurpala]

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