Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 8)

Open-source Pine scripts written for stock indices such as the Nasdaq 100, S&P 500 and DAX: opening range, gap and session tools, and index strategies.

Pine scripts712
Code shown here375open licence
Updated in a year601
No repaint flag595

Indices: Indicators, Strategies and Libraries

Eminiplayer Zones

by onlyspx
1 stars

This indicator turns pasted text lines of low price, high price and a zone label into horizontal zones on the price chart, for S&P 500 futures or index charts. For index symbols it subtracts a configurable futures-to-index spread from the zone prices. It can a

Indicator v5 Support & resistanceSessions & time
Updated 6 months ago · None stated GitHub repository of Eminiplayer Zones

AlgoBot VWAP Pullback Strategy

by ghostnathan30-ops
1 stars

A futures strategy for 15-minute charts that builds a daily-reset VWAP with standard deviation bands. It requires several consecutive bars on one side of VWAP, then a pullback to within a small percentage of it and a bar closing in the trend direction. Entries

Strategy v6 TrendSessions & time
Updated 6 months ago · None stated GitHub repository of AlgoBot VWAP Pullback Strategy
1 stars

The quality-first preset of a strategy that routes orders to MetaTrader through connector alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage, with higher risk tiers for selected

Strategy v6 Breakout
Updated 7 months ago · None stated GitHub repository of Energy Block V11 Quality First
1 stars

This intraday strategy identifies mean-reversion fade setups around the previous day's high and low (PDH/PDL). Operating within a configurable morning session window, it seeks rejection setups confirmed by volume spikes above an average threshold. Trades use s

Strategy v6 Mean reversionSupport & resistance
Updated 7 months ago · MIT GitHub repository of PDH/PDL Mean Reversion Fade

MNQ Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MNQ (Micro Nasdaq-100 futures, scaled from QQQ options) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of MNQ Gamma (1DTE)

LibraryCOT

by ivansoft
1 stars

A Pine Script v6 library that supports Commitment of Traders data requests. It holds the metric names and allowed directions (long, short, spreading) for the legacy, disaggregated and financial CFTC report types, so that other scripts can build the right data

Library v6
Updated 1 year ago · None stated GitHub repository of LibraryCOT

Sector AD

by nvFede
1 stars

A Pine v4 indicator in a separate pane that works as a sector advance-decline count. It pulls closing prices for eleven US sector ETFs (materials, communications, energy, financials, industrials, technology, staples, real estate, utilities, health care and dis

Indicator v4 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of Sector AD
257 stars

This strategy calculates dynamic support and resistance levels using pivot highs and lows alongside a custom smoothed trend filter and a 3-period EMA. It identifies entry opportunities when price breaks out relative to the trend filter and short-term EMA cross

Strategy v5 TrendSupport & resistance Repaints
Updated 6 weeks ago · None stated GitHub repository of 30s - ES 1m Strategy Candle Bar
46 stars

The IB/ORB Statistical Mapper plots Initial Balance (IB) and Opening Range Breakout (ORB) ranges for 5-minute, 15-minute, and 60-minute windows relative to the New York session open. It renders colored boxes, midpoints, and open lines directly on the price cha

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of IB/ORB Statistical Mapper (hardcoded)

Pocket Scout - SPY/QQQ

by chris-c-thomas
14 stars

Pocket Scout - SPY/QQQ is a mobile-optimized intraday bias indicator designed for major US equity ETFs and indices. It overlays a 9/21/50 EMA ribbon, session VWAP, prior day high/low/close levels, and intraday high/low lines directly on the main price chart. T

Indicator v6 TrendOscillators & momentum Repaints
Updated 6 months ago · MIT GitHub repository of Pocket Scout - SPY/QQQ
6 stars

Institutional Bias Scanner draws a multi-symbol dashboard on the price chart together with optional session overlays. It watches sixteen user-selected symbols that default to major forex pairs, gold, the dollar index, equity indices, oil and crypto. Theme and

Indicator v6 Screeners & dashboardsSessions & time
Updated 7 months ago · None stated GitHub repository of Institutional Bias Scanner

This indicator overlays a visual order-flow dashboard on the price chart using left-aligned labels. It shows a buyer-versus-seller percentage gauge, a signed delta reading, a cumulative volume delta value, and an eight-direction momentum compass colored by bul

Indicator v5 Screeners & dashboardsVolume
Updated 2 weeks ago · MIT GitHub repository of GHOST OrderFlow Dashboard — DerivEAPro
4 stars

This indicator identifies liquidity sweeps and stop hunts on price charts by detecting candles that breach recent high or low levels before closing back inside the previous range. Users can filter signals using lookback windows, minimum wick size relative to c

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Liquidity Sweep Detector [Lab]

This indicator compares US sector ETFs with technology and utilities using price ratios that can be log-transformed. It smooths those ratios with a simple moving average and measures fast and mid-length percentage change to classify financials versus technolog

Indicator v5 Oscillators & momentumMoving averages
Updated 10 months ago · MIT GitHub repository of Sector RS & Intermarket Regime Dashboard

This indicator calculates Mansfield Relative Strength by comparing the current asset's close against a reference index, sector, or industry benchmark. It plots the resulting relative strength curve alongside an exponential moving average in a separate pane, hi

Indicator v6 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Mansfield Relative Strength indicator

Failed Breakdown

by ashwagamma
2 stars

Failed Breakdown identifies and tracks key session support levels—including overnight lows, daily lows, and afternoon lows—and detects potential failed breakdowns against them. The indicator monitors price penetration to classify breakdowns into soft, medium,

Indicator v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of Failed Breakdown

VIX 10SMA

by klevler
2 stars

This indicator plots candles for a selected symbol, defaulting to CBOE:VIX, in a separate pane together with a simple moving average of close and a line at 1.2 times that average. It colors the background when the symbol high is more than 20 percent above the

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · MIT GitHub repository of VIX 10SMA
1 stars

Fits a rolling regression of the chart's close several bars ahead on z-scored macro inputs, then plots the fitted value shifted forward so the line leads price on the chart. One feature set uses rates and cross-asset series such as US yields, the dollar index

Indicator v6 AI / machine learning
Updated yesterday · None stated GitHub repository of Nasdaq Macro Lead - Fair Value

ZeroDTE Wave v1

by xynkro
1 stars

An overlay that marks reversal entries and exits for same-day index option trades on five-minute bars. Entries need a stochastic reversal cross, an EMA trend filter, a cooldown and a time window, and must pass a confluence score, a VIX stand-aside gate, an opt

Indicator v5 Mean reversionSessions & time
Updated yesterday · None stated GitHub repository of ZeroDTE Wave v1
1 stars

An overlay indicator that rebuilds opening range levels for one chosen historical date. After the selected number of opening candles from a set market open time, it draws the range high, low and average, then first, second and third resistance and support line

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of Dynamic OR Historical Levels

India CCF Nifty

by raybird
1 stars

A futures strategy for NSE Nifty that requires agreement from SuperTrend, a 3 and 13 EMA cross with a 21 EMA trend, MACD, RSI, ADX, volume and relative strength against a benchmark. Entries come in two stages with a larger setup ladder, so it can add to a posi

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of India CCF Nifty

Fractal Sweep Strategy

by abhinaynatraj
1 stars

A strategy port of the Fractal Sweep CISD indicator. It detects a sweep of a prior candle's extreme, a return and a CISD confirmation, then enters with a stop at the sweep extreme or CISD level and a take profit at a set R:R multiple. Shallow sweep and closed-

Strategy v5 SMC / ICT / price actionBreakout
Updated 3 months ago · None stated GitHub repository of Fractal Sweep Strategy
1 stars

A strategy that rests a limit order at the session VWAP when a higher-timeframe 50 and 100 EMA stack shows an uptrend, VWAP is rising and price is above it, with the mirror image for shorts. The stop is an ATR multiple beyond VWAP and the target is a fixed rew

Strategy v6 Mean reversionTrend
Updated 4 months ago · None stated GitHub repository of VWAP Pullback Strategy MNQ

First Hour Range

by onlyspx
1 stars

This indicator records the high and low of the first hour of the US cash session, from 9:30 to 10:30 on the chart clock, then draws horizontal lines for both. It also draws dashed lines at one and a half times and dotted lines at two times the range, above the

Indicator v5 Sessions & timeSupport & resistance
Updated 6 months ago · None stated GitHub repository of First Hour Range
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 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

MNQ Gamma (30DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MNQ (Micro Nasdaq-100 futures, scaled from QQQ options) expiring in thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of MNQ Gamma (30DTE)

algo-trade-indian-v1

by akash-yellgetti
1 stars

A strategy-type script for the price chart that plots the high, low and midpoint of the first part of each session, using end hour and minute inputs, and marks those bars. It adds pivot-based support and resistance lines with left and right bar counts, labels

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of algo-trade-indian-v1

Portfolio Metrics

by amico1234
1 stars

Portfolio Metrics calculates return statistics for the chart symbol against a selectable equity index. It plots alpha, beta, correlation, r-squared, standard deviation, variance, a drawdown measure, and a gain measure in a separate pane. Users choose the bench

Indicator v4 Repaints
Updated 2 years ago · None stated GitHub repository of Portfolio Metrics

Sector AD

by nvFede
1 stars

A Pine v4 indicator in a separate pane that works as a sector advance-decline tally. It reads closing prices for eleven US sector ETFs and the SPY fund, then counts how many sectors closed above their previous close and how many did not. It has no input settin

Indicator v4 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of Sector AD

Moon Dev GEX Arrows

by moondevonyt
92 stars

This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Arrows

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

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 6 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

Dip Bulucu-2

by gocaman
3 stars

Dip Bulucu-2 combines a WaveTrend oscillator and Williams Vix Fix to identify potential market bottoms and trend reversals. It calculates Williams Vix Fix based on standard deviation Bollinger Bands and percentile ranges, highlighting exhaustion bars in red hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated yesterday · None stated GitHub repository of Dip Bulucu-2

This strategy generates long entry signals by combining a Donchian Channel breakout with a moving average trend filter, volume confirmation, and a macro volatility regime gate based on CBOE VIX and VIX3M ratios. It enters long positions when prices break above

Strategy v5 TrendBreakout
Updated 10 months ago · MIT GitHub repository of Trend-Breakout System mit VIX Heatmap Gate

Market Width

by iceberg211
2 stars

This indicator plots the percentage of stocks in a selected index trading above their 20, 50, 100, 200, and selected other day moving averages. It automatically detects the main chart symbol and switches to the corresponding index ticker such as S&P or NDX, or

Indicator v4 Moving averagesSupport & resistance
Updated 1 year ago · None stated GitHub repository of Market Width

OI Bot Trades

by rellis3
1 stars

Draws trade zones from a text block pasted into a settings box, one box per zone, to the right of the last bar. Each zone shows an entry line coloured for buy or sell, a stop box, a take-profit box and a dashed second target, and zones can come from an options

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of OI Bot Trades

Manchu Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that shades a trading session window on the chart, defaulting to a morning session in the Chicago time zone with weekday toggles. Inputs show an RSI of length 40, a short channel length, a risk-to-reward ratio, fixed dollar risk, leverage an

Strategy v5 Sessions & timeOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Manchu Strategy

An institutional decision engine based on Smart Money Concepts (SMC) that plots structure and zone reactions on the price chart. It automatically detects instrument profiles for Gold, FX, Indices, and Crypto to analyze order blocks, liquidity pools, sweeps, an

Indicator v6 SMC / ICT / price actionSupport & resistance

Fractal Sweep v2

by abhinaynatraj
1 stars

A second version of the Fractal Sweep CISD indicator with more trade management options. Besides detecting a sweep, return and CISD, it lets the user pick the entry point (market or limit at cascade retracement levels), the target reference, and a take profit

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Fractal Sweep v2
1 stars

An overlay that draws a session-anchored VWAP with optional standard-deviation bands and reads price above or below it as a bullish or bearish bias. When VWAP is sloping and a candle pulls back near it and closes in the trend direction on a confirmed bar, it m

Indicator v5 VolumeMean reversion
Updated 4 months ago · None stated GitHub repository of VWAP + Volume Levels

PPP Levels

by onlyspx
1 stars

This indicator draws horizontal price levels from data the user pastes into two text boxes. The first takes a price and a description for key levels, with points of control shown in a different colour. The second takes a description with an ES level and an NQ

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of PPP Levels

Energy Block V13

by shawnwong84
1 stars

A box breakout strategy whose header comments describe a focus on cutting losing trades. It uses a wider ATR stop, an extra early exit when floating loss exceeds a multiple of the box height, a strict EMA 50 trend filter, a volume filter and a trailing profit

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

ORB - Opening Range Breakout calculates the highest high and lowest low during a configurable opening session and trades breakouts during the subsequent trading session. When the closing price crosses above the opening range high, it enters a long position; cr

Strategy v5 BreakoutSessions & time
Updated 7 months ago · None stated GitHub repository of ORB - Opening Range Breakout

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