Have it working.
Thanks!

I load data from my activequant archive and display several charts at once
like this:


quantmodmultichart <- function()
{
    while(1) {
    Sys.sleep(15)
      x83 <<-aq.readDataWithPwd(83,"1m", 20100427, "staudinger:xxxxxx")
      x94 <<-aq.readDataWithPwd(94,"1m", 20100427, "staudinger:xxxxxx")
      layout(matrix(c(1,2,3,4,5,6,7,8), 8, 1, byrow = TRUE))
      indicators <<-
"addEMA(n=50,col=\"blue\");addEMA(n=150,col=\"red\");addRSI(n=70);"
      lineChart(x94, layout=NULL,TA=indicators, theme="white")
      lineChart(x83, layout=NULL,TA=indicators, theme="white")
      lineChart((x83/100 * 50 * 3)-x94 * 25, layout=NULL,TA=indicators,
theme="white")
      lineChart(x83/x94, layout=NULL,TA=indicators, theme="white")
    }

}



On Wed, Apr 21, 2010 at 1:22 AM, Sarbo <cmdr_rogue@hotmail.com> wrote:

> How about using the command "par(new = TRUE)"? This would add the new
> plot on top of the old one. WARNING: if you're going to do this, make
> sure that your new plot hides the axes- otherwise your new axes will
> simply be superimposed on top of the existing ones, thus ruining the
> plot.
>
> On Tue, 2010-04-20 at 10:03 -0500, Jeff Ryan wrote:
>
> > Hi Ulrich,
> >
> > One of the weaknesses to the original quantmod charts is the
> > difficulty in layout.
> >
> > The (very dated) examples on the site are made by carefully managing
> > the layout (final expected layout) with the R function... 'layout'.
> >
> > Search the list for some examples of how to do this, but suffice it to
> > say here that the answer revolves around 'layout' and passing
> > layout=NULL to the charting calls.
> >
> > The newest R-forge version fixes all of this.  The code you have below
> > is essentially how you would use the new version, though lineChart and
> > co. are not yet available as wrappers.
> >
> > chart_Series and add_TA will get most of what you want done, and
> > feedback is appreciated as I hope to get this to CRAN now that the
> > R/Finance conference is over.
> >
> > Eventually the names will move back to the old chartSeries etc
> > convention, but for now to keep some sanity in old code, I will
> > provide both old and new functionality.
> >
> > HTH
> > Jeff
> >
> >
> >
> > On Tue, Apr 20, 2010 at 9:53 AM, Ulrich Staudinger
> > <ustaudinger@gmail.com> wrote:
> > > Hi there,
> > >
> > > I try to replicate the nice chart on http://www.quantmod.com/gallery/,
> but
> > > am stuck at putting several charts onto one plot.
> > >
> > > In traditional R, I would do:
> > >
> > > par(mfrow=c(2,1))
> > > plot(data1)
> > > plot(data2)
> > >
> > > ... but with quantmod, when I:
> > > par(mfrow=c(2,1))
> > > lineChart(data1)
> > > lineChart(data2)
> > >
> > > then I see only the line chart of data2.
> > >
> > > What do I have to use to put several line/candle/barcharts onto one
> plot
> > > pane?
> > >
> > > Thanks!
> > >
> > >
> > >
> > >
> > > --
> > > Kind regards,
> > > Ulrich B. Staudinger
> > >
> > >        [[alternative HTML version deleted]]
> > >
> > > _______________________________________________
> > > 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]]
>
> _______________________________________________
> 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.
>



-- 
Kind regards,
Ulrich B. Staudinger

	[[alternative HTML version deleted]]

