Skip to content
Prev 15126 / 15274 Next

chart_Series: Adding multiple custom indicators

On Wed, Jul 5, 2023 at 3:11?PM Mike <mike9 at posteo.nl> wrote:
Thanks for the reproducible example!
That chart_Series() code didn't change between those 2 versions of
quantmod. This went from a warning to an error based on changes in R
itself. You can verify by running the code below on both machines:

ta <- list("a", "b")
!is.null(ta) && nchar(ta) > 0
## Error in !is.null(ta) && nchar(ta) > 0 :
##  'length = 2' in coercion to 'logical(1)'

The chart_Series() docs say that the TA arg should be "a character
string of semi-colon seperated TA calls". So you can do this:

chart_Series(data, name = "test data", TA = paste(ta, collapse = ";"))

Best,
Josh