I don’t sell an indicator. The levels on Scott’s GEX Levels are free, they come out twice a trading day, and they will stay free.
What stands between you and lines on your chart is about thirty lines of Pine Script. Your AI can write those in under a minute. That’s faster than I can find my reading glasses.
I’d offer to install it for you, but the morning levels come out at 09:07 ET and I hate mornings. A support desk is just a morning that never ends. So here’s the next best thing: the exact format, a prompt that works, and five steps.
Jump to: Simple version · Live version · The string format · Install · If it breaks
Can an AI really write a TradingView indicator for me?
Yes, for this job. Drawing horizontal lines from a pasted list is simple Pine Script: split the string, turn each price into a line, colour it by its label. Claude, ChatGPT and Gemini all get it right in one go when you give them the exact format and the Pine v6 traps to avoid. The prompts below do both.
Pick your version
Simple: the lines go where the string says
- Uses the fixed-conversion string. The prices are already ES or NQ futures prices, so the script just draws them.
- About 30 lines of Pine. Nothing to measure, nothing to go wrong except the paste.
- The catch: the SPX-to-ES (or QQQ-to-NQ) gap is frozen at the moment the levels were computed.
Live: the lines follow the futures
- Uses the live string (SPX or QQQ prices) and converts on your chart: ES = SPX + basis, NQ = QQQ × ratio.
- It measures that gap itself during cash hours and holds the last value overnight. Through Globex, and after a contract roll, the lines stay on the right futures price instead of drifting.
- That’s why I use this one at night. It takes a slightly longer prompt, and the AI still writes it in one go.
The string format
Both buttons on Scott’s GEX Levels copy one line of text in this shape:
- Entries are separated by
;, and each entry isprice,label. - When two levels share a price they share one entry, and the labels are joined with
|, e.g.7531.25,Put Wall | 0DTE G-2. - Prices have up to two decimals, with trailing zeros dropped (
8100,7687.58). - Labels:
Call Wall,Put Wall,Zero Gamma,G+2,G+3,G-2,G-3, and the same seven with a0DTEprefix (options that expire today). G+2 and G+3 are the second and third biggest positive-gamma strikes after the call wall; G-2 and G-3 mirror them below the put wall.
8131.25,Call Wall;7531.25,Put Wall | 0DTE G-2;7718.75,Zero Gamma;8081.25,G+2;8031.25,G+3;7631.25,G-2 | 0DTE Put Wall;7431.25,G-3;7881.25,0DTE Call Wall;7736.25,0DTE Zero Gamma;7691.25,0DTE G+2;7696.25,0DTE G+3;7581.25,0DTE G-38100,Call Wall;7500,Put Wall | 0DTE G-2;7687.58,Zero Gamma;8050,G+2;8000,G+3;7600,G-2 | 0DTE Put Wall;7400,G-3;7850,0DTE Call Wall;7704.96,0DTE Zero Gamma;7660,0DTE G+2;7665,0DTE G+3;7550,0DTE G-3760,Call Wall;680,Put Wall;726.66,Zero Gamma;800,G+2;770,G+3;700,G-2 | 0DTE G-2;670,G-3;725,0DTE Call Wall;695,0DTE Put Wall;711.38,0DTE Zero Gamma;726,0DTE G+2;720,0DTE G+3;685,0DTE G-3These are from the Friday 30 October 2026 Globex run, so use them to test. For trading, take today’s from the levels page.
The prompts
Copy one, paste it into your AI, and paste back what it returns. Don’t edit the prompt first; every line is there for a reason.
Write a TradingView Pine Script v6 indicator. Return only the script, no explanation.
WHAT IT DOES
Draws horizontal price levels from a text string I paste into its settings.
INPUT
- One input.text_area, default empty, titled "Levels (price,label;price,label;...)".
- Entries are separated by ";". Each entry is "price,label".
- A label can contain " | " when two levels share a price, e.g. "7531.25,Put Wall | 0DTE G-2". Keep the whole label; never split on "|".
- Prices are already in the chart's own price terms (ES or NQ futures). Trim spaces. Skip any entry whose price does not parse.
- Labels used: Call Wall, Put Wall, Zero Gamma, G+2, G+3, G-2, G-3, and the same seven with a "0DTE " prefix.
DRAWING
- One horizontal line per entry, extended both ways, plus a text label a few bars right of the last bar showing the label and the price.
- Colour by keyword, checked in this order: "Call Wall" red, "Put Wall" green, "Zero Gamma" yellow, anything else gray. Make the four colours inputs.
- Labels that start with "0DTE" draw dashed, all others solid. Add a "Show 0DTE levels" checkbox, default on.
PINE V6 RULES (follow all of them)
- First line //@version=6. indicator(..., overlay = true, max_lines_count = 100, max_labels_count = 100).
- Use line.new and label.new only. No plot() calls at all.
- Keep lines and labels in var arrays. On barstate.islast, delete the old ones, clear the arrays, then redraw, so nothing piles up.
- Parse with str.split, str.trim and str.tonumber, and check na(price) before drawing.
- No input or request.* calls inside functions, loops or if blocks.
- No v5 leftovers: no transp parameter, no implicit bool casts (write explicit comparisons), and give var arrays a type (array.new<line>()).
TEST STRING (ES futures prices; after the script compiles I will paste it into the input):
8131.25,Call Wall;7531.25,Put Wall | 0DTE G-2;7718.75,Zero Gamma;8081.25,G+2;8031.25,G+3;7631.25,G-2 | 0DTE Put Wall;7431.25,G-3;7881.25,0DTE Call Wall;7736.25,0DTE Zero Gamma;7691.25,0DTE G+2;7696.25,0DTE G+3;7581.25,0DTE G-3Write a TradingView Pine Script v6 indicator. Return only the script, no explanation.
WHAT IT DOES
Draws GEX levels on an ES or NQ futures chart from a string of CASH-INDEX prices (SPX for ES, QQQ for NQ) and converts them to the futures price live.
INPUT
- One input.text_area, default empty, titled "Levels in SPX / QQQ terms (price,label;price,label;...)".
- Entries are separated by ";". Each entry is "price,label".
- A label can contain " | " when two levels share a price, e.g. "7500,Put Wall | 0DTE G-2". Keep the whole label; never split on "|".
- Trim spaces. Skip any entry whose price does not parse.
- Labels used: Call Wall, Put Wall, Zero Gamma, G+2, G+3, G-2, G-3, and the same seven with a "0DTE " prefix.
CONVERSION
- Cash symbol input, default blank. Blank means auto: "SP:SPX" when syminfo.root is "ES" or "MES", "NASDAQ:QQQ" when it is "NQ" or "MNQ".
- Get the cash close with ONE request.security(cashSymbol, timeframe.period, close) call at global scope. Build cashSymbol at global scope from the input and syminfo.root so it is a simple string.
- Mode input: Auto / Basis / Ratio. Auto = Basis for ES and MES, Ratio for NQ and MNQ.
Basis: futures = cash + b, measured b = close - cash. Ratio: futures = cash * r, measured r = close / cash.
- Measure only on bars inside the cash session: input.session default "0935-1600", tested with time(timeframe.period, session, "America/New_York").
- Smooth with an exponential update on in-session bars only: conv := na(conv) ? raw : conv + (raw - conv) * 2 / (n + 1), with n an input (default 10). conv is a var float, so outside the session (Globex) it holds the last cash-session value. Do not call ta.* functions inside if blocks.
- Manual override input (float, 0 = use the live value).
- Each level draws at the converted price. Its label shows the label, the converted price, and the cash price in brackets.
- A one-cell table in the top right shows the conversion in use, e.g. "ES = SPX + 31.26" or "NQ = QQQ x 41.3092".
DRAWING
- One horizontal line per level, extended both ways, plus a text label a few bars right of the last bar.
- Colour by keyword, checked in this order: "Call Wall" red, "Put Wall" green, "Zero Gamma" yellow, anything else gray. Make the four colours inputs.
- Labels that start with "0DTE" draw dashed, all others solid. Add a "Show 0DTE levels" checkbox, default on.
PINE V6 RULES (follow all of them)
- First line //@version=6. indicator(..., overlay = true, max_lines_count = 100, max_labels_count = 100).
- Use line.new, label.new and table.new only. No plot() calls at all.
- Keep lines and labels in var arrays. On barstate.islast, delete the old ones, clear the arrays, then redraw at the current conversion.
- Parse with str.split, str.trim and str.tonumber, and check na() before drawing. If the conversion is still na, draw nothing.
- No input or request.* calls inside functions, loops or if blocks. The table position must be a constant.
- No v5 leftovers: no transp parameter, no implicit bool casts, and give var arrays a type.
TEST STRING (ES, SPX terms; after the script compiles I will paste it into the input on an ES chart):
8100,Call Wall;7500,Put Wall | 0DTE G-2;7687.58,Zero Gamma;8050,G+2;8000,G+3;7600,G-2 | 0DTE Put Wall;7400,G-3;7850,0DTE Call Wall;7704.96,0DTE Zero Gamma;7660,0DTE G+2;7665,0DTE G+3;7550,0DTE G-3Five steps to lines on your chart
- Open an ES or NQ chart in TradingView and click Pine Editor at the bottom.
- Select everything in the editor, paste the script your AI wrote, and click Save. Give it a name you’ll recognise at 2 a.m.
- Click Add to chart.
- Double-click the indicator’s name on the chart (or click the gear) to open Inputs.
- Paste the string from Scott’s GEX Levels: the fixed-conversion string for the Simple version, the live string for the Live version. Click OK. Repeat when new levels come out: 09:07 ET and 17:37 ET, Monday to Friday.
If it breaks
- Red error when you save: copy the whole error line back to your AI with “fix this and return only the script”. It usually takes one round.
- Nothing draws: the input is empty, or the paste picked up a quote mark or an extra line. The text should start with a number.
- Lines in the wrong place: you pasted the live string into the Simple version, or the fixed string into the Live one. On ES that puts the lines about 30 points off. On NQ it’s so far off you’ll know immediately.
- Live version draws nothing on a fresh chart: it needs one cash session of bars to measure the gap. Scroll back a day or set the manual override.
Questions people ask
Do I need a paid TradingView plan?
No. An indicator you write yourself runs on any plan. The free plan’s limit on indicators per chart still applies.
Which AI should I use?
Any current model that writes code: Claude, ChatGPT, Gemini. If the first answer doesn’t compile, paste the error back. That’s the whole technique.
Is this the same as your GEX Levels Live indicator?
Same idea, fewer bells. Mine has grown a few extras over the months. Yours does exactly what you asked it to, which is more than most software manages.
How often do I need a new string?
Twice a trading day: 09:07 ET for the cash session and 17:37 ET for Globex, Monday to Friday. The indicator keeps the last string until you paste a new one.
Education only, not trade advice. The levels are research data from public CBOE option chains. TradingView and Pine Script are trademarks of TradingView, Inc.
Disclosure. VWAP.biz is an independent site written by Scott West, a paying member of Drysdale Trading Groupâ„¢. The VWAP Wave System™ is Chris Drysdale’s work. He doesn’t own or run this site, but he has reviewed and endorsed it. Links to his book, toolkit, and community are affiliate links: if you buy through them I may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Nothing here is financial advice, and trading futures carries a risk of loss. Full disclosure · Risk disclaimer
Ready for the system itself, not just my lessons on it?
I explain the VWAP Wave Systemâ„¢ from a student’s chair. Chris Drysdale teaches it. Start with his free Core Setup Guide, read the book, or take seven days inside Drysdale Trading Groupâ„¢ and watch it traded live. All of it is online and in English, wherever you are.