Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 10)

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

4 stars

This strategy trades opening gap fades on the DAX index during the European Xetra session. At the 09:00 CET market open, it measures the opening price against the previous close relative to an ATR threshold. If a gap exceeds the threshold, it fades the move by

Strategy v6 Mean reversionSessions & time
Updated 2 months ago · MIT GitHub repository of DAX Gap Fade [trugurpala]

VGF Price-Volume TEMA

by ryangaraygay
2 stars

This indicator colors chart bars based on a Triple Exponential Moving Average (TEMA) applied to candle body volume (candle body multiplied by volume). It categorizes market flow into trending bullish, trending bearish, or non-trending messy conditions based on

Indicator v5 VolumeCandlestick patterns
Updated 1 year ago · MIT GitHub repository of VGF Price-Volume TEMA
1 stars

A separate-pane indicator that ranks up to ten user-chosen symbols, preloaded with Chinese-listed ETFs for gold, Nasdaq and other indices, by daily momentum and tracks a rotation into the top few, with the count adjustable. An optional market filter compares a

Indicator v6 Oscillators & momentumScreeners & dashboards Repaints
Updated 7 months ago · None stated GitHub repository of ETF Rotation (Daily Momentum)

QQQ Gamma (7DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for QQQ (the Nasdaq-100 ETF) expiring in seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline fro

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

4x4 Futures Ghost Matrix

by knectardev
1 stars

This indicator generates intraday trading signals by combining dual-sigma standard deviation bands, Heikin Ashi candle vectors, and a four-bar confluence score. It triggers long and short signals during defined trading sessions using either mean-reversion boun

Indicator v5 Volatility & bandsMean reversion
Updated 9 months ago · None stated GitHub repository of 4x4 Futures Ghost Matrix
1 stars

A Pine v4 indicator in a separate pane that combines several market breadth and sentiment readings into one smoothed oscillator. It draws on the S&P 500, the VIX, percent-of-stocks-above-average breadth series, a put-call ratio, an RSI and momentum of the inde

Indicator v4 Oscillators & momentumVolatility & bands
Updated 3 years ago · None stated GitHub repository of Tykhe Sentiment Indicator
257 stars

Donald SPX - Options Trading is an indicator designed to assist SPX index option traders by tracking session benchmarks and multi-timeframe moving average data. It calculates a 200-period weighted moving average (WMA) and requests multi-timeframe bar data from

Indicator v5 Moving averagesScreeners & dashboards Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald SPX - Options Trading
9 stars

This separate-pane indicator calculates multi-period volatility regimes by analyzing fast, medium, and slow Average True Range (ATR) metrics alongside volume integration, gap adjustments, and session weighting. It visualizes volatility states using a heat map

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 13 days ago · Custom licence GitHub repository of QVS Pro - Raw Volatility Edition
7 stars

Multi-Ticker Anchored Candles overlays up to three user-selected symbols on the price chart as candles anchored to a chosen period, which defaults to the daily timeframe. Each symbol has its own color and an on or off toggle. Optional drawings mark session bre

Indicator v6 Candlestick patternsSessions & time
Updated 3 months ago · None stated GitHub repository of Multi-Ticker Anchored Candles

Institutional CRT State Engine is an overlay indicator that combines Direction of Liquidity (DOL) bias detection with Candle Range Theory (CRT) pattern recognition. It monitors key institutional session windows—including CBDR, Asia, London, London Lunch, and N

Indicator v6 SMC / ICT / price actionSessions & time

Elton's Screener

by eltonaguiar
4 stars

Elton's Screener is an indicator that runs in a separate pane and scores one of twenty selectable strategies, or auto-selects a route from the symbol type. It filters signals by a minimum confidence level and a higher-timeframe EMA trend alignment. ATR multipl

Indicator v6 Screeners & dashboardsOscillators & momentum Repaints
Updated yesterday · None stated GitHub repository of Elton's Screener
4 stars

This strategy trades exponential moving average crossovers tailored for the German DAX market during Xetra session hours. It enters long positions on bullish EMA crossovers and short positions on bearish crossovers, provided the bar falls within 09:00 to 17:30

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of DAX Germany Strategy [trugurpala]
4 stars

This indicator draws an on-screen dashboard table tracking market structure and technical metrics across higher timeframes such as 2-hour and 4-hour intervals. It uses higher-timeframe data to evaluate swing highs, swing lows, RSI levels, support and resistanc

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 4 years ago · None stated GitHub repository of SnagProfit Logic 2H 4H
1 stars

A separate-pane indicator that ranks four user-chosen ETFs, preloaded with gold, Nasdaq, ChiNext and Nikkei funds, by momentum over a set number of weeks, and tracks a rotation into the top few. Settings choose the weekday that ends each week, rebalance at the

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of ETF Rotation (Weekly Momentum)

SPX Gamma (0DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in the same day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline fr

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPX Gamma (0DTE)
257 stars

Donald SPX - Options Trading is an overlay indicator designed for intraday SPX analysis. It plots a 200-period Weighted Moving Average (WMA) on the price chart while evaluating multi-timeframe market structure across Daily, 15-minute, 5-minute, and 2-minute ba

Indicator v5 Moving averagesTrend Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald SPX - Options Trading
1 stars

Draws a SOFR minus Euribor rate-difference line from data the user pastes into a settings box, so no intraday feed for those rates is needed. The line can be shown in basis points or in scaled units using a scale and offset, with optional EMA smoothing and a b

Indicator v5
Updated yesterday · None stated GitHub repository of C.OG Line - Pasted Data
1 stars

This indicator overlays GEX levels on the price chart for options analysis on stocks and indices. It plots Bullseye, Gamma Flip, Call Wall, Put Wall, Max Pain, Expected Move, Flip Zones, and Top N strikes based on pasted TradeTracker data. Busby levels include

Indicator v6 Support & resistanceVolatility & bands Repaints
Updated 4 months ago · None stated GitHub repository of TradeTracker GEX + Busby

SPX Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from an

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

Supertrend

by akash-yellgetti
1 stars

A Pine v4 strategy built on the classic ATR Supertrend, with the ATR calculated either by Wilder's method or a simple moving average. It plots up and down trend lines with buy and sell labels, optional highlight fills, and alert conditions for direction change

Strategy v4 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Supertrend

Tykhe Vix

by nvFede
1 stars

A Pine v4 indicator in a separate pane that builds a volatility gauge from the S&P 500 index rather than the chart symbol. It measures how far the latest low sits below the highest high over a short window and a ten times longer window, as percentages, and com

Indicator v4 Volatility & bands
Updated 3 years ago · None stated GitHub repository of Tykhe Vix

Pricing Table

by namuan
318 stars

This indicator calculates theoretical options contract values and in-the-money probabilities using historical realized volatility across multiple standard deviations. It displays these metrics in a table overlay directly on the price chart. Users can adjust th

Indicator v4 Volatility & bandsScreeners & dashboards
Updated 2 months ago · MIT GitHub repository of Pricing Table
257 stars

This indicator plots a 200-period weighted moving average (WMA) on the main chart and monitors price deviations across multiple timeframes. It retrieves daily, 15-minute, 5-minute, and 2-minute price data to track distance from the 200 WMA relative to key sess

Indicator v5 Moving averagesSessions & time Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald SPX - Options Trading

Zen Trading Toolkit

by Zen-Tim
29 stars

This indicator plots average bar range (ABR) measured move targets, opening range boxes, and historical key reference levels directly on the price chart. It projects bullish and bearish targets (0.5x, 1.0x, 1.5x, 2.0x ABR) from the previous session's close, al

Indicator v6 Support & resistanceVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen Trading Toolkit

XSP Daily Lotto

by majohnst
1 stars

This strategy models a zero-days-to-expiration (0DTE) Opening Range fade system on the price chart, designed around Mini-SPX index options. It calculates an opening range box and gauges directional sentiment from an external symbol like ES futures. Bullish con

Strategy v6 Sessions & timeSupport & resistance
Updated 4 months ago · None stated GitHub repository of XSP Daily Lotto

REQ TEST

by kevinesk
1 stars

REQ TEST is a minimal diagnostic utility indicator that tests external symbol data accessibility using security requests. It fetches daily closing price data for specified US market tickers including major index ETFs and market indicators such as SPY, QQQ, XLK

Indicator v5 Screeners & dashboards
Updated 4 months ago · None stated GitHub repository of REQ TEST

SPX Gamma (7DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline from

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPX Gamma (7DTE)
257 stars

This strategy overlays a volume-weighted moving average of open prices and standard-deviation bands on the ES futures chart, aimed at the one-minute timeframe. It requests open and low from several higher timeframes with lookahead enabled. Percentage inputs se

Strategy v5 Volatility & bandsMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of ES - Futures 1M No repaint

Zen Trading Toolkit

by Zen-Tim
29 stars

Zen Trading Toolkit is an overlay indicator that plots average bar range measured-move targets from the prior regular-hours close, plus optional yesterday high, low, close and range projections. It draws an N-bar opening-range box and a volatility table of ave

Indicator v6 Volatility & bandsSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen Trading Toolkit
6 stars

This indicator draws Wednesday high, low, and open lines and daily midnight high and low lines on the price chart. It captures the first Wednesdays of each month around 20:30 SAST, shifting the clock for US daylight saving time, and plots the high and low of t

Indicator v6 Support & resistanceSessions & time
Updated 7 months ago · None stated GitHub repository of WED & MIDNIGHT DST System (Alerts)

Quick Stats

by etnt
2 stars

Quick Stats displays key trading metrics directly on the price chart overlay. It calculates Mark Minervini's Trend Template rules by scoring moving average alignments (50, 150, and 200 SMAs), 200 SMA slope, and 52-week high/low proximities. Additionally, it co

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Quick Stats
1 stars

This overlay indicator calculates intraday standard deviation sigma bands using live implied volatility from VIX or a manual percentage input. Designed for index options credit spread placement, it projects 1s, 2s, and 3s expected move boundaries anchored to e

Indicator v5 Volatility & bandsSupport & resistance
Updated 4 months ago · None stated GitHub repository of 3s Credit Spread [DTO]

RS Rating vs KLCI

by kevinesk
1 stars

This indicator computes relative strength by subtracting KLCI index returns from stock returns over a user-defined lookback period. It plots the resulting RS percentage in a separate pane using green for positive values and red for negative values. The default

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of RS Rating vs KLCI

SPX Gamma (DTE:14)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in fourteen days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced offline f

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of SPX Gamma (DTE:14)
257 stars

This strategy is designed for 1-minute S&P 500 futures trading using multi-timeframe data and Fibonacci-weighted standard deviation bands around volume-weighted moving averages. It requests data from multiple higher timeframes without lookahead to prevent repa

Strategy v5 Volatility & bandsMoving averages
Updated 6 weeks ago · None stated GitHub repository of ES - Futures 1M No Repaint Fixed

Zen Trading Toolkit

by Zen-Tim
29 stars

The Zen Trading Toolkit calculates and projects key volatility levels, intraday targets, and session statistics on the price chart. It features three main components: ABR-based measured moves projected from the prior day's close and extremes, an opening range

Indicator v6 Support & resistanceVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen Trading Toolkit

Market Sessions

by benso87
24 stars

This indicator highlights major regional trading sessions directly on the price chart, including Asia, Europe, and America. Users can customize the exact start and stop times in UTC for each region, as well as the background fill colors. Additional settings al

Indicator v5 Sessions & time
Updated 4 years ago · MPL-2.0 GitHub repository of Market Sessions
16 stars

Seykota Alt 22 is a trend-following strategy combining 55-bar Donchian channel breakouts for entries with a Parabolic SAR trailing stop for exits. Position sizing and initial stop-loss levels are determined using Average True Range (ATR). The strategy supports

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 22: Parabolic SAR

This strategy builds the opening range high and low during the first configurable minutes of the New York regular session, then enters on a close break of that range. A long triggers when price crosses above the range high while flat; a short triggers on a cro

Strategy v6 BreakoutSessions & time
Updated 2 months ago · MIT GitHub repository of ES Opening Range Breakout [trugurpala]

PE and PEG Over Time

by jawauntb
3 stars

This indicator calculates the price-to-earnings (P/E) and price-to-earnings growth (PEG) ratios for a target stock and for QQQ. It fetches earnings per share basic one year growth and PEG ratio data using financial API calls, then derives P/E as close divided

Indicator v5
Updated 2 years ago · GPL-3.0 GitHub repository of PE and PEG Over Time

An overlay indicator that records the high and low of a configurable opening range, starting at a set market open hour and minute, and projects the average, sub-levels and second and third support and resistance lines from it. It also plots 9 and 21 EMAs with

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels + EMA Cross Integrated

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