Skip to main content

ChartScriptBeta

Write your own indicators, right on the chart

ChartScript is TegoTrend's Pine-familiar, indicator-only scripting language. Write inputs, series math, plots, and shapes in a real code editor; run them sandboxed in your browser; share them on the Marketplace. Every save is validated again on the server.

Built-in functions
475
Sandboxed compute cap
40s
Plan availability
Every plan

The language

Pine-familiar, indicator-only, honest about limits

If you have written Pine Script, ChartScript reads like home. It deliberately stays an indicator language: it computes and draws, and order decisions stay with you.

SMA CrossoverValidated example
//@version=6indicator("SMA Crossover", overlay=true)fastLen = input.int(9, "Fast Length")slowLen = input.int(21, "Slow Length")fast = ta.sma(close, fastLen)slow = ta.sma(close, slowLen)plot(fast, "Fast", color=color.new(color.aqua, 0))plot(slow, "Slow", color=color.new(color.orange, 0))plotshape(ta.crossover(fast, slow), style=shape.triangleup)plotshape(ta.crossunder(fast, slow), style=shape.triangledown)
Fast/slow moving averages with crossover markers. From the built-in corpus of validated examples — each one compiles and runs against the shipping engine in the corpus test suite.
  • Plots and shapesMulti-buffer lines, crossover markers, and styling on the price chart or a separate pane.
  • Typed inputsDeclared inputs become editable indicator settings on the chart, just like built-in studies.
  • Strategy scripts as chart viewsA strategy() script compiles and draws like an indicator. Its orders are never simulated, sized, or sent.
  • Cross-symbol and timeframe seriesrequest.security feeds — up to 40 feeds and 50,000 bars per run.
  • Custom functionsFactor repeated series math into your own functions, beside 475 built-ins across 51 namespaces.
Never an order path: ChartScript computes and draws studies. A strategy() script is shown as a chart view — its orders are never simulated, sized, or sent.

The editor

A real code editor, docked beside the chart

ChartScript lives in a CodeMirror editor inside the workspace: diagnostics on the line, completions as you type, and the plot updating on the chart next to it.

Lint gutter

Compile diagnostics appear on the line that caused them, as you type — before you save.

Saved scripts and libraries

The Saved tab keeps your indicators beside the editor, with the libraries they import — up to 64 libraries.

Autocomplete

Built-in functions, namespaces, constants, and your own inputs complete as you write.

Focus mode

Expand the editor over the chart when you are writing; collapse it when you are watching the plot.

Real capture of the ChartScript editor beside the live chart: the validated SMA Crossover example compiled with its two moving-average plots and crossover markers rendered on EURUSD
Real product capture from a deterministic synthetic demo account: the SMA Crossover validated example loaded in the editor, compiled by the in-browser engine, and plotted live on the chart.

Marketplace

Share what you build, install what others share

The Marketplace tab sits inside the editor. Releases are immutable snapshots, installs are recompiled on the server, and nothing you install can place an order.

Real capture of the ChartScript panel on its Marketplace tab: two indicator releases shared by other members — RSI with signal zones and Bollinger Bands squeeze — each with its creator handle, pane and install count and an Install button
Real product capture from a deterministic synthetic demo account: the Marketplace tab browsed, nothing installed. Listings are compiled ChartScript from the validated example corpus.

Browse and install

Shared releases list 25 at a time. Installing copies the source into your workspace, where the server recompiles it before it can run.

Share as a release

Publishing creates an immutable snapshot. Later edits become a new release — an installed copy never changes under someone else.

Unshare any time

Withdraw a listing whenever you like. Your own scripts stay attached to your account either way.

Safety by construction

A language that cannot outgrow its sandbox

The limits are part of the design: your scripts get real computing power on real chart data, inside boundaries that protect your session and your account.

Sandboxed execution

Scripts run in an isolated Web Worker with a hard 40-second compute cap — a runaway script stops itself, never your chart.

Server-validated saves

Every save is compiled and validated again on the server. The browser is never the final authority on what your account stores.

Size-bounded source

Scripts are capped at 512KB of source — room for serious indicators, no room for runaway payloads.

Plan-scoped access

ChartScript is available on every plan — 1 saved on Free Trial, 3 saved on Starter, 15 saved on Pro, 50 saved on Gold (the same on Trader and AI Trader plans) — and your scripts stay attached to your account.

AI-generated market research — not investment advice. Always do your own analysis before trading.

Risk warning: Trading and investing involve substantial risk. You can lose some or all of the money committed, and leveraged or margined products may create losses greater than the initial amount deposited. Do not trade or invest money you cannot afford to lose.