Gamma Exposure Levels [BackQuant]Gamma Exposure Levels
This indicator allows you to paste Gamma Exposure (GEX) level data directly into a text input on TradingView, automatically parsing the values and plotting them as labeled horizontal lines on your chart. It is designed for traders who use options-derived gamma exposure data as part of their technical analysis and want a fast, visual way to overlay those key price levels onto any chart and timeframe.
Rather than manually drawing lines for each level, this script reads a structured block of GEX output text, extracts every relevant dollar value, and draws color-coded, labeled levels across your chart. If two or more levels share the same price, their labels are automatically merged (for example, "Max Pain / Call Res $75,000") so the chart stays clean and readable.
What is Gamma Exposure (GEX)?
Gamma Exposure refers to the aggregate gamma held by options market makers (dealers) at each strike price. Gamma measures how much a dealer's delta (directional hedge) changes as the underlying price moves. When dealers hold large gamma positions, they must continuously hedge by buying or selling the underlying asset, which can either dampen or amplify price movement depending on the sign of that gamma.
When dealers are long gamma (positive GEX), they hedge against the prevailing trend: buying dips and selling rallies. This creates a stabilizing, mean-reverting effect around high-gamma strikes, making those levels act like magnets or support/resistance zones.
When dealers are short gamma (negative GEX), they hedge in the same direction as the move: selling into drops and buying into rallies. This amplifies volatility and can cause sharp, directional moves once a key gamma level breaks.
Understanding where these gamma levels sit gives traders a structural map of where options market makers are likely to add liquidity or accelerate a move.
How to Use This Indicator
Add the indicator to your chart.
Open the indicator settings and find the "Data Input" group at the top.
Paste your full GEX levels output into the text area. The indicator expects a structured text format (see the example format below).
The indicator will automatically parse all dollar values from the text and plot them as horizontal lines with labels.
Use the toggle checkboxes next to each level type to show or hide individual levels.
Customize colors, line style, line width, label size, label offset, and label position from the settings panel.
Expected Input Format
The indicator parses structured GEX output text. Below is an example of the expected format. Copy and paste a block like this directly into the text area input in the indicator settings:
GEX Levels - 04/03/2026, 12:17:19
All-Expiry Levels:
HVL: $72,000 +$1,841 (+2.62%)
Call Resistance: $75,000 +$4,841 (+6.90%)
Put Support: $60,000 $-10,159 (-14.48%)
0DTE Levels:
0DTE HVL: $68,000 $-2,159 (-3.08%)
0DTE Call: $71,000 +$841 (+1.20%)
0DTE Put: $66,000 $-4,159 (-5.93%)
Advanced:
Zero Gamma: $71,819 +$1,660 (+2.37%)
Max Pain: $74,000 +$3,841 (+5.47%)
Expected Move: $64,238 to $76,081
Flip Zones (All): $67,500
All-Expiry GEX Top 10 (by |gamma|):
1. $60,000 $-10,159 (-14.48%) | GEX: -20,711,741.86
2. $75,000 +$4,841 (+6.90%) | GEX: 18,876,578.2
3. $72,000 +$1,841 (+2.62%) | GEX: 17,530,960.01
4. $70,000 $-159 (-0.23%) | GEX: 17,494,795.02
5. $74,000 +$3,841 (+5.47%) | GEX: 13,573,146.08
6. $73,000 +$2,841 (+4.05%) | GEX: 10,380,107.7
7. $69,000 $-1,159 (-1.65%) | GEX: 10,341,883.98
8. $80,000 +$9,841 (+14.03%) | GEX: 8,636,674.83
9. $71,000 +$841 (+1.20%) | GEX: 7,962,084.65
10. $65,000 $-5,159 (-7.35%) | GEX: -7,257,124.01
0DTE GEX Top 10 (by |gamma|):
1. $69,500 $-659 (-0.94%) | GEX: 3,659,702.74
2. $70,500 +$341 (+0.49%) | GEX: 1,152,595.15
3. $69,000 $-1,159 (-1.65%) | GEX: 703,339.82
4. $72,000 +$1,841 (+2.62%) | GEX: 697,625.91
5. $73,000 +$2,841 (+4.05%) | GEX: 419,096.08
6. $68,000 $-2,159 (-3.08%) | GEX: 294,575.89
7. $74,000 +$3,841 (+5.47%) | GEX: 281,083.42
8. $75,000 +$4,841 (+6.90%) | GEX: 183,191.05
9. $66,000 $-4,159 (-5.93%) | GEX: -172,470.38
10. $68,500 $-1,659 (-2.37%) | GEX: 167,135.87
The indicator only extracts the dollar values from this text. The percentage changes, GEX magnitude values, and other metadata are informational context in the source data but are not plotted by this script.
Level Definitions
Below is a detailed explanation of every level this indicator can parse and plot. These are grouped the same way they appear in the indicator settings.
All-Expiry Levels
These levels are derived from gamma exposure aggregated across all option expiration dates.
HVL (High Volume Level) - The price with the highest total gamma exposure across all expirations. This is the strike where dealers hold the most aggregate gamma and therefore where hedging activity is most concentrated. Price tends to gravitate toward the HVL in positive gamma environments because dealer hedging creates a mean-reverting effect around this level. Think of it as the "center of gravity" for options-driven price action.
Call Resistance - The price level where call-side gamma creates overhead resistance. At this strike, the concentration of call gamma means that as price rises toward it, dealers who are long those calls must sell the underlying to stay delta-neutral. This selling pressure acts as a ceiling, making it harder for price to push through. Breaks above call resistance can signal a shift in positioning or the start of a gamma squeeze.
Put Support - The price level where put-side gamma creates downside support. At this strike, the concentration of put gamma means that as price falls toward it, dealers must buy the underlying to hedge. This buying pressure acts as a floor, cushioning the decline. A break below put support can accelerate selling as dealers flip from buying to selling, potentially triggering a sharp move lower.
0DTE Levels
These levels are derived exclusively from same-day (zero days to expiration) options. Because 0DTE options have extremely high gamma due to their proximity to expiration, they can dominate intraday price action even when their notional size is smaller than longer-dated positions.
0DTE HVL - The same-day high volume level. This is the intraday gamma center of gravity derived solely from options expiring today. It represents the strike where 0DTE dealer hedging is most concentrated and where intraday gamma polarity can flip. Particularly relevant for intraday traders, as 0DTE gamma effects intensify throughout the trading session and peak in the final hours before expiration.
0DTE Call - Same-day call resistance. The intraday ceiling created by 0DTE call gamma. Dealer hedging against these expiring calls creates selling pressure as price approaches this level. Because 0DTE gamma decays rapidly, this level can shift during the session and its strength increases as expiration approaches.
0DTE Put - Same-day put support. The intraday floor created by 0DTE put gamma. Dealer hedging against expiring puts creates buying pressure at this level. Like the 0DTE call level, its influence grows as the trading day progresses and gamma effects intensify near the close.
Advanced Levels
These levels provide additional structural context beyond the core support, resistance, and HVL framework.
Zero Gamma - The precise price where cumulative gamma across all strikes and expirations equals zero. This is one of the most important structural levels in gamma analysis. Above the Zero Gamma level, dealers are net long gamma and their hedging stabilizes price (buying dips, selling rallies). Below it, dealers are net short gamma and their hedging amplifies moves (selling into drops, buying into rallies). Crossing the Zero Gamma level often marks a regime change in how the market behaves, shifting from mean-reversion to trend-following dynamics.
Max Pain - The strike price at which the total value of all outstanding options (both calls and puts) would be minimized if the underlying expired at that price. In other words, it is the price where option holders collectively lose the most money. Max Pain theory suggests that there is a gravitational pull toward this level as expiration approaches, driven by dealers and market makers who benefit from options expiring worthless. It is most relevant in the final days before a major expiration.
Expected Move - The 1-sigma (one standard deviation) expected price range, plotted as two levels: Expected Move Upper and Expected Move Lower. This range represents the statistically expected boundaries of price movement based on current implied volatility. Roughly 68% of the time, price is expected to remain within this range. These levels help traders gauge whether the current price action is within normal bounds or represents an unusual move. A break beyond the expected move range can signal a volatility event or a shift in market regime.
Flip Zones - All price levels where gamma polarity changes sign. At these strikes, dealer hedging behavior transitions from stabilizing (long gamma) to destabilizing (short gamma) or vice versa. Flip zones act as transition boundaries. When price crosses a flip zone, the nature of dealer activity changes, which can lead to shifts in volatility, momentum, and the tendency for price to mean-revert or trend. Multiple flip zones in a narrow range can create a "no man's land" where positioning is mixed and price action becomes choppy.
GEX Top 10
The GEX Top 10 are the ten strike prices with the highest absolute gamma exposure, ranked by the magnitude of their gamma (|gamma|). These represent the strikes where dealer hedging activity is most significant, regardless of whether the gamma is positive (call-dominated, stabilizing) or negative (put-dominated, destabilizing).
The indicator provides a dropdown selector with five options for the GEX Top 10:
None - Do not plot any GEX Top 10 levels.
0DTE - Plot the Top 10 from same-day (0DTE) options only. Best for intraday analysis.
All Expiries - Plot the Top 10 from all expiration dates combined. Best for swing or multi-day analysis.
0DTE 1-5 - Plot only the top 5 from 0DTE options. Useful for reducing chart clutter while keeping the most significant intraday levels.
All Expiries 1-5 - Plot only the top 5 from all expiration dates. Useful for a cleaner multi-day view.
Each of the 10 GEX levels (GEX #1 through GEX #10) has its own individual toggle and color picker, so you can show or hide any specific rank and assign distinct colors to differentiate them.
Overlap Handling
It is common for multiple GEX levels to land on the same price. For example, Max Pain and Call Resistance might both be at $75,000, or a GEX Top 10 strike might coincide with the HVL. Rather than drawing overlapping lines and labels that clutter the chart, this indicator automatically detects when two or more levels share the same price (within a $0.50 tolerance). When a match is found, only one line is drawn at that price and the labels are merged with a "/" separator.
For example, if Max Pain is $75,000 and Call Resistance is also $75,000, the chart will show a single line labeled:
Max Pain / Call Res 75000
This keeps the chart clean and makes it immediately obvious when multiple structural levels converge at the same price, which often signals a particularly significant level.
Customization Options
The indicator provides extensive customization through its settings panel:
Per-Level Controls
Each level type has its own color picker and show/hide toggle on the same line.
GEX Top 10 levels (#1 through #10) each have individual color pickers and toggles.
A dropdown selector lets you choose which GEX Top 10 dataset to plot (0DTE, All Expiries, top 5 only, or none).
Line Style
Line Width: 1 to 4 pixels.
Line Style: Solid, Dashed, or Dotted.
Extend Lines: Both directions, Right only, Left only, or None.
Label Settings
Label Size: Tiny, Small, Normal, Large, or Huge.
Label Offset: Position the labels any number of bars to the right or left of the current bar (-200 to 500).
Label Side: Place labels on the Right or Left side of the chart.
Every toggle and input has a descriptive tooltip that appears on hover, explaining what the level represents and how it is used.
How the Parsing Works
The script uses Pine Script v6 string functions to scan the pasted text for known keywords (such as "HVL:", "Call Resistance:", "0DTE Call:", "Zero Gamma:", "Expected Move:", "Flip Zones:", etc.). For each keyword found, it locates the next "$" character and extracts the numeric value that follows, correctly handling both comma-separated thousands (e.g., $72,000) and decimal values (e.g., $71,819.50).
For the Expected Move, it parses both the lower and upper bounds from the "to" separator (e.g., "$64,238 to $76,081").
For Flip Zones, it scans for every "$" on the line and extracts each value, correctly distinguishing thousands-separator commas from delimiter commas between multiple zone values.
For the GEX Top 10 sections, it identifies the section header ("All-Expiry GEX Top 10" or "0DTE GEX Top 10") and parses the first dollar value from each numbered line, stopping when it hits a new section header or separator.
The indicator only draws on the last bar and uses a delete-and-redraw system to ensure that only one clean set of lines and labels exists at any time. Old drawings are removed before new ones are created on each update.
Important Notes
This indicator does not generate or calculate GEX data. It is a visualization tool that plots externally sourced gamma exposure levels onto your TradingView chart.
The indicator requires you to paste GEX data in the expected structured text format. If the text area is empty, nothing will be plotted.
GEX data is a snapshot in time. Options positioning changes throughout the trading day as new trades are opened and closed. Levels should be updated periodically for the most accurate representation of current dealer positioning.
GEX levels are not guaranteed support or resistance. They represent areas where dealer hedging activity is concentrated, which can influence price behavior but does not determine it. Always use GEX data as one component of a broader analysis framework.
Pine Script® indicator






















