MMTMMT Docs
Diagnostics

S013

color scale needs matching lists with at least two entries

S013

A color scale needs at least two stops and equal-length position/color arrays. Add the missing stop or align both arrays.

Failing example

script "conf"

setup mismatch = color.scale(at: [0.0, 0.5, 1.0], colors: [color.red, color.green])
setup single   = color.scale(at: [0.0], colors: [color.red])

data chart = subscribe(data.ohlcv)
plot out = plot.line(title: "out")

on chart.update {
  out.plot(chart.close, color: mismatch.sample(0.5))
}

Corrected example

script "fixed"
setup scale = color.scale(at: [0.0, 1.0], colors: [#000000, #ffffff])

On this page