---
title: "Versions and contracts"
description: "How a wrun indicator changes over time for someone who writes it in the chart: the contract a package runs under, the compiler the editor pins, and what a new…"
order: 134
section: "reference"
---

<!-- source: docs/indicators/reference/versions.md; generated by packages/cli/scripts/gen-indicator-docs.ts, do not edit -->

# Versions and contracts

How a wrun indicator changes over time for someone who writes it in the
chart: the contract a package runs under, the compiler the editor pins, and
what a new version of your indicator does and does not change. A wrun
indicator has no language versions, only a contract that each published
package carries and the versions you publish.

## What moves, and what never does

```text
The contract        abi_version in the sheet Run derives from your declarations
Your versions       0.1.0 on the first publish, then Patch, Minor or Major
The compiler        AssemblyScript 0.27.37, loaded by the editor's Run
```

<!-- wrun:cards -->
| Contract | What it adds | Your file is on it when it declares |
| --- | --- | --- |
| `wrun-1` | the first contract, frozen forever | nothing the rows below name |
| `wrun-2` | celled inputs, text slots, renderers and declared drawings | a celled input, a text slot, a renderer or a declared drawing |
| `wrun-3` | drawing handles, strategies and the last-bar flag | a handle, a `strategy(...)` or `bar.isLast()` |
| `wrun-4` | frames: level profiles, panels and widgets | a frame |
| `wrun-5` | text settings: the typed words, read by the file | a text setting |
| `wrun-6` | the bar count: how many bars the run holds | a `bar.count()` read |

- **The contract.** You never pick it: Run derives it from what your
  declarations use (reading `bar.count()` makes the sheet `wrun-6`; a
  text setting makes it `wrun-5`; a frame
  makes it `wrun-4`; a handle, a
  `strategy(...)` or `bar.isLast()` makes it `wrun-3`; a celled input, a
  text slot, a renderer or a declared drawing makes it `wrun-2`; anything
  else stays on `wrun-1`). The first contract is frozen: its behavior never
  changes, and every package written under it keeps computing
  bit-identically. Each later contract adds to the one before and freezes
  in turn, so an indicator written today keeps computing the same way.
- **Your versions.** The first publish is 0.1.0, and every later publish
  is a new version you pick as **Patch**, **Minor** or **Major**, with a
  one-line "What changed" ([Publishing](../functions/publishing.md)). A
  published version never changes. A chart that added your indicator keeps
  the exact version it added and reloads that version, so a new release
  reaches a chart when its owner adds the new version. Where an indicator
  runs (the browser, or OpenMarket's servers for Protected code) is fixed
  by its first version.
- **The compiler.** Run compiles in your browser with the AssemblyScript
  version the kit pins, so the same source always builds the same module.

## When the chart updates

The chart's editor and OpenMarket's alerts engine ship on their own
schedule, and an update can let the editor accept new declarations, draw
new kinds of shapes, serve new sources, or accept a new file shape (a file
with `onBar()` beside the four-function form). It never rewrites a published
version: the module a chart loads is the one you published, under its
frozen contract, and a package that does not use a new feature is
unaffected by it.

## What we publish

| Page | Purpose |
| --- | --- |
| [What is wrun](../getting-started/introduction.md) | What wrun is, how a file runs and where, in one read. |
| [Publishing](../functions/publishing.md) | Versions, sharing and where a published indicator runs. |
