Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 12)

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

SPY Gamma (7DTE)

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

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

This indicator scans NSE-listed stocks for momentum signals using Supertrend, multiple EMAs, MACD, and stochastic oscillator. It supports continuous or flip signal modes and displays matching setups in a customizable table at the bottom left of the chart. The

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

This strategy overlays Fibonacci standard deviation bands based on volume-weighted moving averages (VWMA) alongside 10-period open moving averages and pivot high/low levels directly on the price chart. It defines percentage-based stop-loss and take-profit targ

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

Index Member Distribution

by TradersPost
228 stars

Calculates and plots a weighted histogram of constituent returns for major market indices (NDX, SPX, DJIA, and RUT) in a separate pane. Each histogram bin reflects the summed weights of members within that percentage return bracket. The script renders vertical

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

This strategy implements a multi-stage trend following system inspired by John W. Seykota. It generates long and short entries when price breaks above or below Donchian channels of specified length. Each entry adds a unit sized to risk a fixed percentage of cu

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 29: Multi-Stage Scaling
1 stars

A strategy that builds a structural delta volume profile with point of control, value area and high-delta liquidity zones, plus a rolling P0 equilibrium and an acceptance and rejection scoring dashboard. Entries come from the flip of an adaptive ATR band that

Strategy v6 VolumeSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Dynamic P0 Delta Profile Strategy v1.0.4

SR Batch

by 7b809
1 stars

An overlay indicator that draws support and resistance boxes from pivot lows and highs, accepted only when a simple up and down volume delta passes a filter. Box height uses ATR scaled by a width input. It marks when a level holds or breaks, and builds strike

Indicator v5 Support & resistanceVolume
Updated 2 weeks ago · None stated GitHub repository of SR Batch

This intraday strategy fades tests of the previous day high and low during the New York morning session. It identifies mean-reversion opportunities when price touches within a few ticks of the prior day high or low, closes back inside, confirms with above-aver

Strategy v6 Mean reversionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TeleNexus Sovereign PDH/PDL Fade V6

Custom Hours Bars

by ivansoft
1 stars

An indicator in a separate pane that splits the trading day into fixed custom windows, such as 07:00 to 09:50 and 09:50 to 12:00, and measures the wicks of each window as if it were one bar. For every window it records the open, highest high and lowest low, th

Indicator v6 Sessions & time
Updated 1 year ago · None stated GitHub repository of Custom Hours Bars

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
257 stars

This strategy overlay calculates custom pivot high and low levels, averaged price sources, and Ichimoku Cloud components (Tenkan-sen, Kijun-sen, Senkou Span A/B). It also requests lower low price data from a 360-minute timeframe with lookahead enabled, introdu

Strategy v5 TrendSupport & resistance Repaints
Updated 6 weeks ago · None stated GitHub repository of Futures - No Repaint ES 1.0

Range Probability - NQ

by TamaraKGreen
46 stars

This overlay indicator measures fixed-length ranges from a New York session anchor and draws them on the price chart. Boxes mark a range as forming, closed above the previous high, closed below the previous low, or closed inside. It plots the prior range high,

Indicator v6 Support & resistanceSessions & time
Updated 7 weeks ago · None stated GitHub repository of Range Probability - NQ
6 stars

This hybrid trading strategy combines wick rejection support and resistance levels with Smart Money Concepts. It calculates entry confidence scores based on multi-timeframe structure, Fair Value Gap taps, Order Block alignment, and recent Change of Character o

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of WR-SR + SMC Strategy ENHANCED

Smart Money Concepts

by TamTH-Dev
2 stars

This indicator maps market structure and session activity directly on the price chart. It detects and labels internal and swing structures with customizable confluence filters and candle coloring. Additionally, it highlights major trading killzones including N

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 5 weeks ago · None stated GitHub repository of Smart Money Concepts

Magnificent 7 Oscillator

by regalouisei
2 stars

Calculates smoothed momentum across the primary Magnificent 7 mega-cap tech stocks (AAPL, MSFT, GOOGL, AMZN, NVDA, TSLA, META) and optional additional tickers. It aggregates their performance either through equal weighting or market comparison modes against be

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Magnificent 7 Oscillator

SR v5

by 7b809
1 stars

An overlay indicator that marks support and resistance from pivot lows and highs filtered by a volume delta, with zones sized by ATR. Each signal is numbered and given a status of allowed or ignored, depending on whether it repeats the previous allowed type, a

Indicator v5 Support & resistanceVolume
Updated 2 weeks ago · None stated GitHub repository of SR v5

This indicator scans a pasted list of symbols and shows matching long and short setups in a table in a separate pane. It uses a Supertrend crossover, then applies an ATR or fixed-point volatility range so quiet, sideways conditions can be skipped. Optional fil

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper Scanner

AC- MY SCRIPT1

by hasnocool
106 stars

This strategy plots an Optimized Trend Tracker and a selectable moving-average support line on the price chart. It builds the average as SMA, EMA, WMA, TMA, VAR, WWMA, ZLEMA, or TSF, then offsets long and short stops by a percent of that average. Optional mark

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of AC- MY SCRIPT1
16 stars

This strategy enters long or short when a fast exponential moving average crosses a slow one, then sizes each unit from a percentage of equity and an ATR-based initial stop. It can add positions as price moves by a multiple of ATR, up to a set unit limit, and

Strategy v6 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of Seykota Alt 2: EMA Crossover

VP Source Bundle Exporter

by 345-strategies
5 stars

This overlay indicator is a headless export aid for a frozen Volume Profile source bundle. It performs no profile calculation and draws no chart objects. It checks that the chart is a standard ES or MES futures contract matching a typed ticker and a 0.25 minti

Indicator v6
Updated 3 days ago · MPL-2.0 GitHub repository of VP Source Bundle Exporter
1 stars

This mean-reversion strategy implements Larry Connors' 2-period RSI system. It enters long positions when price trades above a long-term simple moving average (default 200) and the 2-period RSI drops below 10. Optional short positions enter below the trend ave

Strategy v6 Mean reversionOscillators & momentum
Updated 3 days ago · MPL-2.0 GitHub repository of RSI-2 (Larry Connors) [JR]

ES point-value 9/21 SMA cross

by pineforge-4pass
1 stars

This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of ES point-value 9/21 SMA cross

VP Sparse Visual Fixture

by 345-strategies
5 stars

This indicator is a visual-design fixture that does not calculate a volume profile. It draws one manually entered, already validated value-area edge, either VAH or VAL, as a thin price zone four ticks wide on the chart. The fixture stays off until enabled, and

Indicator v6 Support & resistance
Updated 3 days ago · MPL-2.0 GitHub repository of VP Sparse Visual Fixture
1 stars

A long-only strategy adapted from an academic study of intraday reversal. It measures the return over a ranking period given in minutes, skips a bar, and buys when that return falls in the lowest percentile of its own recent history, then holds for a set numbe

Strategy v6 Mean reversionScreeners & dashboards
Updated 7 days ago · GPL-3.0 GitHub repository of Intraday Reversal Feasibility Check
257 stars

Marks intraday swing tops and bottoms on the price chart with labels and short horizontal lines. After a morning session reset in the UTC-8 time zone, it tracks the running high and low, measures how far price has moved away from the extreme, and prints a labe

Indicator v5 Support & resistanceSessions & time
Updated 6 weeks ago · None stated GitHub repository of High Low Live Super

Zen-DAX GX

by Zen-Tim
29 stars

This indicator calculates and plots session ranges and key breakout levels for DAX futures directly on the price chart. It defines the overnight Globex session, the Frankfurt pre-market range, and the regular trading hours open using European timezone settings

Indicator v5 Sessions & timeBreakout
Updated 2 weeks ago · MIT GitHub repository of Zen-DAX GX

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

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 7 days ago · GPL-3.0 GitHub repository of Liquidity Entry Zones
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

NQU2023-10M V1

by dearvn
257 stars

The NQU2023-10M V1 strategy calculates 3-period simple moving averages of high and low prices alongside 3-bar price action patterns to detect short-term swings and trend reversals. It enters long or short trades when price action confirms a trend change condit

Strategy v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of NQU2023-10M V1
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
3 stars

Calculates a composite market internals oscillator by averaging the 50-period Relative Strength Index (RSI) across four major U.S. index ETFs: SPY, DIA, QQQ, and IWM. It plots this composite oscillator against a 50 midline in a separate pane, dynamically color

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 5 months ago · None stated GitHub repository of CSW Internals Pro

This indicator estimates a risk score and suggested position size from capital, a user win rate, a profit ratio, and historical price range. It tracks each year's high and low, converts that range into a drawdown percentage, and plots a weighted average of the

Indicator v6 Volatility & bands
Updated 8 months ago · None stated GitHub repository of Nasan Risk Score & Postion Size Estimator
9 stars

FlowBias calculates a composite market momentum metric using Chaikin Money Flow, volume delta, Stochastic, and the Ultimate Oscillator. Plotted in a separate pane, it identifies trend pullbacks and market exhaustion reversals through visual signals and labels.

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of FlowBias [WavesUnchained]

Options Max Pain Calculator [BackQuant] estimates options max pain theory levels, pin risk zones, and market maker gamma exposure directly on the price chart. It models strike prices, put/call volume ratios, implied volatility, and dealer hedging parameters to

Indicator v6 Support & resistance
Updated 8 months ago · None stated GitHub repository of Options Max Pain Calculator [BackQuant]
1 stars

A strategy for MNQ futures that trades with the trend only when a regime score allows it. The score blends higher-timeframe EMA bias, ADX, choppiness, efficiency ratio and persistence, with separate enter and hold thresholds. Four switchable triggers can open

Strategy v6 TrendSessions & time Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of MNQ Multi-Trigger Trend Continuation
257 stars

Snag - Auto Trade Futures is an overlay indicator designed for trend tracking using weighted moving averages (WMAs). It plots 13-period, 48-period, and 200-period WMAs directly on the price chart and identifies momentum shifts when these averages cross. When f

Indicator v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - Auto Trade Futures
6 stars

This indicator maps session-based Candle Range Theory (CRT) cycles by identifying range formation, manipulation, and distribution phases directly on the price chart. It projects range boxes, supply and demand zones, midpoints, and manipulation trendlines accor

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Pro
1 stars

A strategy for MNQ futures built on the 09:30 to 10:00 New York opening range. It looks for one qualified 15-minute breakout candle, checks body size, close location, wick and ATR limits, then waits for a one or two bar pullback on the 5-minute chart. Entry fo

Strategy v6 BreakoutSessions & time Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of MNQ One-and-Done Confirmed Expansion
257 stars

This overlay indicator rebuilds a synthetic candle from the current open and the previous three opens. It treats the highest and lowest of those earlier opens as the range, the prior open as the synthetic open, and the current open as the synthetic close. From

Indicator v5 TrendCandlestick patterns
Updated 6 weeks ago · None stated GitHub repository of Snag - Best Futures Color Trend

Midnight VWAP

by TradersPost
228 stars

The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal

Indicator v6 Moving averagesSessions & time
Updated 3 months ago · None stated GitHub repository of Midnight VWAP
16 stars

This trend-following strategy initiates long or short trades on Donchian channel breakouts. Position sizing is calculated from an Average True Range (ATR) volatility model. The script scales into winning trades up to a user-defined unit limit only when RSI con

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 36: BE + Momentum
2 stars

This indicator tracks macroeconomic and financial conditions to estimate recession risk across multiple market dimensions. It requests external data for the S&P 500 moving average growth rate, US 10-year minus 3-month yield curve inversion, M2 money supply tre

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · None stated GitHub repository of Recession Warning Traffic Light

MNQ Volume Delta Strategy

by rosijay17-cmd
1 stars

An intraday strategy for MNQ futures built around volume delta and cumulative volume delta. Delta comes from either simple bar polarity or lower-timeframe volume. It adds delta z-scores, relative volume, close location, EMA and VWAP alignment filters, plus div

Strategy v6 VolumeDivergence
Updated 7 days ago · GPL-3.0 GitHub repository of MNQ Volume Delta Strategy

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