FlowscopeDocs

P027

second statement on the same line

Severity Error

Statements are separated by line breaks and by nothing else. After one statement was complete, more code followed on the same line.

Move the second statement to its own line.

Failing example

Flowscope Script
script "Bar counter"
data chart = subscribe(data.ohlcv)
state bars: int = 0
plot count = plot.line(title: "Bars seen")
on chart.close {
  bars += 1 count.plot(bars)
}

Fixed example

Flowscope Script
script "Bar counter"
data chart = subscribe(data.ohlcv)
state bars: int = 0
plot count = plot.line(title: "Bars seen")
on chart.close {
  bars += 1
  count.plot(bars)
}