FlowscopeDocs

S006

duplicate panel name

Severity Error

Two panels inside one window declaration use the same field name. Panel names address the panel from plots (on: w.price) and keep the window layout stable across restarts, so each must be unique within its window.

Rename one of the panels.

Failing example

Flowscope Script
script "Four-hour window"
data h4 = subscribe(data.ohlcv, timeframe: 4h)
window w = window(title: "4h overview") { price: chart.panel(h4), price: table.panel(columns: 2) }
plot c = plot.line(title: "4h close", on: w.price)
on h4.close {
  c.plot(h4.close)
}

Fixed example

Flowscope Script
script "Four-hour window"
data h4 = subscribe(data.ohlcv, timeframe: 4h)
window w = window(title: "4h overview") { price: chart.panel(h4), stats: table.panel(columns: 2) }
plot c = plot.line(title: "4h close", on: w.price)
on h4.close {
  c.plot(h4.close)
  w.stats.clear()
  w.stats.row("Close", h4.close)
}