Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS4116

error 'id' cannot be a share id: reason.

#What it means

A share id is a constant text of lower-case letters, digits and _. It starts with a letter and has at most 24 characters. The words levels, events, ready and status are taken: they are parts of the link handle itself (h.levels, h.ready), so a share with one of these names could not be told apart. In the needs of input.script only a series may carry a type, written "name:bool", "name:int" or "name:float".

#Typical cause

  • Capital letters, spaces or a dash in an id.
  • An id called levels, events, ready or status.
  • An id worked out while the script runs.
  • A read such as h.Trend on a handle.

#How to fix it

Rename the id, for example up_bar or trend_status. See Linking scripts.

#Example

ChartScriptError: CS4116
//@chartscript 1
indicator("Shares")
share.series("status", close > open)
plot(close)

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("Shares")
share.series("up_bar", close > open)
plot(close)
  • CS4111 — The share id 'id' is already used for kind; one id has one kind.
  • CS4104 — script does not share what called 'id'. It shares list.hint
  • CS4114 — A script can share at most max what.

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