FC · SPEC
INDICATORS109DRAWING TOOLS75CHART TYPES18PATTERNS19 + 19PROBABILITY MODELS5CHARTS PER SCREEN1–81-MIN HISTORY2 YRSDAILY HISTORYSINCE 1996ORDER TYPES8PAYOFF PRESETS12SCRIPT FUNCTIONS250PRICE₹0.00ADS0│

Features / ChartScript

06 · ChartScript

Our 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.

86visual builder blocks
freecharts.org/chart
The ChartScript editor docked on the right with a moving-average crossover strategy, the chart on the left showing two EMAs and long and short entry markers, and the strategy tester summary below.

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
The ChartScript editor with a strategy script and a compiled status.

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.

Strategy tester overview showing net profit, trade count, profit factor, drawdown and an equity curve.

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.

The Visual Builder showing connected nodes: two integer inputs feed two EMA blocks, which feed Crosses over and Crosses under blocks that trigger Enter long and Close position, plus two plot blocks.

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.