FlowscopeDocs

L011

too many plots

Severity Error

The script declares more plots than one script can render. Plot families created with setup ... = for count every member.

Merge plots that show related values (for example one histogram with per-bar colors instead of two), use draw.* entities for sparse annotations, or move part of the output into a second script.

Failing example

Flowscope Script
script "Plot farm"
data chart = subscribe(data.ohlcv)
plot (
  // imagine several hundred more plot declarations here
  p1 = plot.line(title: "Line 1")
  p2 = plot.line(title: "Line 2")
)
on chart.close {
  p1.plot(chart.high)
  p2.plot(chart.low)
}

Fixed example

Flowscope Script
script "Plot farm"
data chart = subscribe(data.ohlcv)
plot (
  hi = plot.line(title: "High")
  lo = plot.line(title: "Low")
)
on chart.close {
  hi.plot(chart.high)
  lo.plot(chart.low)
}