I am new to R and quantmod , thanks for any help. I want to change the colour of mace graph in quantmod.
library(quantmod)
getSymbols("AAPL")
chartSeries(AAPL)
addMACD() # this works
But addMACD(col = c('red','blue', 'green', 'black') get the following errors.
addMACD(col = c('red','blue, yellow')) Error in ifelse((macd[, 1] - macd[, 2]) > 0, col[1], col[2]) : replacement has length zero In addition: Warning message: In rep(yes, length.out = length(ans)) : 'x' is NULL so the result will be NULL
and according the manual of quantmod, addMACD has the colour options.
Thx.