Pine Library · 712 open-source scripts

Free Index Pine Scripts for TradingView (page 2)

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

2 stars

This indicator applies Omori's law from seismology to post-crash volatility. It flags a mainshock when price falls a set percentage from a recent high, then plots a power-law decay envelope from elapsed bars, productivity, time offset, and decay exponent. Afte

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of Omori Law: Market Shockwaves
2 stars

This strategy executes trend-following scalping setups by combining fast and slow exponential moving averages with a smoothed Stochastic oscillator. It enters long positions when the fast EMA is above the slow EMA and the Stochastic is oversold, and short posi

Strategy v5 TrendOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of WINNER MNQ Strategy - Optimized 2026

Normalized Market Monitor

by realanthonyc
2 stars

Normalized Market Monitor scales the price action of two distinct symbols into a normalized oscillator ranging from -100 to +100 over a chosen lookback period. Plotted in a separate pane, the indicator enables traders to observe and compare the relative positi

Indicator v6 Oscillators & momentumSessions & time
Updated 7 months ago · MPL-2.0 GitHub repository of Normalized Market Monitor

Premarket Metrics Dashboard

by realanthonyc
2 stars

This indicator calculates and displays key premarket metrics in a table dashboard located on the top right of the price chart. It tracks the current price, gap percentage relative to the prior day close, overnight trend bias, premarket high and low, overnight

Indicator v6 Screeners & dashboardsSessions & time
Updated 7 months ago · MPL-2.0 GitHub repository of Premarket Metrics Dashboard
2 stars

This Pine Script v5 strategy calculates two simple moving averages with customizable fast and slow lengths and plots them on the price chart. It generates long signals on fast MA crossover above the slow MA and short signals on the reverse crossover. The strat

Strategy v5 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of MA Crossover Strategy with SL/Targets

EMA Trend Surfer

by nxtaiapp
2 stars

EMA Trend Surfer is a dual-timeframe trend-following strategy designed for index futures such as MES and MNQ. It determines overall trend direction using fast and slow exponential moving averages on a higher timeframe while seeking entry signals on a lower tim

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

This indicator marks regular New York Stock Exchange (NYSE) session open (9:30 AM ET) and close (4:00 PM ET) times directly on the price chart. It draws vertical lines and descriptive text labels at historical session boundaries and projects lines forward for

Indicator v6 Sessions & time
Updated 1 year ago · MIT GitHub repository of NYSE Market Lines & Labels

Index Trend Filter

by jpiedrafita
2 stars

This indicator plots a constant histogram in a separate pane to show whether a selected index is above or below its simple moving average. It requests the index close on the chart timeframe, computes an SMA of a user-set length, and colors the bar lime when pr

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Index Trend Filter

Table 1m 15m 1HR

by srinivas-yarramsetti
2 stars

The Table 1m 15m 1HR indicator renders a multi-asset monitoring table overlay on the top-right of the price chart. It fetches real-time prices and calculates percentage price changes across 1-minute, 15-minute, and 1-hour timeframes relative to the prior day's

Indicator v5 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of Table 1m 15m 1HR

Gamma/X Killzone Sweeps

by OverleveragedWhale
1 stars

An indicator that watches four ICT-style killzones (Asia, London, New York AM and PM) for a sweep of the previous killzone's high or low followed by a close back inside. It marks the setups on the price chart with a fixed target, a stop just past the wick, opt

Indicator v6 SMC / ICT / price actionSessions & time
Updated yesterday · None stated GitHub repository of Gamma/X Killzone Sweeps
1 stars

An overlay for same-day expiry credit spreads on the S&P 500 index that reproduces signals from the author's separate backend. It watches an opening observation window, then flags directional entries when stochastic, RSI, trend, a VWAP alignment gate and a con

Indicator v6 Sessions & timeMean reversion
Updated yesterday · None stated GitHub repository of ZeroDTE Backend Mirror

GEX Levels

by aoimiku
1 stars

GEX Levels is an overlay indicator that draws options gamma exposure levels on NAS100, XAUUSD and BTCUSD charts. A companion Python script calculates the levels, and the user pastes its one-line output into a text setting. The indicator picks the block matchin

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of GEX Levels

GEX PRO - NQ / ES

by WSEVwevx
1 stars

GEX PRO draws options gamma exposure levels on NQ and ES futures charts. The levels are calculated outside TradingView and pasted into a text setting as a payload. The script then maps the index prices to the futures chart and plots zero gamma, call wall, put

Indicator v6 Support & resistance
Updated 2 days ago · None stated GitHub repository of GEX PRO - NQ / ES

RiskSentinel Full Context

by imanisworld
1 stars

An indicator built mainly as a data and alert engine for futures. It tracks an opening range window, New York and London sessions, four EMAs, a volume average and break of structure swings, and sends confirmed-bar alerts that carry this context, with a webhook

Indicator v6 Sessions & timeSupport & resistance
Updated 2 days ago · Custom licence GitHub repository of RiskSentinel Full Context

TopBot 2024 Adaptive

by drewstake
1 stars

Prints manual long and short signal labels on the price chart using an adaptive scoring method trained on recent settled trade paths, with a warmup count before it starts. It uses the previous closed candles, enters at the current open, and applies a minimum d

Indicator v6 AI / machine learningScalping
Updated 3 days ago · None stated GitHub repository of TopBot 2024 Adaptive
1 stars

This strategy for index futures models an ICT sequence on the price chart. Price sweeps a liquidity pool, either the previous day high or low or confirmed swings. A displacement close then shifts market structure, and a limit order is placed at the fair value

Strategy v6 SMC / ICT / price action Repaints
Updated 4 days ago · MIT GitHub repository of Liquidity Sweep, MSS and FVG Entry Model

ES1! Long 1D MA200 MA5

by luifertorres
1 stars

A long-only daily strategy for E-mini S&P futures. It enters long when the 200-period SMA is rising, the candle is bearish and the whole bar sits below the 5-period SMA, and it closes the position when price closes above the 5-period SMA. Size is a fixed one c

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

A strategy that builds a 15-minute opening range box from a configurable session and time zone, drawing its high, midpoint and low lines with price labels. It then trades a break, return and cross sequence around the range, with a reward-to-risk exit model, th

Strategy v6 Sessions & timeBreakout Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of 15-Minute ORB Box Break-Return-Cross Strategy

This strategy trades the New York open on the price chart using an ICT workflow. It sets a higher-timeframe bias from an EMA, structure and session VWAP, requires SMT divergence against a correlated symbol, then waits for an inverse fair value gap and enters o

Strategy v6 SMC / ICT / price actionSessions & time
Updated 11 days ago · MIT GitHub repository of NY Open ICT: HTF Bias + SMT + IFVG Retrace
1 stars

This strategy identifies an Opening Price Range during a specified time window and trades breakouts above or below the established range during the New York trading session. Entries can be filtered using optional RSI extremes and EMA trend direction, restricte

Strategy v6 BreakoutSessions & time
Updated 12 days ago · None stated GitHub repository of NQ NY Session OPR Breakout Strategy

Session Sweep Model

by kxngHADES
1 stars

Detects liquidity sweeps of the Asian or London session range, followed by a reclaim and a break of structure, on the 5-minute chart. It plots entry, stop and take-profit levels with a reward-to-risk target, skips setups whose stop exceeds a multiple of ATR, a

Indicator v6 SMC / ICT / price actionSessions & time
Updated 13 days ago · Custom licence GitHub repository of Session Sweep Model

Combo

by pouyA-png
1 stars

This strategy executes opening range breakout trades during regular trading hours. It calculates a 15-minute opening range high and low alongside a 20-period EMA and a 14-period ATR. Long entries trigger when price crosses above the opening range high while hi

Strategy v5 BreakoutSessions & time
Updated 2 weeks ago · None stated GitHub repository of Combo
1 stars

Visualises a 15-minute opening range breakout routine for the cash session open. It marks the first 15-minute range, waits for a candle close beyond it, then simulates one trade per day by default with the stop at the breakout candle extreme. Exits can trail s

Indicator v6 BreakoutSessions & time
Updated 2 weeks ago · None stated GitHub repository of Patrick 15m Opening Range
1 stars

A Pine v6 indicator that puts intraday reference points on the price chart. It draws Asia, London, New York AM and PM session boxes and kill zones, session highs and lows that extend until swept, period opens with previous highs and lows, fair value gaps, and

Indicator v6 SMC / ICT / price actionSessions & time Repaints
Updated 2 weeks ago · Custom licence GitHub repository of Arnoldd Key Levels, Gaps and Kill Zones

Opening range breakout

by yawningmonsoon
1 stars

This strategy builds an opening-range high and low during a user-defined session, then waits until that session ends. A close above the range enters long and a close below it enters short. The long exit uses the range low as the stop and a limit one range-widt

Strategy v5 BreakoutSessions & time Repaints
Updated 2 weeks ago · MIT GitHub repository of Opening range breakout

LASTRO Risk Overlay

by arthur1535
1 stars

A monthly macro monitor that pulls two FRED series, the Baa credit spread and the NFCI financial conditions index, and converts each into a rolling z-score. Each axis flips into a stress state above an entry threshold and back out below an exit threshold. The

Indicator v6 Volatility & bands Repaints
Updated 2 weeks ago · None stated GitHub repository of LASTRO Risk Overlay

Swing Failure Pattern

by jericoquek
1 stars

This indicator marks swing failure patterns on the price chart: a wick takes out a standing structural high or low and a later 15-minute candle closes back inside. It then tracks a short-term and an intermediate-term market structure shift, and the intermediat

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 weeks ago · None stated GitHub repository of Swing Failure Pattern

TradeGuard Trailing Floor

by gnitro215-beep
1 stars

A Pine v5 indicator that plots a trailing drawdown floor under the price high-water mark, aimed at futures and prop-firm style limits. A dollar drawdown buffer is converted to price points using the dollar value per point and the number of contracts. The floor

Indicator v5 Support & resistance
Updated 4 weeks ago · MIT GitHub repository of TradeGuard Trailing Floor
1 stars

A strategy for US index, energy, metal, agriculture and livestock futures that reads Commitments of Traders data through a TradingView library. It builds a commercial positioning index and combines it with an RSI to decide long and short entries. Exits can use

Strategy v5 Oscillators & momentum
Updated 5 weeks ago · None stated GitHub repository of COT Strategy - Commodities & Index Futures
1 stars

Marks a 15-minute opening range window on the chart and looks for a manipulation candle whose range is at least a set percentage of the daily ATR. When one appears, it draws position-tool style boxes showing a pending entry, a stop placed beyond the wick plus

Indicator v6 Sessions & timeBreakout
Updated 5 weeks ago · None stated GitHub repository of ORB Strategy Solid Position Boxes

SMT Divergence

by Rickylel
1 stars

An indicator that detects SMT divergence between correlated markets, mainly NQ and ES. It pairs confirmed swing highs and lows from both instruments and draws a line and label when one market breaks its reference level and the other does not. The correlated as

Indicator v6 SMC / ICT / price actionDivergence Repaints
Updated 6 weeks ago · MIT GitHub repository of SMT Divergence
1 stars

A strategy built around a session VWAP and ATR bands during the London window, 08:00 to 12:00 UTC by default. It looks for a pullback to an ATR band followed by a VWAP cross, filtered by an RSI threshold, and evaluates signals on confirmed bars. Stops and targ

Strategy v6 Sessions & timeMean reversion
Updated 7 weeks ago · None stated GitHub repository of EMP Session Momentum v6

MKUMARAN RRMS Strategy

by shadowmarketai
1 stars

A long and short strategy that finds the lowest low and highest high over a swing lookback of 20 bars. It enters long near the low or short near the high when the reward-to-risk ratio meets a minimum, sizing each trade from a capital figure and a risk percenta

Strategy v5 Support & resistanceMean reversion
Updated 2 months ago · None stated GitHub repository of MKUMARAN RRMS Strategy

CH033 ORB+ PRO

by sandovalchristian033
1 stars

This indicator identifies failed opening range breakouts and plots session-based analytical overlays directly on the price chart. It defines the New York opening range from 09:30 to 09:45, identifies false breakouts that return inside the range, and triggers r

Indicator v6 Sessions & timeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of CH033 ORB+ PRO

Key Levels

by insomniac-asif
1 stars

Plots common futures reference levels on the price chart: previous day high, low and close, overnight high and low, the opening range, VWAP with bands, round numbers and a session background. Sessions use New York time, with a regular session of 0930 to 1600 a

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 months ago · MIT GitHub repository of Key Levels

SMC Entry Filter

by andriiops
1 stars

This overlay indicator tracks confirmed swing highs and lows as liquidity levels and marks a break of structure when the close moves beyond the last swing. It detects bullish and bearish fair value gaps that meet a minimum ATR size, then plots filtered long an

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MIT GitHub repository of SMC Entry Filter

PineFlow v6 — ORB Risk Strategy

by loveyuanfandj-glitch
1 stars

PineFlow v6 — ORB Risk Strategy executes opening range breakout trades filtered by trend and momentum indicators. It defines an initial opening range and trades breakouts during the active trading session when aligned with fast and slow EMAs, ADX momentum, and

Strategy v6 BreakoutSessions & time
Updated 3 months ago · MIT GitHub repository of PineFlow v6 — ORB Risk Strategy
1 stars

An overlay that scans for trend-continuation pullbacks. It reads a 1-hour EMA stack for bias, waits for a close through the latest confirmed swing to mark a market structure shift, then draws the 0.62 to 0.79 Fibonacci optimal trade entry zone of that leg. A s

Indicator v6 SMC / ICT / price actionTrend
Updated 4 months ago · None stated GitHub repository of Market Structure + OTE
1 stars

A strategy for index futures that combines New York session timing, session VWAP with bands, previous day levels and a volume profile with order flow proxies such as delta and a depth-of-market aggression threshold. Inputs set the aggression threshold, how man

Strategy v5 VolumeSessions & time Repaints
Updated 4 months ago · MIT GitHub repository of Marketman Intraday Profile + Order Flow
1 stars

A fractional differencing Z-score oscillator in a separate pane for one-minute Nasdaq futures that adds a regime gate based on a three-vote model of directional efficiency, range expansion and VWAP slope, allowing entries only in a mean-reversion state. Furthe

Indicator v6 Mean reversionOscillators & momentum
Updated 4 months ago · None stated GitHub repository of FracDiff Z NQ 1m + HMM Policy A

UT Bot v6

by Stolzel
1 stars

This indicator calculates and plots trend-following signals based on an adaptive UT Bot trailing stop mechanism on the price chart. Entry signals trigger on trailing stop crossovers, with sensitivity keys adjusting dynamically between trending and ranging mark

Indicator v6 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of UT Bot v6

Markov-HMM Regime v5

by flaviodesalvo54-del
1 stars

Markov-HMM Regime v5 classifies each bar as Bull, Bear or Sideways using a hidden Markov model whose parameters were trained offline in Python and pasted into the script. It runs the forward algorithm on price and volume features and loads a parameter set matc

Indicator v5 TrendAI / machine learning
Updated 4 months ago · MIT GitHub repository of Markov-HMM Regime v5
1 stars

Calculates institutional liquidity sweeps across a configurable swing lookback period to trade market reversals directly on the price chart. It enters long when price dips below recent swing lows and closes back above, and enters short when price sweeps swing

Strategy v5 SMC / ICT / price actionSupport & resistance

Bond Market Dashboard

by iyoshikawa
1 stars

A table-style dashboard that reads Treasury yields and futures through request.security on a chosen data timeframe, five minutes by default. Six rows show the 10-year yield and its rate of change, the 2-year yield, the yield curve spread and slope, bond future

Indicator v6 Screeners & dashboards
Updated 5 months ago · None stated GitHub repository of Bond Market Dashboard

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