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

Jeff Ryan jeff.a.ryan at gmail.com
Thu Sep 30 19:25:32 CEST 2010


Hi Daniel,

Patched on R-forge rev 549 (unstable).  Should have a CRAN release again soon.

Thanks,
Jeff

On Thu, Sep 30, 2010 at 7:04 AM, Daniel Probst <daniel.probst at web.de> wrote:
> 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
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



-- 
Jeffrey Ryan
jeff.a.ryan at gmail.com



More information about the R-SIG-Finance mailing list