Release notes

Everything that ships in the first release of SahiScript.

Initial release

SahiScript is the scripting language that powers Sahi charts. Every built-in indicator on a Sahi chart is itself a SahiScript program, so whatever they can do, your own scripts can do as well.

A familiar language

SahiScript is compatible with Pine v6 syntax, so scripts written for other charting platforms generally run with little or no modification. The //@version=6 header is accepted but not required.

Built-in functions

Inputs

Scripts expose settings through input.int, input.float, input.bool, input.string, input.color, input.source, input.symbol, input.timeframe, input.session, input.price, input.time, input.text_area and input.enum.

input.expiry is unique to Sahi: it allows a script to take a derivatives expiry as a setting, which has no equivalent on other platforms.

Market data

The editor

Scripts are written in the built-in code editor, which provides autocomplete, hover documentation, signature help, and live error and warning reporting as you type. A script can be applied to the chart without leaving the editor, and the editor itself can be docked beside or below the chart while you work.

Performance

Scripts execute within milliseconds, but scripts using request.security can trigger network calls to fetch market data for the requested symbol and timeframe, so results may take longer to load.

Not supported yet

The first release covers indicators. The following are recognised by the language but are not available to write scripts against yet, and are planned for a future release.

The complete language reference is still being written. In the meantime, the editor's autocomplete and hover documentation are the most thorough reference available, and the FAQ answers the most common questions.