Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS4105

error Link inputs: detail

#What it means

The inputs option of link.script sets the linked script's settings for this link. It is written inputs: { name: value }: each name is one of the linked script's inputs, and each value is a constant or one of this script's own inputs. The message says which part is wrong.

#Typical cause

  • A value worked out on the bars, such as close or an ordinary variable.
  • inputs is not a { name: value } list.
  • Checked against the linked script: it has no input of that name (the message suggests the closest one), the value has the wrong type, or it is not one of that input's options.

#How to fix it

Give a constant, or the variable of one of your own input.* lines declared above the link. Use the names of the linked script's input variables. See Linking scripts.

#Example

ChartScriptError: CS4105
//@chartscript 1
const piv = link.script("@user/Pivot Levels@1", { inputs: { span: close } })
indicator("Trend filter")
plot(piv.trend, "Trend")

Fixed

ChartScriptOpen in editor
//@chartscript 1
const piv = link.script("@user/Pivot Levels@1", { inputs: { span: 8 } })
indicator("Trend filter")
plot(piv.trend, "Trend")
  • CS4101 — A link is declared once, at the top level, as a const: const h = link.script("@handle/Name@latest"). detail
  • CS4104 — script does not share what called 'id'. It shares list.hint

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