FlowscopeDocs

T202

positional argument after a named one

Severity Error

Once an argument is passed by name, all following arguments must be named too; otherwise it would be unclear which parameter a positional value belongs to.

Move positional arguments to the front, or name every argument after the first named one.

Failing example

Flowscope Script
script "Configurable RSI"
input len = input.int(title: "RSI length", 14, min: 2)
data chart = subscribe(data.ohlcv)
pane p = pane(title: "RSI", height: 0.25)
plot rsi = plot.line(title: "RSI", on: p)
on chart.close {
  rsi.plot(ta.rsi(chart.close, len))
}

Fixed example

Flowscope Script
script "Configurable RSI"
input len = input.int(14, title: "RSI length", min: 2)
data chart = subscribe(data.ohlcv)
pane p = pane(title: "RSI", height: 0.25)
plot rsi = plot.line(title: "RSI", on: p)
on chart.close {
  rsi.plot(ta.rsi(chart.close, len))
}