Open the terminal
← Handbook

Chart tools

Scripts

Write your own indicator, run it on the chart and share it — it only reads the data your plan already shows, and runs in your browser.

4 min read · Updated 21 Oct 2026

What it's for

Scripts let you write your own indicator, run it on the chart and share it with other people. A script reads the chart data your plan already gives you — candles, Footprint, large prints — and draws lines, marks, boxes and background colours. It runs entirely in your browser: nothing is sent to our servers and a script cannot reach the network, your files or your account.

Open it

  1. Click Indicators in the top bar and open Script examples. Switch one on (Absorption, Exhaustion, Stacked Imbalance zones, Volume spike, VWAP, Delta divergence, Big prints) — a copy is added to My scripts.
  2. Your scripts sit in Indicators → My scripts next to the built-in ones. The ON / OFF switch shows or hides a script; the status line shows its run time or its error.
  3. The gear next to a script — in the chart legend or in the list — opens its settings (the inputs), and the chart updates at once. The pencil opens the script editor, where you change the code.

Write your own

Click Scripts in the top bar to open the script editor — a floating panel with tabs, line numbers and a console — then press +. It saves by itself and runs as soon as it has no errors; errors are listed with their line (click one to jump to it). A script has a header and an onBar block that runs once for every bar, oldest to newest:

indicator "My SMA" overlay
input length = 20 "Length" min 2 max 500

onBar {
  plot(sma(close, length), "SMA", color = BLUE, width = 2)
}
  • let is a new value on every bar, var keeps its value from bar to bar, and x[1] is the value one bar ago.
  • overlay draws on the price chart; pane gives the script its own pane for plot().
  • needs footprint unlocks levels (buy and sell volume at every price row), buy, sell and delta. needs tape unlocks trades (large prints), needs gex unlocks gex (flip, walls, max pain, expected move, net exposure and the heat by price), needs options unlocks opts (every options print of the bar, plus premium totals) and needs book unlocks book (the order book at the end of the bar). A script only sees data your plan and symbol provide; if it is missing the script says so instead of running.
  • Price rows follow your Footprint price step, so a script sees the same rows the chart draws.
  • Indicators such as sma ema rsi atr stdev zscore crossover keep their own state — call them on every bar. Footprint helpers: poc valueArea imbalance stacked. Order book helpers: bookDepth bookWall bookImbalance.
  • A script can only draw: plot hline mark label box line bgcolor.

The full language reference covers every function, the data a script can read, and examples you can open in one click.

Replay and live behave the same

A script only ever sees the bars up to the current one, so it never "repaints" the past. In Replay it receives bars up to the replay clock, exactly as it would have live.

Share a script

  • Publish (in the script editor) puts a script in Indicators → Community under your username; Use on chart copies someone else's into your My scripts and switches it on; read the code first unless the author chose to hide it. Boost the ones you like.
  • Share code copies a short text; Link copies a short link (like app.z-options.com/?s=k3m9x2ab) that opens the Import screen for whoever clicks it.
  • To import, press Import, paste the code and read it first. Imported scripts are added switched off, and you turn them on yourself.
  • Your scripts are stored in this browser. Copy a share code if you want to keep a backup or move to another device.
Good to know
  • Scripts show conditions in the data (for example, heavy volume at a level while price does not move). They are not trading signals.
  • Large prints are the trades above the shared large-trade floor, not every tick.
  • Every script has a compute budget. A script that loops too long is stopped with a message instead of freezing the chart.
  • Up to 40 scripts per browser, 40 000 characters each.