Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 9)

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

MNQ Gamma (7DTE)

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 seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2

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

This strategy records the high and low during a configurable opening session, defaulting to 09:30–10:00 exchange time, then locks the range when the session ends. It enters long when price closes above the range high and short when price closes below the range

Strategy v5 BreakoutSessions & time
Updated 11 months ago · None stated GitHub repository of Open Range Breakout Strategy

EZ Algo Trader (Beta)

by turnupdigital
1 stars

A strategy on the price chart that combines several external signal sources into entries, using inputs that read other indicators. Each of up to five signals has a name, long and short source and a usage mode. Positions are sized in contracts, with a maximum t

Strategy v6 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of EZ Algo Trader (Beta)

SPX Sentiment

by nvFede
1 stars

A Pine v4 indicator in a separate pane that divides the S&P 500 index by the VIX volatility index to form a ratio, then compares it with its own average and a z-score style measure over a chosen length. It colours the background by whether the ratio is above o

Indicator v4 Volatility & bandsMean reversion
Updated 3 years ago · None stated GitHub repository of SPX Sentiment
257 stars

This strategy overlays the price chart and builds Ichimoku-style Tenkan, Kijun, Chikou, and Senkou values from a ten-bar average of opens. It plots pivot highs and lows as resistance and support circles and reconstructs Heikin-Ashi-like prices from recent open

Strategy v5 TrendSupport & resistance Repaints
Updated 6 weeks ago · None stated GitHub repository of Dev - Futures No repaint
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap
16 stars

This strategy trades Donchian channel breakouts on the price chart and exits on a shorter Donchian channel. It sizes each unit from a percentage of equity and an ATR-based initial stop, then adds units as price moves a set ATR distance, up to a maximum unit co

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 16: Anti-Chop Filters

TQQQ TSI Divergence

by yalili8521
2 stars

This strategy identifies hidden bullish and bearish divergences between price pivots and the True Strength Index (TSI) indicator. It incorporates an Exponential Moving Average (EMA) trend filter and a customizable trading session time window. Long positions en

Strategy v6 Oscillators & momentumDivergence
Updated 8 days ago · None stated GitHub repository of TQQQ TSI Divergence

This indicator plots a multi-asset correlation heatmap in a separate pane to measure statistical relationships between assets. It calculates Pearson correlation coefficients over a user-specified lookback period between a chosen primary symbol and up to twenty

Indicator v6 Screeners & dashboardsSessions & time
Updated 8 months ago · None stated GitHub repository of Correlation HeatMap Sessions Data Science Stats
2 stars

This indicator tracks market volatility regimes by calculating the ratio between the CBOE Volatility Index (VIX) and the 3-Month Volatility Index (VIX3M). Plotted in a separate pane, a line displays the VIX to VIX3M ratio alongside a dashed reference line at 1

Indicator v5 Volatility & bands
Updated 10 months ago · MIT GitHub repository of VIX Curve Regime (Simple)

OI Profile

by rellis3
1 stars

Shows an options book as a picture on the price chart, from an export pasted into a settings box. It draws reaction levels and optional zones, an expected-move box, and a set of profile columns in the empty space right of the last bar: dealer gamma by strike,

Indicator v6 Support & resistanceVolatility & bands
Updated yesterday · None stated GitHub repository of OI Profile

Manchu Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that shades a trading session window on the price chart, defaulting to a Chicago time zone morning session with weekday toggles. It adds a Donchian channel based trend fill, an optional 100 line, and a WaveTrend oscillator with buy, gold, sell and

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

KLSE Market Regime Dashboard displays a macro market regime overview and sector relative strength metrics in an on-chart table. It retrieves daily data from global macro benchmarks (FBMKLCI, Dow Jones, S&P 500, VIX) and key Malaysian sector leadership proxies

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of KLSE Market Regime Dashboard

QQQ Gamma (0DTE)

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

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

EZ Algo Trader (Beta)

by turnupdigital
1 stars

A strategy on the price chart that turns external indicator signals into entries. Up to five signals can be enabled, each with long and short source inputs, a name and a usage mode. Position size is a fixed number of contracts, and an ATR length and an optiona

Strategy v6
Updated 1 year ago · None stated GitHub repository of EZ Algo Trader (Beta)
114 stars

This indicator compares two user-selected symbols by plotting the z-score of their log-price ratio in a separate pane. It averages the ratio with a chosen moving average, measures standard deviation over the same period, and marks a buy when the ratio falls be

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of Pair Trading - Cointegration
16 stars

This strategy enters long or short when a chart-timeframe Donchian breakout agrees with a higher-timeframe confirmation, using breakout, moving average, or both. It exits on a shorter Donchian channel and can flatten on a time rule. Position size risks a set p

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 17: Dual TF Confluence

LunarTick ORB

by lunarticktrading
7 stars

This indicator calculates and plots Opening Range Breakout (ORB) levels directly on the price chart. It defines the high, low, and midpoint of an opening range based on a configurable duration and session time, with an optional Anchored VWAP (AVWAP) and extens

Indicator v6 Sessions & timeBreakout Repaints
Updated 2 weeks ago · None stated GitHub repository of LunarTick ORB

An overlay indicator that stores the first and second candle after a configurable market open time each day and shows them in a fourteen-column table. For each day it lists the first candle high, low and average, the resistance and support derived from them, a

Indicator v5 Sessions & timeScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Opening Range Historical Table
1 stars

This strategy generates buy and sell signals on the SP500 4H chart using EMA crossovers confirmed by MACD, filtered by ADX trend strength, RSI levels, and active London or New York sessions. It plots EMA 9, EMA 21, and EMA 200 on the price chart. Buy signals e

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Señales EMA + MACD v4b [SP500 4H]

Smash Levels

by onlyspx
1 stars

This indicator draws horizontal levels on the price chart from text the user pastes in, with separate boxes for daily levels, weekly levels and VIX levels. Each line is labelled and coloured green when the close is above it and red when below. On index charts

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

An indicator that shows an adaptive True Strength Index in a separate pane while projecting signals onto the price chart. It detects the instrument type, such as gold, silver or major indices, and the timeframe to pick parameters, adapts reactivity to ATR, and

Indicator v6 Oscillators & momentumScalping
Updated 6 months ago · None stated GitHub repository of TSI Adaptive Scalper v4.2 OVL-SP

QQQ Gamma (1DTE)

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

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

VIX Term Structure

by namuan
318 stars

This indicator plots the implied volatility term structure for US equities in a separate pane. It requests close data for four Cboe volatility indexes: VIX9D (9-day), VIX (30-day), VIX3M (3-month), and VIX6M (6-month) on the current timeframe. For each index,

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of VIX Term Structure

Moon Dev GEX Sweep & CVD

by moondevonyt
92 stars

The indicator detects liquidity sweeps across key price levels and calculates a cumulative volume delta proxy. It uses pivot high and low lookbacks to identify swing points, marking sweeps when price breaks beyond a level and quickly closes back inside. Featur

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Sweep & CVD

Noon Curve

by TamaraKGreen
46 stars

This overlay indicator maps a fixed New York session from 8:00 AM to 4:00 PM into an on-chart noon curve. It draws a range box, a solid noon line, and dashed quarter lines at 10:00 AM and 2:00 PM. It plots AM high and low lines plus offset likely AM levels at

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Noon Curve
16 stars

This price-chart strategy trades Donchian channel breakouts in the style of a Seykota trend system. It enters long or short when price touches the entry channel, using the bar high or low when intrabar mode is on, and can add units after further moves of a set

Strategy v6 TrendBreakout Repaints
Updated 12 months ago · None stated GitHub repository of Seykota Alt 19: Intrabar Execution

Trend Compass 15m

by chris-c-thomas
14 stars

Trend Compass 15m is an intraday trend analysis overlay designed for 15-minute charts. It calculates a triple exponential moving average ribbon, higher-timeframe reference EMAs from 1H, 4H, and Daily periods, RSI and MACD divergences, On-Balance Volume trends,

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · MIT GitHub repository of Trend Compass 15m
7 stars

This indicator compares the price movement of the current chart symbol against up to forty user-specified tickers across a configurable correlation window. It identifies the highest-correlated asset and projects its scaled or rotated price path directly onto t

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Match Finder [theUltimator5]

QQQ Gamma (30DTE)

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

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

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy trades overnight price gaps during regular trading hours on intraday charts. It establishes an opening range and enters counter-trend positions when price fails near overnight extremes. Positions target the previous day's clos

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

A scalping strategy that goes long when a 9 EMA crosses above a 21 EMA while price crosses above VWAP, and short on the opposite pair of crosses. Exits close the trade at 1.5 ATR from the average entry price or on a MACD cross with a new five-bar extreme. A br

Strategy v5 ScalpingMoving averages
Updated 1 year ago · None stated GitHub repository of S50 TFEX Scalping Strategy
257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald - Test Logic Futures
219 stars

This educational script draws a vertical line on the price chart at 9:30 AM New York time to mark the standard US equity market open. It uses the line.new function to plot a thick, semi-transparent gray vertical line extending from above the bar high to below

Indicator v4 Sessions & time
Updated 5 years ago · None stated GitHub repository of 教學-畫垂直線2-使用line

Moon Dev GEX Walls & Trap

by moondevonyt
92 stars

This indicator estimates gamma exposure levels and intraday context for index instruments like SPY and ES. It calculates VWAP with standard deviation bands as a gamma flip proxy, highlighting market regimes through background colors. It plots prior day high, l

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

NQ Stats - Initial Balance

by TamaraKGreen
46 stars

NQ Stats - Initial Balance calculates and displays the Initial Balance range, including the session high, low, and midpoint, for a customizable intraday time window. Once the defined calculation period ends, the indicator overlays a shaded box and a midpoint l

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats - Initial Balance

1-Month RS

by ChartsLector
41 stars

This indicator calculates the relative strength of the current asset compared to a benchmark symbol such as SPY. It stores the price ratio across a configurable lookback window, ranks the current ratio as a percentile from 0 to 100, and plots the result as a c

Indicator v5 Oscillators & momentumTrend
Updated 3 days ago · None stated GitHub repository of 1-Month RS

Trend Compass 1H

by chris-c-thomas
14 stars

Trend Compass 1H provides strategic trend assessment and higher-timeframe context for 1-hour price charts. It plots an exponential moving average ribbon along with key structural reference levels from higher timeframes, including 4-hour, daily, and weekly EMAs

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Trend Compass 1H

TPCharts COT

by TPCharts
10 stars

TPCharts COT fetches and displays Commitment of Traders (COT) report data from Quandl CFTC in a separate pane. It automatically maps the current symbol's root to CFTC dataset codes for futures, commodities, forex pairs, and stock indices. The script calculates

Indicator v4 Screeners & dashboards Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of TPCharts COT

The Candle Pressure Index measures buying versus selling pressure from candle geometry and relative volume. Each bar combines close location, body ratio, and volume rank into a raw pressure value. An exponential moving average of that pressure forms the CPI os

Indicator v6 Oscillators & momentumVolume
Updated 2 days ago · MIT GitHub repository of Candle Pressure Index [WavesUnchained]

Manias, Panics and Crashes

by MeridianAlgo
9 stars

Manias, Panics and Crashes is a separate-pane market regime indicator that quantifies market sentiment and systemic risk. It processes technical metrics including RSI, moving averages, and volume alongside optional intermarket data such as VIX volatility and c

Indicator v6 Oscillators & momentumVolatility & bands
Updated 4 months ago · MIT GitHub repository of Manias, Panics and Crashes

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