Skip to main content
Declare inputs at the top level of your script. Each declaration returns the resolved live value, so you can use the constant directly inside compute. The settings dialog is generated from these declarations.

Declarations

opts is { key?, min?, max?, step? }.

Keeping saved settings stable

Each input is stored under a key. The key defaults to a slug of the label. If you might rename a label later, pass a fixed key so traders keep their saved values:

Using a source input

input.source returns the name of a price field. Map it to values yourself: