Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 4)

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

3 stars

This strategy combines five selectable mean-reversion and swing trading sub-strategies into a unified system. It generates entry signals based on conditions like Internal Bar Strength drops, consecutive lower closes into Tuesday, multi-day channel breakdowns,

Strategy v5 Mean reversionTrend
Updated 2 years ago · MIT GitHub repository of Mean Reversal Portfolio
3 stars

Calculates an Investor's Business Daily (IBD) style Relative Strength (RS) rating and plots an RS line directly on the price chart. It evaluates price performance against a comparative benchmark index (defaulting to NSE:NIFTY). Optional visual markers highligh

Indicator v5 Oscillators & momentumBreakout
Updated 2 years ago · None stated GitHub repository of RS Rating for Indian Market

This indicator plots gamma exposure levels, multi-timeframe breakout structure, and trading session ranges directly on the price chart. It parses input strings containing option metrics to display key levels such as Zero Gamma, Max Pain, Expected Move boundari

Indicator v6 Support & resistanceBreakout
Updated 6 weeks ago · MIT GitHub repository of GEX Levels + Breakout Structure + Session AVWAP — NQ/NDX/QQQ

API Integration Examples

by danielbodnar
2 stars

This indicator demonstrates Pine Script data requests and draws them on the price chart. It plots a four-hour simple moving average plus the daily high and low as step lines, and it plots twenty-bar relative performance versus SPY. It also requests QQQ, VIX, v

Indicator v6 Moving averagesSupport & resistance Repaints
Updated 2 months ago · MIT GitHub repository of API Integration Examples

StdDev Anchor AI

by teaceo-debug
2 stars

The StdDev Anchor AI indicator plots swing high and low points on the price chart using pivot functions. It detects displacement legs based on minimum range and confirmation ratio settings, then applies standard deviation logic to identify anchor levels. MTF c

Indicator v6 Support & resistanceVolatility & bands Repaints
Updated 4 months ago · None stated GitHub repository of StdDev Anchor AI

ORB Breakout Alert

by az9713
2 stars

The indicator identifies upside breakouts from the 30-minute US market opening range between 09:30 and 10:00 AM ET. It triggers a signal when price closes above the opening range high before 11:30 AM ET, provided bar volume exceeds a multiplier of the opening

Indicator v5 BreakoutSessions & time
Updated 5 months ago · None stated GitHub repository of ORB Breakout Alert

MACD & Anchored VWAP Strategy

by adminalphabots
2 stars

This strategy enters long when the MACD line crosses above its signal, price is above a rolling VWAP, and ADX is at least the minimum trend strength. It enters short on the opposite MACD cross when price is below that VWAP and ADX meets the same threshold. Set

Strategy v5 Oscillators & momentumVolume Repaints
Updated 8 months ago · MIT GitHub repository of MACD & Anchored VWAP Strategy

EMA Trend Surfer

by nxtaiapp
2 stars

This multi-timeframe strategy identifies trend direction using fast and slow exponential moving averages from a higher timeframe while seeking trade entries on a lower timeframe. Trend signals are filtered using minimum EMA percentage separation, an optional A

Strategy v5 TrendMoving averages
Updated 11 months ago · MIT GitHub repository of EMA Trend Surfer

Initial Balance

by MuMuLLC
2 stars

The Initial Balance indicator highlights high, low, and 50% midpoint levels calculated over a defined session timeframe, such as the opening hour. It draws primary initial balance bounds, optional extended x2 projection levels, intermediate 50% levels, and sha

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · MIT GitHub repository of Initial Balance

Gamma/X Killzone Sweeps (strategy)

by OverleveragedWhale
1 stars

A strategy version of the killzone sweep idea. In the Asia, London, New York AM and PM windows it waits for the previous killzone's high or low to be swept and reclaimed, then enters on the close with a stop just past the wick and a fixed point target for ES o

Strategy v6 SMC / ICT / price actionSessions & time
1 stars

Draws confluence zones and options open interest levels on the price chart from a text block pasted into a settings box. Zones are coloured by how many layers of levels overlap (two, three, or four and more), and can be limited to volume-anchored zones. Open i

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of C.og - Confluence Zones + OI v2
1 stars

An overlay that builds a skewed same-day iron condor on the S&P 500 index or its ETF and mini equivalents. After an opening observation window it measures price drift and range, then places short strikes at a base distance, shifted asymmetrically when drift is

Indicator v6 Sessions & timeVolatility & bands
Updated yesterday · None stated GitHub repository of ZeroDTE Iron Condor v2

TopBot Adaptive

by drewstake
1 stars

Prints manual long and short signal labels on the price chart using an adaptive method trained on recent settled trade paths. It works on standard time-based charts and scales stop limits with chart bar length. Positions exit only at the stop or target, stay o

Indicator v6 AI / machine learning
Updated 3 days ago · None stated GitHub repository of TopBot Adaptive

ES1! Short 1D MA200 MA5

by luifertorres
1 stars

A short-only daily strategy for E-mini S&P futures, the mirror of the long version. It enters short when the 200-period SMA is falling, the candle is bullish and the whole bar sits above the 5-period SMA, and it closes the position when price closes below the

Strategy v6 Mean reversionMoving averages
Updated 5 days ago · MIT GitHub repository of ES1! Short 1D MA200 MA5

ATAS Levels

by ElroyvOuwerkerk
1 stars

An indicator that redraws levels exported from an ATAS workspace onto a TradingView chart. The user pastes a text feed of lines, rectangles and full-width zones, and the script draws those matching the chart's ES or NQ family with their labels, colours and tim

Indicator v6 Support & resistance
Updated 7 days ago · None stated GitHub repository of ATAS Levels

A strategy that defines a 30-minute range, waits for a breakout, then looks for a retracement into a configurable percentage band before entering on a lower-timeframe trigger. The range can be each closed 30-minute candle, the session opening range, or a matur

Strategy v6 BreakoutSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of 30m Range Retracement + 5m Entry Strategy

Cumulative Volume Index

by AkashSasikumar47
1 stars

A Pine v6 indicator in a separate pane that plots a running total of advancing volume minus declining volume for a chosen US exchange. The exchange can be NYSE, NASDAQ, AMEX, ARCX, US total or Dow Jones. It reads the exchange up-volume and down-volume symbols

Indicator v6 Volume
Updated 2 weeks ago · MIT GitHub repository of Cumulative Volume Index
1 stars

A second version of an index-oriented strategy that uses TRAMA adaptive moving averages with short and long lengths, a hold percentage and a hedge percentage. It can add an RSI slope filter on a chosen timeframe and an optional Turtle-style mode that adds to p

Strategy v6 TrendMoving averages
Updated 8 weeks ago · MIT GitHub repository of Hedge Fund Manager 2 SIGIL

CH033 ORB+ Strategy

by sandovalchristian033
1 stars

A Pine v6 backtest strategy for the New York opening range on index futures. It marks the 09:30 to 09:45 range, then looks for a break by wick or close, a return inside the range, and a close across session VWAP in the opposite direction before entering. Stop

Strategy v6 Sessions & timeBreakout
Updated 2 months ago · None stated GitHub repository of CH033 ORB+ Strategy

Session Boxes

by insomniac-asif
1 stars

Draws shaded boxes on the price chart for intraday futures sessions in New York time: pre-market from 4:00, the New York open from 9:30, lunch from 11:00, afternoon from 13:00 and the close from 15:00 to 16:00. Each box spans the high and low of its window, an

Indicator v6 Sessions & time
Updated 2 months ago · MIT GitHub repository of Session Boxes

TTP VIX Spy

by AubakirovArman
1 stars

Pulls the VIX and builds a MACD histogram from it, then uses that with a SuperTrend, a band width test, price and RSI slope checks and an optional working-days filter to print B1, B2, S1 and S2 labels on the price chart. The SuperTrend fill is coloured by the

Indicator v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of TTP VIX Spy

Abhi's Live Price Action

by abhinaynatraj
1 stars

An overlay built around quarter theory for NQ and ES style futures. Each hour is split into four 15-minute quarters, and the script tints hours and three-hour blocks, draws quarter dividers, labels in-stat and out-of-stat extremes, marks sweepers, bias shifts

Indicator v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Abhi's Live Price Action

An ICT-style overlay that detects a swing leg from confirmed pivots, then draws the 0.62, 0.705 and 0.79 optimal trade entry zone with a projected target. A signal needs a minimum confluence score built from structure shift, liquidity sweep at the leg origin,

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of OTE Optimal Trade Entry Confluence

Marketman Intraday Profile Indicator

by brandonking078-boop
1 stars

An indicator for the price chart aimed at index futures such as ES and NQ. It tracks the New York session, building a session volume profile from price and volume to derive the point of control and value area, and shows session VWAP with bands, previous day hi

Indicator v5 VolumeSessions & time
Updated 4 months ago · MIT GitHub repository of Marketman Intraday Profile Indicator
1 stars

An oscillator in a separate pane that applies fractional differencing to price and converts it to a rolling Z-score for one-minute Nasdaq futures. It looks for snapback entries after a deep extreme beyond the band, with the price turning back, and can add pric

Indicator v6 Mean reversionOscillators & momentum
Updated 4 months ago · None stated GitHub repository of FracDiff Z NQ 1m Quality Setups

Trend + Scalp + Stop Signals

by Ershubhambhagat
1 stars

A price-chart indicator that shows VWAP, a central pivot range, three EMAs, Supertrend and previous-day levels, then scores conditions to print trend signals, scalp signals and stop or exit signals. Minimum score thresholds for trend and scalp signals are adju

Indicator v5 TrendScalping
Updated 5 months ago · None stated GitHub repository of Trend + Scalp + Stop Signals

Titan Edge Multi Strategy

by spfogels-web
1 stars

A futures strategy that bundles five entry styles, pivot rejection, dynamic zone rejection, opening range breakout, VWAP rejection and EMA bounce, each of which can be switched on or off. Trades pass optional filters for VWAP, EMA, RSI momentum, volume, a VIX

Strategy v6 BreakoutSupport & resistance
Updated 5 months ago · None stated GitHub repository of Titan Edge Multi Strategy

FPL Cheatcode

by onlyspx
1 stars

This indicator draws up to six configurable moving averages on the price chart. Each has its own type (SMA, EMA, SMMA, WMA or VWMA), length, source, offset and optional higher timeframe. Defaults are 50 and 200 averages on the chart timeframe plus hourly 21 EM

Indicator v6 Moving averagesTrend
Updated 6 months ago · None stated GitHub repository of FPL Cheatcode

AlgoBot FHB Strategy Long Only

by ghostnathan30-ops
1 stars

A long-only first-hour breakout strategy for Nasdaq futures on the 15-minute chart. It records the 9:30 to 10:30 New York range, then enters at the close of the first bar after 10:30 that closes above it while price is above a 50-period EMA. The stop is an ATR

Strategy v6 BreakoutSessions & time
Updated 6 months ago · None stated GitHub repository of AlgoBot FHB Strategy Long Only

Breadth Dip Buying

by AlanGuo
1 stars

A long-only strategy that combines a market breadth index, the percentage of stocks above their 50-day average, with a long moving average of 225 periods. When price is above the average, it buys if breadth drops below 25. In bear mode, which is off by default

Strategy v6 Mean reversionMoving averages
Updated 7 months ago · None stated GitHub repository of Breadth Dip Buying

NQ SSR Strategy

by CathalF
1 stars

The NQ SSR Strategy is a trading strategy for Nasdaq futures contracts. It generates buy and sell signals based on multi-timeframe pivot high and low detection across 4H, 1H and 5M timeframes. Signals are plotted directly on the price chart as entry and exit p

Strategy v6 TrendSupport & resistance
Updated 7 months ago · None stated GitHub repository of NQ SSR Strategy
1 stars

A strategy for automated order routing that formats alert messages for a MetaTrader connector service. Inputs cover a license identifier field, symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage. Selected i

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

A price-chart overlay for DAX, based on the Advanced School Run Strategy. Inside a configurable session window in Berlin time, it numbers the opening five candles, takes the fourth candle's high and low and draws buy and sell breakout lines offset by a buffer

Indicator v6 Sessions & timeBreakout
Updated 7 months ago · None stated GitHub repository of TraderTom's ASRS Indicator
1 stars

This strategy identifies the Initial Balance session on the chart and detects confluence with VWAP levels for trade signals. It enters positions when price shows rejection at the confluence zone via a candle with sufficient wick to body ratio. The main setting

Strategy v6 Mean reversionSupport & resistance
Updated 7 months ago · MIT GitHub repository of IB + VWAP Confluence

MES Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MES (Micro E-mini S&P 500 futures, scaled from SPY options) expiring in one day. 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 MES Gamma (1DTE)
1 stars

RI SHORT Manual is an overlay indicator for ES and NQ futures that outlines a discretionary short reversal setup. Levels are measured from the previous session close using a risk interval: an entry level above the anchor, with target and stop levels at fixed f

Indicator v6 Support & resistanceMean reversion
Updated 10 months ago · None stated GitHub repository of RI SHORT Manual REVERSAL_TOUCH
1 stars

A pivot breakout strategy designed for the S50 futures on a 30-minute chart. It detects swing highs and lows from left and right bar counts and places stop entries just beyond them. Stops sit one ATR beyond the pivot, targets are ATR multiples set by a risk to

Strategy v6 BreakoutSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy With ATR

COT Financial

by ivansoft
1 stars

An indicator in a separate pane that plots Commitment of Traders financial report metrics for the chart symbol, including open interest and dealer, asset manager, leveraged funds and other reportable positions. Settings pick the metric, the direction, a select

Indicator v6
Updated 1 year ago · None stated GitHub repository of COT Financial

1DTE

by tyler314
1 stars

1DTE is an overlay indicator designed for 1-day-to-expiration option trading analysis. It evaluates market conditions using Average True Range (ATR), consecutive green or red daily streaks, and CBOE Volatility Index (VIX) levels. Users can filter evaluation wi

Indicator v5 Volatility & bandsSessions & time
Updated 4 years ago · None stated GitHub repository of 1DTE
257 stars

This overlay strategy targets one-minute ES futures and plots volume-weighted moving-average bands from the open, scaled by a standard-deviation multiple, plus a slower band from ten-minute opens. A higher-timeframe exponential moving average can filter trades

Strategy v6 Moving averagesVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of ES - Futures 1M No Repaint

Trading Sessions

by iamc1oud
56 stars

Trading Sessions is an overlay indicator that highlights major market trading sessions such as Tokyo, London, and New York directly on the price chart. It draws customizable session boxes along with optional open and close price lines, average session prices,

Indicator v6 Sessions & time
Updated 2 months ago · None stated GitHub repository of Trading Sessions

COT Net Positions

by ChartsLector
41 stars

This indicator fetches and plots weekly Commitment of Traders (COT) net position data in a separate pane using TradingView's official COT library. It displays positioning breakdowns for selected futures markets under either Legacy or Financial (TFF) reporting

Indicator v6 Volume
Updated 3 days ago · None stated GitHub repository of COT Net Positions

Macro VN Indices Research

by Thanhtran-165
38 stars

This indicator maps a composite macro risk score onto Vietnamese indices and sectors in a separate pane. It combines liquidity stress, curve shape, the international yield spread, and the ten-year versus policy-rate spread, then groups regimes with hysteresis.

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of Macro VN Indices Research

This indicator detects Smart Money Technique (SMT) intermarket divergences across multiple timeframes, ranging from one minute to one week. It compares the current chart symbol against up to two benchmark symbols to identify non-confirmations in swing highs an

Indicator v6 SMC / ICT / price actionDivergence
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Multi-Timeframe SMT + Timecycle Scanner
16 stars

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

Index Intraday Analyst

by chris-c-thomas
14 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst

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