Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 40)

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

1 stars

A long-only strategy built on a rolling cumulative volume delta estimated from where each bar closes within its range. It enters when buyers dominate by a set margin, price has stayed above a trend SMA for several bars, RSI is above a minimum and the session f

Strategy v6 VolumeTrend
Updated 5 months ago · None stated GitHub repository of Volume Delta Trend Reversal Long Only

Jasper Working OB Strategy

by Alberto082544
1 stars

Jasper Working OB Strategy is an indicator that detects bullish and bearish order blocks (OB) from fair value gaps and displacement conditions. It stores the OB zones on the chart and maintains persistent memory of touches to these zones. Reversal signals trig

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Jasper Working OB Strategy
1 stars

A trend indicator for the price chart that draws a moving-average trend line, 45 periods by default and selectable as SMA, EMA, WMA, HMA or VWMA, offset by an ATR multiple. It detects buying and selling pressure with an adjustable threshold, and can colour can

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of M45 Indicator - Aurolo
1 stars

This indicator reads the native footprint of each bar to find buy and sell volume imbalances at each price row. A row counts as imbalanced when one side exceeds the other by a set multiplier, checked diagonally or across the row depending on the chosen method,

Indicator v6 Volume
Updated 6 months ago · None stated GitHub repository of Footprint Imbalance Delta

LuxAlgo SMC Pro Ultimate

by Focal-QuantAI
1 stars

A strategy on the price chart that trades smart money concepts. It detects internal and swing market structure, order blocks and fair value gaps, and can require a fair value gap and a premium or discount position before entering. Optional filters use divergen

Strategy v6 SMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of LuxAlgo SMC Pro Ultimate

Central Bank

by AlanGuo
1 stars

This indicator requests Federal Reserve, European Central Bank, People's Bank of China, and Bank of Japan balance-sheet series, plus US reverse-repo and Treasury General Account balances. It converts each series to trillions of US dollars, subtracts reverse re

Indicator v6
Updated 7 months ago · None stated GitHub repository of Central Bank
1 stars

A strategy for range box breakouts whose header comments describe changes from an earlier version: a tighter ATR stop, a trailing profit exit that triggers later, an EMA 50 direction filter, a stricter volume filter and a higher box quality score. Orders are f

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V12 Optimized
1 stars

This long-only strategy automates staged entries and exits based on Bitcoin all-time high drawdowns and percentage gains. It scales into positions across five configured percentage drop levels from the highest recorded price. Profit taking occurs in five parti

Strategy v6 Support & resistanceTrend
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle [Infinity]
1 stars

This strategy looks for VWAP bounce and rejection trades on the price chart during the regular trading session. It marks a percentage band around session VWAP and enters when a rejection candle meets a minimum wick-to-body ratio and volume exceeds a multiple o

Strategy v6 Mean reversionVolume
Updated 7 months ago · MIT GitHub repository of VWAP Bounce/Rejection

The Basic Crossover

by propuchon
1 stars

A course example strategy that trades a simple moving average crossover. It goes long when a 14-period SMA crosses above a 28-period SMA and goes short when it crosses below, which reverses any open position. Both averages are plotted on the price chart. The l

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of The Basic Crossover

RSI Divergence Detector

by knectardev
1 stars

The RSI Divergence Detector calculates Relative Strength Index (RSI) values and compares pivot highs and lows between price action and the RSI oscillator. It identifies four distinct divergence types: regular bullish, regular bearish, hidden bullish, and hidde

Indicator v6 Oscillators & momentumDivergence
Updated 9 months ago · None stated GitHub repository of RSI Divergence Detector

NSE Infinity

by anil-sn
1 stars

A long-only strategy that enters on a close above the prior 20-bar high or on a cross back above a 50 EMA, in both cases only while price is above a 200 EMA. It holds one position sized at 90 percent of equity and exits when the close falls below a Chandelier-

Strategy v6 TrendBreakout
Updated 9 months ago · None stated GitHub repository of NSE Infinity

SFA_FVG_Imbalance

by genesisgrubio39
1 stars

This library computes Fair Value Gap imbalances for both bullish and bearish market structures. It exports eight deterministic outputs in order: bullCreated and bearCreated boolean flags, bullTop and bullBottom price levels, bearTop and bearBottom price levels

Library v6 SMC / ICT / price action
Updated 10 months ago · None stated GitHub repository of SFA_FVG_Imbalance

EZ Algo Debug Hedge

by turnupdigital
1 stars

A strategy that combines up to five external buy and sell signal sources, each with its own name and usage mode, and manages positions with ATR-based exits and an optional moving average exit. A switch chooses between faster intrabar exits and safer exits that

Strategy v6 Volatility & bands
Updated 1 year ago · None stated GitHub repository of EZ Algo Debug Hedge

Lab-Doi-05

by theteelek
1 stars

An experimental strategy lab script that simulates long, short and a second long position inside a date window, with a daily EMA 12 and EMA 26 cross as the trend filter. It tracks average entry prices, open profit, drawdown, win and loss counts and exchange fe

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Lab-Doi-05

Pivot Extension

by Studentcodee
1 stars

This strategy plots on the price chart and looks for confirmed pivot highs and lows using left and right lookback bars. It opens a long position when a pivot low is confirmed and a short position when a pivot high is confirmed. Position size defaults to the fu

Strategy v6 Support & resistance
Updated 1 year ago · None stated GitHub repository of Pivot Extension
1 stars

A Thai-language indicator that builds a portfolio summary from user-entered holdings and shows it as tables and a small chart on the price chart. It compares portfolio return against a benchmark symbol, groups results by period such as quarter, and supports an

Indicator v6 Screeners & dashboards
Updated 1 year ago · None stated GitHub repository of Portfolio Performance Summary

LTF History

by ivansoft
1 stars

A developer test indicator in a separate pane that checks how much lower timeframe and higher timeframe history is available on the current chart. It requests volume times mid price from the chart timeframe and from a three-minute lower timeframe, then places

Indicator v6
Updated 1 year ago · None stated GitHub repository of LTF History

On Balance Volume

by everget
947 stars

This indicator plots TradingView's On Balance Volume in a separate pane. It optionally overlays an EMA or SMA signal line and colors both lines by whether OBV is above or below that signal. Users can change the smoothing type and length, hide the signal, fill

Indicator v6 Volume
Updated 12 days ago · GPL-3.0 GitHub repository of On Balance Volume

[TradersPost] Sick Sigma

by TradersPost
228 stars

Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma

Strategy v6 Volatility & bandsMean reversion Repaints
Updated 3 months ago · None stated GitHub repository of [TradersPost] Sick Sigma
99 stars

The Augmented Dickey-Fuller indicator calculates statistical stationarity and tests for unit roots in price series over a rolling window. It performs ordinary least squares regression on differenced historical price data to compute a t-statistic and an estimat

Indicator v6 Mean reversionTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of ADF - Augmented Dickey-Fuller Test

EMA Ribbon MACD v1

by iamrichardD
57 stars

This strategy combines an exponential moving average ribbon with MACD momentum indicators to identify trend-following entry and reversal signals. It draws in a separate pane, tracking MACD signal crossovers, zero-line crosses, and EMA structural alignments. En

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD v1

Ichimoku Cloud

by dcaoyuan
55 stars

The Ichimoku Cloud indicator plots key components of the traditional Ichimoku Kinko Hyo system directly on the price chart. It calculates the Conversion Line over 9 periods and the Base Line over 26 periods using Donchian midpoints. It projects Leading Span A

Indicator v6 TrendSupport & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Ichimoku Cloud
53 stars

Fibonacci Auto Buy/Sell Signals calculates dynamic Fibonacci retracement levels (0.236, 0.382, 0.5, 0.618) and extension levels (1.618, 2.618) based on 50-period swing highs and lows. It plots dotted retracement and extension lines directly on the price chart.

Indicator v6 Support & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Fibonacci Auto Buy/Sell Signals

This indicator plots the initial balance high, low, midpoint and optional Fibonacci levels for a user-defined session on the price chart. It tracks a separate break session and includes settings groups for extension lines, percentile lines and tables. Users ca

Indicator v6 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of Initial Balance & Extensions with Z-Scores

The AFIRMA indicator calculates a weighted moving average via FIR filter coefficients from Hanning, Hamming, Blackman or Blackman-Harris windows. It optionally applies least-squares cubic polynomial fitting for autoregressive prediction. The script plots the A

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of Autoregressive FIR Moving Average (AFIRMA)
29 stars

The Zen Consecutive Bar Streak indicator calculates and tracks consecutive directional candle streaks directly on the main price chart. It determines whether each bar is bullish, bearish, or neutral based on its close relative to its open. When two or more con

Indicator v6 Candlestick patternsTrend
Updated 2 weeks ago · MIT GitHub repository of Zen Consecutive Bar Streak

Test Plot Parsing

by jpantsjoha
23 stars

Test Plot Parsing is a minimal test script designed to verify scope detection and syntax parsing in Pine Script v6 development environments. It plots basic price values, including close, open, and high series, in a separate indicator pane. The script intention

Indicator v6
Updated 4 weeks ago · Custom licence GitHub repository of Test Plot Parsing

HTF Statistical Zones

by samuelharting
18 stars

HTF Statistical Zones plots historical percentile bands around the 18:00 New York day open, plus session boxes, opening-range lines, and projected targets on the price chart. Upper and lower day zones use selectable inner and outer percentiles, with optional p

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 weeks ago · MPL-2.0 GitHub repository of HTF Statistical Zones
16 stars

A trend-following strategy based on Ed Seykota's Donchian breakout framework, modified to take a single full-risk entry instead of pyramiding multiple units. It enters long or short on 55-bar channel breakouts with ATR-based position sizing and an initial stop

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 15: Single Position

SPY 0DTE Scalper - 15min

by chris-c-thomas
14 stars

This intraday overlay establishes directional bias and high-conviction swing setups for SPY on the 15-minute timeframe. It computes a weighted confluence score combining an EMA ribbon, a 50 EMA anchor, session VWAP bands, RSI divergence, ADX, TTM Squeeze, cand

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of SPY 0DTE Scalper - 15min

Auto Trendlines

by casoon
9 stars

Auto Trendlines calculates support and resistance lines by identifying confirmed pivot highs and lows over a specified lookback window. It validates trendline candidates using ATR-based touch tolerances, touch counts, line spans, and max violation thresholds.

Indicator v6 TrendSupport & resistance Repaints
Updated 3 days ago · MIT GitHub repository of Auto Trendlines

Nexural QWAP

by JasonTeixeira
9 stars

Nexural QWAP calculates a volume-weighted average price combined with a cumulative volume delta order flow engine directly on the main price chart. It analyzes market structure by detecting volume absorption, liquidity sweeps, price-CVD divergence, stacked imb

Indicator v6 SMC / ICT / price actionVolume
Updated 2 weeks ago · Custom licence GitHub repository of Nexural QWAP

Impulse Trend Arrows

by MeridianAlgo
9 stars

Calculates an adaptive baseline using an EMA and constructs an ATR channel smoothed over a user-defined length. It combines channel breakout conditions with RSI and MACD momentum agreement to generate buy and sell signals. Signals are displayed on the main pri

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Impulse Trend Arrows

TR Margin Pulse

by Enesp4rl4k
7 stars

TR Margin Pulse calculates and plots the ratio of marketwide margin calls to required margin using Takasbank data generated via MCP templates. Rendered in a separate pane, the line turns red when exceeding a predefined stress threshold and teal when below. A s

Indicator v6 Screeners & dashboards
Updated 7 days ago · MIT GitHub repository of TR Margin Pulse

LunarTick Initial Balance

by lunarticktrading
7 stars

This indicator tracks and visualizes the initial balance range over customizable trading sessions directly on the price chart. It plots the high, low, and midpoint of the opening balance, with optional session extension levels, an anchored VWAP, and shaded hig

Indicator v6 Sessions & timeSupport & resistance Repaints
Updated 2 weeks ago · None stated GitHub repository of LunarTick Initial Balance
7 stars

The Hybrid Volume Spread Analysis (HVSA) indicator calculates a volume-weighted momentum oscillator in a separate pane by multiplying moving averages of open and close prices by relative volume change. It evaluates price spread dynamics adjusted for volume cha

Indicator v6 VolumeOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Hybrid Volume Spread Analysis

This indicator overlays Bollinger Bands with two exponential moving averages directly on the price chart. It calculates standard Bollinger Bands using a selectable basis moving average type, length, and standard deviation multiplier. Alongside the bands, it co

Indicator v6 Moving averagesVolatility & bands
Updated 5 months ago · None stated GitHub repository of EMA 9, EMA 21 & Bollinger Bands
6 stars

This indicator detects regular and hidden divergences between price pivots and RSI or Williams %R. Confirmed swing highs and lows, which wait a set number of bars on each side, are compared with oscillator extremes. Regular divergences mark possible reversals,

Indicator v6 DivergenceOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Capital41 Divergence Detector
6 stars

This indicator draws a two-column dashboard table on the price chart for up to three user-selected symbols, defaulting to EURUSD, GBPUSD, and USDJPY. For each symbol it requests four-hour highs, lows, and closes from the two prior candles and classifies a high

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Institutional Bias Scanner

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite classifies real OHLC bars with Rob Smith's TheStrat method and draws labels, targets, and stop levels on the price chart. It detects inside bars, hammers, shooters, outside bars, and Failed 2 range reclaims, then shows magnitude and exhaustion t

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 4 days ago · MPL-2.0 GitHub repository of TheStrat Suite

Pair Creation

by gorx1
5 stars

This indicator constructs a synthetic trading pair from two user-selected instruments using division or multiplication. It retrieves multi-asset price data and optionally applies a forward pricing model to the second leg using financing rates, storage costs, y

Indicator v6 Volume
Updated 8 months ago · None stated GitHub repository of Pair Creation

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