CS5104
error A string can be at most max characters.
#What it means
A string built while the script ran became longer than the limit given in the message (currently 4,096 characters).
#Typical cause
- Text that is added to on every bar and never reset.
str.repeatorarray.joinproducing a very long text.
#How to fix it
Keep strings short: build only the part you show, and reset text that accumulates.
#Example
//@chartscript 1
indicator("Long text")
const txt = str.repeat("ab", 3000)
plot(str.length(txt))Fixed
//@chartscript 1
indicator("Long text")
const txt = str.repeat("ab", 100)
plot(str.length(txt))