Features / ChartScript
06 · ChartScriptOur own language for indicators and strategies.
ChartScript compiles to JavaScript in your browser. Write indicators, strategies and on-chart drawings, or wire up rules in a visual builder without code.

The built-in "My strategy" template running on demo data: editor, chart markers and tester in one view.
A real editor, a real compiler.
Scripts go through a lexer, parser, type checker and code generator, then run as plain JavaScript bar by bar over typed arrays, with no runtime dependencies. Errors come back as diagnostics in the editor and a console.
Three templates start you off: indicator, strategy and library. Scripts are saved in your browser and a Scripts menu lets you reopen them.
- Inputs with titles, defaults and limits
- plot, plotshape, hline, fill and background colouring
- Alerts and alert conditions
- Libraries you can export functions from

Strategies, orders and drawings.
A strategy declares capital, order size and commission, then places entries, exits and closes with strategy.* calls. The built-ins also cover technical analysis (ta.*), maths, strings, colours, arrays (55 functions), matrices, maps and calendar and session helpers.
Scripts can draw lines, labels, boxes, tables, polylines and line fills on the chart itself.

No code? Draw it.
The Visual Builder is a node canvas: drag in inputs, indicators, comparisons and order blocks, connect them, validate, then add the result to the chart or open the generated ChartScript in the editor. It ships with six templates, including an MA crossover, RSI levels, Bollinger bands, a MACD histogram, Supertrend and a volume-spike marker.

What ships
- Indicators, strategies and libraries in one language (.chs)
- Technical analysis, maths, string, colour, array (55), matrix, map, time and session built-ins
- Draw lines, labels, boxes, tables, polylines and line fills from code
- Strategy orders: entries, exits, closes, pyramiding, commission, slippage settings
- Visual Builder with 86 block types and 6 templates
- Compiled to JavaScript in the browser; zero runtime dependencies
- ChartAI prompt library includes strategy and indicator prompts that add scripts to the chart
Honest limits
- Scripts run in your browser only; nothing is shared or published.
- The language is its own: scripts written for other charting platforms need porting.
- Strategies test on the bars loaded in the chart or the range you choose in the tester.