Paste the source of a Pine Script indicator or strategy, or a thinkorswim ThinkScript study, into the AI Chat. ChartingLens converts it into a native indicator, draws it on your chart, and tells you what, if anything, had to be approximated.
Pine Script is the language behind most community indicators and strategies, written for TradingView. ThinkScript is the thinkorswim equivalent. ChartingLens turns either one into an indicator that runs natively on your chart: the same plots, colors, boxes, labels and tables, with the script's inputs still adjustable.
Conversion is rules first. A built-in converter compiles the script directly, with no AI model involved, and runs it on your chart's data before anything is drawn. Only when a script uses a construct the converter can't compile does the AI Assistant translate it instead, and that translation is also run against your chart, and corrected if it errors or draws nothing, before you see it.
Converting a script never spends your daily AI credits, whether it is Pine Script or ThinkScript and whether the rules converter or the assistant did the work. Script conversion is a Premium feature, included on Premium and Pro.
A paste is recognized as Pine Script by its //@version line or its indicator(), study() or strategy() declaration, and as ThinkScript by its def, plot and input statements.
Open AI Chat from the right sidebar, paste the source and send it. No instructions are needed: a script paste always goes to the converter.
The indicator draws on the selected chart right away, and the reply card explains it, with a note on fidelity. If AI Settings has Chart changes set to Ask me first, click Add Indicator to Selected Chart on the card.
Use the gear in the indicator's legend to change its inputs, Save on the card (or the legend star) to keep it in your library, and Backtest Signals to test a strategy.
In a multi-chart layout, the card's Selected chart / All charts toggle decides where it goes. Once it is applied, the card's button changes to Remove from Chart.
Pine Script v6, v5 and v4 convert, and so do older scripts that still use v2 and v3 spellings such as study(), security() and bare sma(). A paste that lost its indentation on the way is rebuilt before converting, and the reply says so.
Most thinkorswim studies convert by rules: plots and their painting strategies, AddCloud, AssignPriceColor, AssignBackgroundColor, AddLabel (shown top-left), AddChartBubble, AddVerticalLine, Alert, AddOrder and higher aggregation periods. Where thinkorswim's formula differs from the standard one (ExpAverage and WildersAverage start from the first price), the converter writes out thinkorswim's version so the numbers match from the first bars. Moving off the platform? See our thinkorswim alternatives roundup.
Every conversion reply carries a note. A clean rules conversion says every construct was supported and nothing was approximated. Otherwise the note names what changed:
Every conversion card has a Backtest Signals button, and an applied script with trade signals gets a backtest icon in its legend, so you can re-run it after a page refresh. The backtest trades the script's own orders bar by bar: market orders fill at the next bar's open, stop and limit entries when price reaches them, and a protective stop is taken before a target when one bar touches both. Markers are not guessed at as trades, and a script with no strategy orders gets a plain message that there is nothing to backtest.
If a script paints signals late or deletes them (repainting), the backtest re-runs it on the history as it stood at each bar and trades each signal where it first appeared. It shares its engine with the AI Strategy Backtester; see also how to backtest a trading strategy.
Paste the community scripts you use and keep their logic, inputs and look instead of rebuilding your setup.
ThinkScript studies and strategies convert by rules, with thinkorswim's own moving-average formulas so the values agree.
Convert a strategy() script and click Backtest Signals to see how its orders would have filled on any symbol and timeframe you load.
Save the converted indicator, then scan NASDAQ + NYSE, an international market or your watchlists for its signals in the My Script tab.
| Feature | Free ($0) | Premium ($14.99/mo) | Pro ($29.99/mo) |
|---|---|---|---|
| Pine Script conversion (paste into AI Chat) | Not included | Included | Included |
| ThinkScript conversion | Not included | Included | Included |
| AI credits used per conversion | Not applicable | None | None |
| Save to your indicator library | Not included | Included | Included |
| Modify with AI (legend pencil) | Not included | Included | Included |
| Backtest Signals on converted strategies | Not included | Included | Included |
| Signal alerts from the legend bell | Not included | Included | Included |
| My Script scans with a converted indicator | Not included | Included | Included |
| Indicators per chart | 3 | Unlimited | Unlimited |
No. Converting a pasted Pine Script or ThinkScript study uses none of your daily AI credits, even when the assistant translates part of it. Conversion is included on Premium and Pro.
Pine Script v6, v5 and v4, plus older scripts that still use v2 and v3 spellings such as study(), security() and bare sma().
Yes. Click Backtest Signals on the conversion card, or the backtest icon in the legend. The backtest trades the script's own strategy.entry, strategy.exit and strategy.close orders, filled bar by bar. Pyramiding is not simulated.
The reply tells you. Every conversion includes a note saying either that nothing was approximated, or exactly what was approximated or returns na, such as footprint data or a reconstructed library.
Most ThinkScript studies convert by rules with no AI involved. TTM Squeeze and other proprietary thinkorswim studies have no published formula, so the assistant translates them instead and says so. Check the values if exact numbers matter.
No. On Free, pasting a script shows an upgrade message instead. Premium ($14.99/mo) and Pro ($29.99/mo) include Pine Script and ThinkScript conversion, the indicator library and backtesting converted strategies.
Start free and chart every market, then move to Premium when you want your Pine Script and ThinkScript code running on ChartingLens.
Start Charting Free All Features