[R-SIG-Finance] Quantmod/Chartseries Color Problem.

Daniel Probst daniel.probst at web.de
Thu Sep 30 14:04:11 CEST 2010


Hello,

according to http://cran.r-project.org/web/packages/quantmod/quantmod.pdf  multi.col candle charts shoudl be colored as follows:
grey => Op[t] < Cl[t] and Op[t] < Cl[t-1]
white => Op[t] < Cl[t] and Op[t] > Cl[t-1]
red => Op[t] > Cl[t] and Op[t] < Cl[t-1]
black => Op[t] > Cl[t] and Op[t] > Cl[t-1]

In this example:

require(quantmod)
j<-structure(c(78.88, 78.94, 78.95, 79.16, 79.14, 79.14, 78.95, 78.95, 79.16, 79.2, 79.14, 79.17, 78.88, 78.94, 78.93, 79.14, 79.12, 79.09, 78.95, 78.94, 79.16, 79.14, 79.14, 79.17, 7, 13, 78, 54, 21, 34, 7, 43, 108, 90, 50, 46), .indexCLASS = c("POSIXt", "POSIXct"), .indexTZ = "", class = c("xts", "zoo"), index = structure(c(1285718400, 1285719000, 1285719600, 1285720200, 1285720800, 1285721400), tzone = "", tclass = c("POSIXt", "POSIXct")), .Dim = c(6L, 6L), .Dimnames = list(NULL, c("CO1.Open", "CO1.High", "CO1.Low", "CO1.Close", "CO1.numEvents", "CO1.Volume")))
chartSeries(j,theme="white",type="candlestick",multi.col=TRUE)

I think the third bar should be white and not grey?

Thx and regards 
Dan
___________________________________________________________
Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02



More information about the R-SIG-Finance mailing list