Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 11)

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

MES + XSP Busby Pivot

by majohnst
1 stars

This indicator draws Busby-style pivot levels on the price chart for XSP, using a selectable MES or ES futures symbol. It stores New York premarket highs, lows, and closes on the chart and on a 15-minute MES series, then builds an opening-range box after the r

Indicator v5 Support & resistanceSessions & time
Updated 4 months ago · None stated GitHub repository of MES + XSP Busby Pivot
1 stars

A strategy that reads an external oscillator, called the thermometer, through a source input and trades a chosen signal symbol, SPX by default, according to high and low temperature thresholds of 75 and 25. Buy and sell modes include buying high and selling lo

Strategy v6 Oscillators & momentumMean reversion Repaints
Updated 7 months ago · None stated GitHub repository of Thermometer Strategy

SPX Gamma (DTE:30)

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 thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced offline fro

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

ES Absolute Trigger

by knectardev
1 stars

This strategy captures the first bar of each new day as an opening range and plots those high and low levels on the price chart. It enters one long position if price trades above the range high, or one short if price trades below the range low, then blocks fur

Strategy v5 BreakoutSessions & time
Updated 9 months ago · None stated GitHub repository of ES Absolute Trigger
257 stars

This overlay strategy is built for ES futures on the one-minute chart. It plots a volume-weighted moving average of price opens and standard-deviation bands at Fibonacci ratios, plus a second longer volume-weighted average from a higher-timeframe open. Call an

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

This overlay script is a headless volume-profile parity shell rather than a signal indicator. It fixes a one-minute source, Chicago regular-hours session, four-tick rows, a 70 percent value area, and named algorithms for the point of control, value area, and r

Indicator v6 Volume
Updated 3 days ago · MPL-2.0 GitHub repository of VP Research Preview — Profile Parity Shell
4 stars

This strategy trades E-mini and Micro E-mini S&P 500 futures on the price chart. It enters long when a fast EMA crosses above a slow EMA during New York regular trading hours, and enters short on the opposite cross unless long-only mode is on. Each entry place

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ES S&P500 Strategy [trugurpala]

A strategy meant for a 5-minute chart that detects a break of a delta-based level on a 15-minute context, waits for a retest from the correct side, then enters on a reclaim candle. Gates include estimated pressure rotation, candle body and close location, entr

Strategy v6 VolumeBreakout Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Delta Break and Retest Stage 8.0.2 Profile and Entry Fix

An overlay indicator that captures the high and low of an opening range starting at a configurable hour and minute, then computes the range average and extension levels from it. A 9 and 21 EMA pair is plotted with triangle markers on crossovers. Toggles show o

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

XSP Daily Lotto

by majohnst
1 stars

This indicator tracks intraday key levels, premarket ranges, and opening range boundaries on index instruments like XSP. To compensate for missing premarket data on index charts, it streams and scales MES futures data to compute sentiment thresholds and target

Indicator v5 Support & resistanceSessions & time Repaints
Updated 4 months ago · None stated GitHub repository of XSP Daily Lotto

IB25 Strategy

by riegodavid-git
1 stars

A New York session strategy built on the initial balance, the price range of the first hour after the 09:30 Eastern open. It tracks the high and low of that opening window, draws a box, computes an anchored session VWAP and, once the range has formed, scans a

Strategy v5 BreakoutSessions & time
Updated 4 months ago · None stated GitHub repository of IB25 Strategy

SPX Gamma (DTE:55)

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 about fifty-five days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced o

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

ES Alpha (Logic Fix)

by knectardev
1 stars

This strategy tracks the opening 1-minute range during regular market hours and trades the subsequent breakout on the price chart. It locks the high and low of the 09:30 to 09:31 session and plots both levels as trigger lines. A long position is taken if price

Strategy v5 BreakoutSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Alpha (Logic Fix)
257 stars

The ESH2023 5M strategy is a Pine Script v5 indicator for E-mini S&P 500 futures trading on the 5-minute chart. It calculates a Stochastic oscillator from Ichimoku cloud high/low averages using inputs for K period, D period, and smoothing. The script signals l

Strategy v5 Oscillators & momentumBreakout Repaints
Updated 6 weeks ago · None stated GitHub repository of ESH2023 5M - No repaint V1.1

Zen ATH Bands

by Zen-Tim
29 stars

Zen ATH Bands calculates the all-time high or current price of an asset and projects horizontal reference lines representing percentage pullback levels. It draws up to seven user-defined drawdown thresholds below the baseline, complete with custom price and pe

Indicator v5 Support & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen ATH Bands

This strategy trades Donchian breakouts on the price chart and sizes each unit from a percentage of equity. It allows long and short entries, places an ATR initial stop, trails with a chandelier stop, and can add units as price moves by a multiple of ATR, up t

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 24: Vol-Adjusted Targets

A strategy that replaces the break detector of its earlier stage with a CUSUM change point test on the chart timeframe, using a lookback, threshold and slack setting. After a change point it waits for a retest of the regime zone from the correct side, a reclai

Strategy v6 BreakoutVolume Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Delta Break and Retest Stage 9 Change Point and Volume Pressure

An overlay indicator that builds opening range levels from a configurable market open time in the Asia/Kolkata timezone, then derives sub-levels and second and third support and resistance lines from the range. It adds 9 and 21 EMAs with crossover arrows and c

Indicator v5 Sessions & timeSupport & resistance

SPX Gamma (DTE:85)

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 about eighty-five days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced

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

ES Professional Fade

by knectardev
1 stars

ES Professional Fade is an intraday mean-reversion strategy designed for fading opening gaps on ES futures. It identifies market opening gaps using defined percentage and ATR thresholds, then places stop orders to fade the move while utilizing market breadth e

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
257 stars

This strategy executes trades on futures contracts by combining custom smoothed price bars with a multi-timeframe stochastic oscillator and Ichimoku elements. It calculates percentage-based stop-loss and take-profit targets for long and short positions. It ove

Strategy v5 Oscillators & momentumTrend Repaints
Updated 6 weeks ago · None stated GitHub repository of ESH2023 5M Futures No Repaint
16 stars

This strategy enters long or short Donchian breakouts and sizes each unit from a percentage of equity and ATR. It sets an initial ATR stop, trails with a chandelier stop, and tightens that trail after a chosen number of bars. Optional profit targets close one

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 25: Time Profit Lock

SPY Trending

by dearvn
4 stars

SPY Trending is an indicator designed for SPY that evaluates trend alignment across multiple timeframes using Exponential Moving Averages (5, 10, and 20 EMAs). It fetches data across lower and higher timeframes to evaluate buy and sell conditions, displaying t

Indicator v5 Moving averagesScreeners & dashboards Repaints
Updated 4 years ago · None stated GitHub repository of SPY Trending

Heikin Ashi Trend

by Basant1Saini
1 stars

Heikin Ashi Trend is a trend-following strategy that calculates Heikin Ashi candle values and moving averages directly on the main price chart. It generates long and short entry signals when a user-defined number of consecutive Heikin Ashi bars align with fast

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Heikin Ashi Trend

SPY Gamma (0DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) 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 from

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

ES Professional Fade

by knectardev
1 stars

ES Professional Fade is an overlay strategy aimed at the ES futures contract. This archived file is only a placeholder and contains no entry, exit, or order logic. Its changelog says the version adds opening-range calculation with freeze logic, session-boundar

Strategy v5 Sessions & timeSupport & resistance
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

This strategy combines Arnaud Legoux Moving Average percentage price change calculations with an adaptive Gaussian Moving Average to generate trend-following signals. Long and short entries are triggered when the ALMA change calculation crosses above or below

Strategy v5 Moving averagesOscillators & momentum
Updated 6 weeks ago · None stated GitHub repository of ESM2024 - ALMA Smoothed Gaussian Moving Average
16 stars

This overlay strategy trades Donchian breakouts in either direction. The first unit is sized from a risk percent of equity and an ATR-based initial stop; later units are added at fixed ATR steps and are progressively smaller, up to four units. Optional profit

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 26: Fractional Pyramid
9 stars

This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus

Indicator v6 VolumeOscillators & momentum
Updated 2 days ago · MIT GitHub repository of CVD Bias [WavesUnchained]
1 stars

An overlay indicator that records the high and low of an opening range from a configurable open time and draws high, low and average lines to the session end. Optional toggles add sub-levels, second and third support and resistance lines and rounded buy strike

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels v10 Formula Toggle

SPY Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) 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 o

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

ESU2023 Futures 1M

by dearvn
257 stars

This strategy calculates volume-weighted moving averages and standard deviation Fibonacci channels using price data from multiple timeframes. It overlays these volatility bands directly on the main price chart to identify potential trend levels. Automated trad

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of ESU2023 Futures 1M
16 stars

This trend-following strategy plots Donchian channels and execution signals directly on the price chart. It calculates Average True Range volatility to determine position sizing based on a fixed risk percentage of account equity. Long and short entries trigger

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 27: Asymmetric R/R

Volatility Risk Premium

by eddiebelaval
7 stars

Calculates the Volatility Risk Premium (VRP) by comparing implied volatility against realized volatility calculated using Close-to-Close, Parkinson, or Garman-Klass methods. It plots VRP values as a histogram or line in a separate pane with optional Bollinger

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of Volatility Risk Premium

The Stock and NQ Futures Convergence Strategy identifies trading opportunities by comparing the Relative Strength Index of the active chart stock against NQ futures. It enters a long position when NQ RSI rises above the upper threshold while the stock RSI stay

Strategy v5 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Stock and NQ Futures Convergence Strategy

SPY Gamma (30DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPY (the S&P 500 ETF) expiring in thirty 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 SPY Gamma (30DTE)

ES Professional Fade

by knectardev
1 stars

This strategy executes gap-fade trades on E-mini S&P 500 futures during Regular Trading Hours. It compares the current market open with the prior session close to identify opening gaps, qualifying entries using minimum gap percentages, index point minimums, an

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

Simple Market Metrics v5

by turnupdigital
1 stars

An indicator in a separate pane that shows buy and sell signals with optional chop, moving average and time-of-day filters. It adds profit target lines at a tick distance, a profit wave band, background trend colouring and candle colouring. Built-in text descr

Indicator v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of Simple Market Metrics v5

This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup: Vijay Thakare Option Buying Scalping Setup

ESU2023-10M - V1

by dearvn
257 stars

ESU2023-10M - V1 is an intraday trend-reversal strategy designed for index futures contracts on the price chart. It calculates a 3-period moving average of candle highs and lows alongside specific three-bar price action patterns to detect short-term swing high

Strategy v5 TrendCandlestick patterns
Updated 6 weeks ago · None stated GitHub repository of ESU2023-10M - V1
228 stars

This overlay indicator decomposes a chosen index move into approximate contributions from its largest members. It tracks NDX, SPX, DJIA, or RUT using hard-coded weights and a table of member percentage changes versus the prior daily close, the regular-hours op

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Index Concentration & Contribution

LeMan Trend Indicator

by capissimo
114 stars

LeMan Trend Indicator calculates buy and sell values using normalized differences between current and highest/lowest highs and lows over adjustable lookback periods. It plots a zero line signal in a separate pane and normalized buy and sell lines in colors. Ma

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of LeMan Trend Indicator
106 stars

This strategy runs on the price chart and enters long when a fast simple moving average crosses above a slow one, and short on the opposite cross, while closing the other side. Entries also need ATR above a filter, a pullback check, a minimum candle-body chang

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 9:22 5 MIN 15 MIN BANKNIFTY
16 stars

Implements a Donchian breakout trend-following strategy filtered by ADX trend strength. It initiates long or short positions when price breaks Donchian channel extremes and ADX exceeds a specified threshold. Positions are sized using ATR volatility with Turtle

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 28: ADX Filter

A merged strategy that combines two entry engines on one chart. The anchor trail engine uses a dynamic equilibrium level called P0, built from a rolling volume and delta profile, and scores acceptance and rejection against structural levels such as POC and val

Strategy v6 VolumeSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Dynamic P0 Delta + DBR Change-Point Merged Strategy

V12 Swing Sniper Pro

by kevinesk
1 stars

V12 Swing Sniper Pro is a swing trading indicator for Bursa Malaysia stocks. It layers macro and sector filters atop Minervini-style trend quality gates and RSI checks to validate bullish setups. The script fires buy signals when coiling, pullback proximity, b

Indicator v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of V12 Swing Sniper Pro

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