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,readyorstatus. - An id worked out while the script runs.
- A read such as
h.Trendon a handle.
#How to fix it
Rename the id, for example up_bar or trend_status. See Linking scripts.
#Example
//@chartscript 1
indicator("Shares")
share.series("status", close > open)
plot(close)Fixed
//@chartscript 1
indicator("Shares")
share.series("up_bar", close > open)
plot(close)