CS1031
error open is not closed.
#What it means
A bracket was opened but the line (and the expression) ended before it was closed.
#Typical cause
- A missing
)at the end of a call, often after nested calls. - A missing
]after a history offset or a list.
#How to fix it
Add the closing bracket. Counting brackets from the left helps with nested calls such as plot(ta.sma(close, 14)).
#Example
//@chartscript 1
indicator("SMA", { overlay: true })
plot(ta.sma(close, 14)Fixed
//@chartscript 1
indicator("SMA", { overlay: true })
plot(ta.sma(close, 14))#Related
- CS1030 — Expected expected but found found.