chart.Posn(Portfolio='macross',Symbol=stock.str, TA = c("add_SMA(n=50,col='red')", "add_SMA(n=200,col='blue')"))
## "Error in !is.null(TA) && nchar(TA) > 0 : 'length = 2' in coercion to 'logical(1)' "
traceback()
## 2: chart_Series(Prices, name = Symbol, TA = TA, ...) at chart.Posn.R#82
## 1: chart.Posn(Portfolio = "macross", Symbol = stock.str, TA = c("add_SMA(n=50,col='red')",
## "add_SMA(n=200,col='blue')"))
Description
chart_Series()
gives error running the basic example in quantstrat under R 4.3. Works ok in 4.2.Expected behavior
Run error free in R 4.3
Minimal, reproducible example
The line that gives the error is
It occurs because TA has 2 elements