CS1003
error The script must start with indicator(...) or library(...) after the header.
#What it means
After the header, a script declares what it is with indicator(...) or library(...). The compiler did not find that declaration where it belongs.
#Typical cause
- The declaration is missing altogether.
- Other statements come before it. Only
importlines and simple variable declarations may come before the declaration.
#How to fix it
Add indicator("Title") (or library("Name")) right after the header, before plots, calls and other statements.
#Example
//@chartscript 1
plot(close)Fixed
//@chartscript 1
indicator("Close line", { overlay: true })
plot(close)