Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS2006

error name has no parameter named param.

#What it means

A named argument (a key of the options object { name: value }) uses a name that the function does not have as a parameter.

#Typical cause

  • A typo in the parameter name.
  • A parameter name from a different function, such as size on plot (a plot's thickness is linewidth).

#How to fix it

Use the parameter names shown in the reference or the editor's hover.

#Example

ChartScriptError: CS2006
//@chartscript 1
indicator("Thick close", { overlay: true })
plot(close, { size: 2 })

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Thick close", { overlay: true })
plot(close, { linewidth: 2 })
  • CS2005 — name takes expected arguments, not got.
  • CS2007 — The argument param is given twice.

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