Appearance

Personalize your experience

Mode
Accent Color
Direction
All Docs/QuaScript//
QuaScript logo

QuaScript Documentation

Language guide, engine API, 601 builtins and the preset library · v3.0.0-phase1

Parameters

Parameters are the settings of a script. The terminal builds the settings dialog from them, and every run applies the values the user chose.

QuaScriptengine result
Loading the engine result…
params.qs
analysis "Parameters" { overlay = true }

len    = param.int(20, title = "Length", min = 1, max = 500, group = "Average")
mult   = param.float(2.0, title = "Width", min = 0.1, step = 0.1, group = "Average")
src    = param.source(close, title = "Source")
kind   = param.choice("ema", title = "Average", options = ["ema", "sma", "hull"])
show   = param.bool(true, title = "Show band")
tone   = param.color(color.sky.400, title = "Color")

// a match on a parameter runs only the selected branch, on every bar
avg = match kind {
    case "ema" { ta.ema(src, len) }
    case "sma" { ta.sma(src, len) }
    else { ta.hull(src, len) }
}
dev = stat.stdev(src, len) * mult
render.line(avg, "Average", color = tone)
pu = render.line(show ? avg + dev : na, "Upper", color = tone, width = 1)
pd = render.line(show ? avg - dev : na, "Lower", color = tone, width = 1)
render.band(pu, pd, color = color.sky.500, opacity = 0.08)
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

Kinds

FunctionValueNotes
param.intintegermin, max, step
param.floatnumbermin, max, step
param.boolboola checkbox
param.choicetext or enum memberoptions = [...], or an enum member as the default
param.texttext
param.colorcolor
param.sourceseriesopen high low close volume bar.mid bar.typical bar.average bar.weighted
param.intervalinterval text"15", "60", "4h", "1D"; for feeds
param.symbolsymbol textfor feeds of another instrument
param.timeepoch seconds

Common arguments: title, id, group (a section in the dialog), row (parameters with the same row share a line), tooltip.

Ids

Every parameter has an id used to set it from outside: id if given, otherwise the title in snakecase (`"Fast length"` → `fastlength), otherwise the variable name. Two parameters with the same id are an error (EPARAMDUP`).

terminal.sh
quas run params.qs data.csv --set length=50 --set average=hull --set show_band=false

Values are checked against the kind and limits; an unknown id or an out-of-range value is rejected with a message naming the parameter.

Defaults are constants

The default must be a literal (or an enum member), so the settings dialog can show it before the script runs. A parameter's value is the same on every bar, so match on a parameter computes only the selected branch and does not trigger the conditional-state warning.


© 2026 Quatick Technologies. All rights reserved.