CS2004
error name has no member member.
#What it means
The name before the dot exists, but it has nothing with the name after the dot. That may be a namespace without that function, a type without that field, or an enum without that item.
#Typical cause
- A typo in a built-in name, such as
ta.smaa. - A field that the type does not declare.
- A function from another charting language that ChartScript names differently.
#How to fix it
Check the spelling in the reference. The editor's completion lists every member of a namespace when you type the dot.
#Example
//@chartscript 1
indicator("SMA", { overlay: true })
plot(ta.smaa(close, 14))Fixed
//@chartscript 1
indicator("SMA", { overlay: true })
plot(ta.sma(close, 14))