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오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.