OPEN-SOURCE SCRIPT
업데이트됨 GEX Levels - Dealer Gamma Exposure

GEX DAILY LEVELS — Dealer Gamma Exposure Levels
This indicator plots dealer gamma exposure (GEX) levels as horizontal lines, computed from index option chain data and supplied via a compact text string. It is designed for NQ/NDX but works with any instrument given matching data.
█ METHODOLOGY
The levels follow the standard "naive" dealer positioning convention (dealers long calls, short puts). Per-strike net GEX = gamma × open interest × contract multiplier × spot² × 1%, summed with calls positive and puts negative.
- Call Wall / Put Wall — strikes holding the maximum positive / most negative net GEX across expiries. Dealer hedging around these strikes dampens moves toward them in positive gamma (pinning) and defines major resistance/support.
- 0DTE Walls — the same computation restricted to the current session's expiry, isolating the most reactive intraday hedging flows.
- Gamma Flip — the spot level where aggregate dealer gamma changes sign, obtained by recomputing Black-Scholes gamma across a grid of hypothetical spot prices. Above it, hedging is mean-reverting; below it, hedging amplifies moves.
- Expected Move — the at-the-money straddle price for the nearest expiry: the move the options market is pricing for the day. Fractional bands (e.g. ±50%, ±150% of the straddle) are included because the straddle approximates 0.8 standard deviations, giving each band a defined statistical meaning.
- 1D Min/Max — the one-day range implied by annualized ATM volatility (IV/√252), a complementary volatility-based estimate.
- Max Pain — the strike minimizing total option holder payout at the nearest expiry.
- G+/G− — remaining top strikes ranked by absolute net GEX.
█ WHY A TEXT STRING INPUT
Open interest is static intraday, so gamma levels are constant for the session. Injecting them as data rather than recomputing on chart makes the indicator repaint-free, lookahead-free and provider-agnostic: any gamma data source, or your own option-chain computation, can feed it.
Format: price,label,kind;price,label,kind;...
Kind codes: res, sup (walls) · res0, sup0 (0DTE walls) · flip · emh, eml (expected move) · emb (fractional bands) · ivh, ivl (1D range) · mpain · gpos, gneg
Example: 21100.0,Call Wall,res;20950.5,Gamma Flip,flip;20800.0,Put Wall,sup
█ FEATURES
- Per-family styling: visibility, color, width (1–5), line style for each level type
- Alerts on price crossing walls, 0DTE walls or the gamma flip
- Proximity table showing the nearest level above and below current price with distances
- Label size, offset and price display options
█ LIMITATIONS
Levels are a pre-session snapshot; walls do not move intraday since open interest is settled overnight. The gamma flip may legitimately be absent in strongly positive gamma regimes. Educational tool; nothing here is financial advice.
This indicator plots dealer gamma exposure (GEX) levels as horizontal lines, computed from index option chain data and supplied via a compact text string. It is designed for NQ/NDX but works with any instrument given matching data.
█ METHODOLOGY
The levels follow the standard "naive" dealer positioning convention (dealers long calls, short puts). Per-strike net GEX = gamma × open interest × contract multiplier × spot² × 1%, summed with calls positive and puts negative.
- Call Wall / Put Wall — strikes holding the maximum positive / most negative net GEX across expiries. Dealer hedging around these strikes dampens moves toward them in positive gamma (pinning) and defines major resistance/support.
- 0DTE Walls — the same computation restricted to the current session's expiry, isolating the most reactive intraday hedging flows.
- Gamma Flip — the spot level where aggregate dealer gamma changes sign, obtained by recomputing Black-Scholes gamma across a grid of hypothetical spot prices. Above it, hedging is mean-reverting; below it, hedging amplifies moves.
- Expected Move — the at-the-money straddle price for the nearest expiry: the move the options market is pricing for the day. Fractional bands (e.g. ±50%, ±150% of the straddle) are included because the straddle approximates 0.8 standard deviations, giving each band a defined statistical meaning.
- 1D Min/Max — the one-day range implied by annualized ATM volatility (IV/√252), a complementary volatility-based estimate.
- Max Pain — the strike minimizing total option holder payout at the nearest expiry.
- G+/G− — remaining top strikes ranked by absolute net GEX.
█ WHY A TEXT STRING INPUT
Open interest is static intraday, so gamma levels are constant for the session. Injecting them as data rather than recomputing on chart makes the indicator repaint-free, lookahead-free and provider-agnostic: any gamma data source, or your own option-chain computation, can feed it.
Format: price,label,kind;price,label,kind;...
Kind codes: res, sup (walls) · res0, sup0 (0DTE walls) · flip · emh, eml (expected move) · emb (fractional bands) · ivh, ivl (1D range) · mpain · gpos, gneg
Example: 21100.0,Call Wall,res;20950.5,Gamma Flip,flip;20800.0,Put Wall,sup
█ FEATURES
- Per-family styling: visibility, color, width (1–5), line style for each level type
- Alerts on price crossing walls, 0DTE walls or the gamma flip
- Proximity table showing the nearest level above and below current price with distances
- Label size, offset and price display options
█ LIMITATIONS
Levels are a pre-session snapshot; walls do not move intraday since open interest is settled overnight. The gamma flip may legitimately be absent in strongly positive gamma regimes. Educational tool; nothing here is financial advice.
릴리즈 노트
UPDATE — Multi-market support: NQ · ES · SPX- Three separate paste zones in the settings (NQ, ES, SPX), so each market keeps its own levels string and nothing can get mixed up.
- New "Market" selector, defaulting to Auto: the indicator reads the chart symbol and applies the matching levels automatically (NQ/MNQ/NDX/US100 → NQ · ES/MES/US500 → ES · SPX/SP500 → SPX). Manual override available for unusual tickers.
- The proximity table now displays the active market next to the nearest levels, confirming at a glance which set is applied.
- ES and SPX levels are derived from the SPX option chain (ES via the futures/index basis, SPX at index scale); NQ from the NDX chain, unchanged.
Migration: existing NQ strings keep working — paste them into the "NQ — levels string" zone. Settings from previous versions are otherwise unchanged.
릴리즈 노트
UPDATE — ATR open grid, HGEX level, family master toggles- The Daily Open grid is now volatility-scaled: levels sit at ±0.5 to ±3.0 × ATR(14, daily) from the session open instead of fixed percentages, so distances adapt to the current volatility regime. Labels read "+0.5 ATR", "-1 ATR", etc. (percent labels appear only as a fallback when ATR data is unavailable).
- New HGEX level: the strike carrying the largest absolute net gamma — the session's dominant hedging magnet. Only plotted when distinct from the Call/Put Wall, with its own styling family.
- Three family master switches at the top of the settings — GEX (walls, 0DTE, flip, HGEX, Max Pain, G±), EM · 1D, and Open — toggle whole level families in one click. Per-level settings still apply within an enabled family.
Migration: strings from previous versions keep working; regenerate today's string to get the ATR-scaled grid and HGEX.
릴리즈 노트
Chart update릴리즈 노트
UPDATE — GOLD ADDEDTwo new level fields: GOLD GC and GOLD XAUUSD.
Gold is split into two separate fields on purpose. Futures trade
above spot because of carry, so a level list built on the futures
scale does not belong on a spot chart. Paste each list in its
matching field.
The active market is picked automatically from the chart symbol
(GC / MGC futures -> GOLD GC, XAUUSD and spot gold -> GOLD XAUUSD),
or can be forced with the Market input.
Also in this update: the level string fields are now single-line
inputs instead of text areas, so the settings panel stays compact.
릴리즈 노트
- GEX AUTO-UPDATE full compatible and working now.릴리즈 노트
Configurable Proximity HUD* Added a dedicated settings section for the proximity HUD.
* Added nine selectable HUD positions.
* Added five text size options, from Tiny to Huge.
* Added independent controls for the market title, column headers, nearest level above, and nearest level below.
* Level name, price, distance in points, and distance in percentage can now be displayed or hidden individually.
* The HUD can search across all available levels, visible level families only, or key GEX levels only.
* Added customizable background, border, text, and directional colors.
* The HUD and key-level alerts now follow the configured manual price offset for consistency with the plotted levels.
This update improves display customization and consistency. It does not add trading signals or modify the underlying level data.
릴리즈 노트
- Adding text size custom option.릴리즈 노트
This update focuses on chart readability, accessibility, and display customization.Changes:
* Redesigned level labels with cleaner Minimal, Glass, and Tinted styles.
* Improved Above and Below label positioning so text remains closer to the corresponding price level.
* Added an optional symbol before level names. It can be enabled or disabled in the display settings.
* Added Clean, Subtle Glow, and Focus Glow rendering modes for level lines.
* Added adjustable glow intensity and spread.
* Improved default typography and reduced unnecessary visual elements.
* Added font family, bold text, background, transparency, and separator controls.
* Refined the HUD styling with optional directional row highlighting.
* Added a quick control to temporarily hide or restore all manually pasted levels without deleting the saved input strings.
* Preserved the existing level parsing, price adjustment, visibility settings, alert conditions, and HUD calculations.
This is a visual and usability update. It does not change the underlying level data or introduce trading signals.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.