TradaraScript language and syntax

Use verified TradaraScript study patterns for inputs, variables, data series, and plots.

TradaraScript recognizes a focused set of study patterns. Use the forms below in Script Studio with Language set to `tradarascript-v1`, and compile after each small change rather than assuming compatibility with a broader scripting language.

Starter structure

//@version=tradarascript-v1 length = input.int(20, "Length") average = ta.sma(close, length) plot(average, "SMA")

Source containing one clear recognized family marker compiles to Ready and reports that family under Detected as.

Recognized study families

Direct markers include `ta.ema`, `ta.sma`, `ta.vwap`, `ta.bb`, `ta.rsi`, `ta.macd`, `ta.stdev`, and `ta.stderr`. Detected as reports the matched family; Bollinger Bands reports `bollinger`.

Inputs and variables

Verified examples use `input.int` and `input.float`, then assign expressions to descriptive variables. Chart controls come from predefined metadata for the detected family, not from arbitrary input declarations.

Data series and plots

Tradara-authored sources use series such as `open`, `high`, `low`, `close`, `volume`, `hl2`, `hlc3`, and `ohlc4`, including historical references such as `close[1]`. Verified examples use `plot(value, "Label")`, but chart plots and pane placement come from family metadata.

Language boundaries

These patterns describe studies and do not place orders. The compiler detects families rather than fully parsing and type-checking arbitrary source. Do not rely on Pine declarations, imports, strategies, drawing objects, or internal `builtin_indicator(...)` markers.

If no family is detected

  • Keep only one intended family marker while debugging.

  • Copy the starter example exactly before changing expressions.

  • If no family is detected, use one of the direct markers listed above.

Related topics