Most people who ask an AI for Pine Script ask for an indicator: a moving average ribbon, a divergence finder, a session high and low, a volume spike marker. Indicators look easier than strategies, and the first draft usually is. The trouble starts afterwards, when the markers look perfect on yesterday's chart and land a few bars late in real time, or when the labels from last month quietly disappear. Those are not compile errors, so a compile check does not catch them. This post compares ChatGPT and PineScripter on building a TradingView indicator as of 29 November 2026. Both can run the same GPT and Claude model families, so the difference is what each one lets you see and check.
Short answer
ChatGPT writes good first drafts of indicators, can read a chart screenshot you paste in, and with TradingView's MCP Server connected can compile the script and calculate it on any TradingView symbol, returning the plot values of recent bars as numbers. It does not draw the result, and labels, lines and boxes are not part of what the tool returns, so you check the visuals in TradingView yourself. PineScripter checks and fixes each version, edits only the lines you asked about, draws plots, shapes and labels on its own chart, and lets you replay the run bar by bar, check for look-ahead, and measure what the triggers did afterwards with Indicator Analysis. It also sends free email alerts from your own indicator on closed bars. Its chart covers 308 crypto spot markets only.
Key facts
- TradingView's MCP Server tool run_pine_indicator calculates a script on TradingView's servers and returns plot values for the latest bars (50 by default, up to 1,000); TradingView's docs say nothing is rendered or saved and only data plots are returned.
- Through the MCP Server, ChatGPT can create only simple price alerts; TradingView's docs say indicator-based alerts are not supported yet.
- Pine Script keeps about the last 50 labels, lines or boxes of each kind by default and up to 500 when max_labels_count, max_lines_count or max_boxes_count is set; older ones are deleted automatically.
- A Pine Script indicator can use at most 64 plot counts.
- PineScripter draws a script's plots, shapes and labels on its own chart on real market data, with up to 20,000 bars per run.
- Replay hides everything after the current bar, and a look-ahead check reruns the script on cut-down data to find output that depends on future bars.
- Indicator Analysis measures how price moved 1, 5, 10 and 20 bars after each trigger, and flags runs that are not clean enough to trust.
- PineScripter's indicator alerts by email run on closed bars from 15 minutes to 1 week: 3 alerts and 20 emails a day on the free plan.
| ChatGPT (with TradingView MCP) | PineScripter | |
|---|---|---|
| First draft | Good; can work from a pasted chart screenshot | Pine Script v6 with the v6 manual as context |
| Compile check | validate_pine_script on TradingView, counted against a daily limit | Every version checked; the AI fixes its own errors |
| Seeing the result | Plot values for recent bars as numbers; open TradingView to see it | Plots, shapes and labels drawn on PineScripter's chart |
| Labels, lines, boxes | Not returned by run_pine_indicator | Drawn on the chart |
| When triggers became true | Check in TradingView's own bar replay | Replay with a readout of triggers on each bar, plus a look-ahead check |
| What triggers did afterwards | Not in the MCP tools | Indicator Analysis: clustering, hours, moves 1, 5, 10, 20 bars later |
| Alerts from your indicator | Set up in TradingView; MCP alerts are price-only | Free email alerts on closed bars, or TradingView webhooks into the Alert Log |
| Changing one detail | Whole script usually returned | Only the affected lines change, shown in Code Changes |
| Markets | Everything your TradingView plan carries | 308 crypto spot markets |
What "working" means for an indicator
An indicator works when five things are true. It compiles on TradingView. It draws what you asked for on the bars you expect. Its marks do not move or vanish when new bars arrive or the chart reloads. It stays inside Pine Script's limits so nothing is silently dropped. And any alert built on it fires on the bar you expect, not earlier and not later.
Only the first of those is a compile question. The other four are about behavior over time, and you only see them by running the script on data and watching it. That is the lens for comparing the two tools: not which model is smarter, but how quickly each one shows you a problem in the last four.
Five indicator problems a compile check will not catch
Triggers on a bar that is still forming. On historical bars every bar is closed. On the live bar, close, high and low change until the bar ends, so a condition can be true for a few seconds and then not. An alert built on it fires, and the marker disappears from the chart. Requiring barstate.isconfirmed for alerts, or using alert frequency once per bar close in TradingView, avoids it.
Look-ahead from another timeframe. request.security() with lookahead on and no [1] offset reads a higher-timeframe bar before it has closed. On history the indicator knows the daily close at the start of the day, which makes it look far better than it can be live.
Marks painted back in time. Pivots, swing points and many divergence methods can only be confirmed a few bars after the fact. A script that draws the marker back on the pivot bar, with a negative offset or a label placed at bar_index minus N, shows when the event happened, not when the script could know it. Any alert on it fires late compared with what the chart shows.
Drawing limits. Pine Script keeps about the last 50 labels, lines or boxes of each kind by default, and up to 500 if the script sets max_labels_count, max_lines_count or max_boxes_count. Past that, the oldest are deleted. A generated script that creates a label on every swing will look complete on a short chart and lose its history on a long one. A script can also use at most 64 plot counts, which a large ribbon or dashboard can reach.
Calculations inside conditions. Calling ta.ema(), ta.rsi() or other built-ins only inside an if block means they do not run on every bar, so their values are wrong. The compiler warns about some of these cases, but generated code often triggers the warning, and warnings do not stop a script from running.
Building an indicator with ChatGPT in 2026
ChatGPT is a comfortable place to start an indicator. You can describe it in plain language, paste a screenshot of something you saw on a chart and ask for code that draws it, and ask follow-up questions about why a function works the way it does. Its paid plans have strong reasoning models and web search for checking TradingView's reference.
In a plain chat you then paste the code into TradingView's Pine Editor, fix any errors by pasting them back, and look at the chart. With TradingView's MCP Server connected, ChatGPT can compile the script itself with validate_pine_script and calculate it with run_pine_indicator on any symbol and timeframe your TradingView plan allows. The tool returns the plot values of the latest bars, 50 by default and up to 1,000, and says whether the newest bar is still forming. That is enough for the model to confirm the script produces numbers where you expect them.
It is not enough to judge what the indicator looks like. TradingView's docs say nothing is rendered, only data plots are returned, and color-only series are dropped, so labels, lines, boxes and tables are not in the output at all. For anything visual you open TradingView and look. Each validate and run is one call against your plan's daily limit (10 on Essential, 20 on Plus, 50 on Premium, 500 on Ultimate or with the AI subscription). And the MCP alert tools create only simple price alerts, so alerts on your indicator are still set up by hand in TradingView.
Building an indicator with PineScripter
In PineScripter you describe the indicator in the chat, and the Pine Script coding agent writes v6 with the v6 manual as context. Each version is checked for compile errors the way TradingView checks them, and the AI fixes its own errors before you see the code. When you ask for a change, such as a different color, a second timeframe or a session filter, only the affected lines change, and the Code Changes view shows them, so the parts you were happy with stay as they were.
The script then runs on PineScripter's chart on real market data, up to 20,000 bars, and PineScripter draws its plots, shapes and labels. You see on a long chart whether old labels are being dropped, whether the markers sit where you expect, and whether anything looks wrong, before you paste anything into TradingView.
Replay steps through the run one bar at a time with everything after the current bar hidden, and a readout shows which triggers fired on that bar and how many times each has fired so far. This is the quickest way to see a pivot marker appear three bars after the pivot, or a trigger that only exists on finished bars. The look-ahead check reruns the script on cut-down data and reports output that depended on bars that had not happened yet.
Indicator Analysis then measures what the triggers already did on past data: how they cluster, which sessions or hours they fall in, how price moved 1, 5, 10 and 20 bars after each one, and whether the run is clean enough to trust. It flags, for example, a redrawn shape that would otherwise count as hundreds of triggers. It describes the past only and is not a forecast.
The chart agent can also work the chart around your indicator: read the market, timeframe, ATR and swing levels, and draw on it with any of 83 drawing tools when you ask, so you can compare what the script marks with what you would have drawn by hand.
//@version=6
indicator("Swing high labels, capped and confirmed", overlay = true, max_labels_count = 500)
keep = input.int(100, "Labels to keep", minval = 1, maxval = 500)
right = 5
var array<label> marks = array.new<label>()
ph = ta.pivothigh(high, 5, right)
// Only act once the bar has closed, so live marks do not appear and vanish
confirmed = not na(ph) and barstate.isconfirmed
if confirmed
marks.push(label.new(bar_index - right, ph, str.tostring(ph, format.mintick),
style = label.style_label_down))
if marks.size() > keep
label.delete(marks.shift())
// The alert fires on the bar where the swing was confirmed, `right` bars after the high
alertcondition(confirmed, "Swing high confirmed", "Swing high confirmed")Three details here are the ones generated indicators most often miss: the label limit is raised and old labels are deleted on purpose rather than by the garbage collector, marks are only created on closed bars, and the alert fires when the swing was known. The label itself sits on the swing high, which is fine for reading the chart, as long as you remember it appeared five bars later. Ask either tool for "label every swing high" and compare its answer with this.
Getting alerts out of your indicator
In TradingView, you add an alert on the indicator itself, picking an alertcondition() or any alert() call, on a plan that supports the number of alerts you need. That works for any market and is the way to go for stocks, forex or futures. ChatGPT cannot set these up through the MCP Server yet, since its alert tools support only simple price conditions.
PineScripter adds two options. Indicator alerts by email let you pick a trigger in your own script (a plotshape, plotchar or plotarrow marker, an alertcondition(), or an alert() call), a crypto spot market and a timeframe. PineScripter runs the script on its own servers each time a bar closes and emails you when the trigger is true on that closed bar, usually within a minute or two. The app does not need to be open and no TradingView account is needed. The free plan holds 3 alerts with 20 emails a day; paid plans hold 10 to 100 alerts with 100 emails a day. Timeframes run from 15 minutes to 1 week.
If you use TradingView alerts, the Alert Log gives each script a webhook address. Paste it into the alert's webhook field and every firing is recorded with its name, price and time, and the log notices when an alert has gone unusually silent. The free plan connects 2 live alerts; paid plans connect 5 to unlimited.
Prompts that help in either tool
Say "Pine Script v6" and say whether it is an indicator or a strategy. State the timeframe logic precisely: "use the previous completed daily bar" is clearer than "daily trend". Say when a trigger should count: "only on closed bars". If the indicator draws labels or lines, say how many you want kept. If it needs an alert, ask for an alertcondition() with a plain message.
Then ask one change at a time. A single request that adds three features and restyles the plots is the easiest way to get a script that compiles and behaves differently in a way nobody notices. In ChatGPT, ask it to return only the changed lines and explain each one. In PineScripter that is the default.
What each costs for indicator work
ChatGPT has a free plan, and Plus is $20 a month in the US. Connecting TradingView's MCP Server needs a paid ChatGPT plan and a paid TradingView plan, from $14.95 a month on Essential with 10 calls a day; more calls need Ultimate or TradingView's AI subscription.
In PineScripter, the chart, replay, Indicator Analysis, the editor with error detection and email alerts are on the free plan, which has no AI credits. The AI starts with Mini at $9.99 a month: 500 credits, PineScripter Fine Tuned and the chart agent. Pro at $19.99 adds 1,000 credits and the choice of GPT, Claude and other models. Subscriptions are refunded in full on request.
Which one fits an indicator builder
ChatGPT is a good fit for quick drafts, learning how a Pine Script function behaves, and indicators for stocks, forex or futures that you will check in TradingView anyway. With the MCP Server it can confirm the script compiles and produces numbers on real TradingView data.
PineScripter is a better fit when the indicator has to be right over time: marks on the correct bar, no look-ahead, no lost labels, alerts that fire when the chart says they should. Seeing the script drawn, replaying it and measuring its triggers finds those problems in minutes rather than after a week of watching it live. For crypto, it can also send you the alerts.
Whatever you use, an indicator describes what price and volume did. Its triggers are not recommendations, and what they did on past bars is no promise about the next ones.
Frequently asked questions
The practical takeaway
ChatGPT is a fine place to start an indicator, and with TradingView's MCP Server it can confirm that the script compiles and produces values on any TradingView market. What it cannot show you is the indicator itself over time. PineScripter draws it, replays it bar by bar, checks it for look-ahead and measures its triggers, then can email you when one fires, on crypto markets. The model can be the same in both. What you get to see before trusting the script is not.
We make PineScripter, so judge it the way this post judges any indicator: ask both tools for the same one, run it on a long chart, replay it, and keep whichever marks the right bars.
Sources
- TradingView MCP Server docs: run_pine_indicator, alerts, usage limits
- TradingView: Pine Script limitations
- TradingView: repainting
- Pine Script v6 reference: ta.pivothigh()
- Pine Script v6 reference: alertcondition()
- ChatGPT plans and pricing (checked 29 November 2026)
- PineScripter pricing
Related reading: Same models, different harness, Repainting, and the five kinds of it, When labels and lines hit the 500 cap, Free email alerts from your own indicator.
Disclaimer: PineScripter is a coding tool for Pine Script development. It does not provide financial advice and does not guarantee trading profits. Always backtest strategies thoroughly and understand the risks before live trading.