Hello Daniel,

Please try to wrap the add function in a plot function, e.g:

plot(addMACD())

Regards,

-Mark-
2010/11/18 Daniel Probst <daniel.probst@web.de>

> Hello,
>
> I get different behaviour calling candleChart directly versus calling it in
> a function: only one of multiple technical analyses is plotted.
>
> Example:
> #####################################
> library(quantmod)
> getSymbols("AAPL",src="yahoo")
> # WORKS
> candleChart(AAPL,multi.col=TRUE,theme="white")
> addBBands()
> addMACD()
> addMACD()
> # Doesn't work
> test<- function(x) {
>        candleChart(x,multi.col=TRUE,theme="white")
>        addBBands()
>        addMACD()
>        addMACD()
> }
> test(AAPL)
> # only shows first MACD not 2nd unlike in direct call
> ###########################
>
> Any pointers where the different behaviour comes from?
> Many thanks
> Daniel Probst
> ___________________________________________________________
> 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@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.

	[[alternative HTML version deleted]]

