Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS2725

error look cannot be used on kind.

#What it means

The look option ({ look: … }) gives an output a named style, and the style's kind must fit the output: style.plot or style.line for plots and horizontal lines, style.marker for shapes and characters, style.fill for fills.

#Typical cause

  • A marker style used on a plot, or a plot style used on a shape.

#How to fix it

Use a style of the matching kind, or make a new one with the right style.* call.

#Example

ChartScriptError: CS2725
//@chartscript 1
indicator("Look", { overlay: true })
const dots = style.marker("Dots", { color: color.orange })
plot(close, { look: dots })

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Look", { overlay: true })
const main = style.plot("Main line", { color: color.orange })
plot(close, { look: main })
  • CS2713 — name has no style property prop.
  • CS2722 — The style property prop does not apply to kind.

The ChartScript documentation is in English for now; translations will follow.