[R-SIG-Finance] Quantmod charting options

Brian G. Peterson brian at braverock.com
Fri Aug 7 20:31:57 CEST 2009

Subhrangshu Nandi wrote:
> I have a financial timeseries xts object A.xts, not in an OHLC format, but with multiple columns. I am doing the following:
> *# Step 1*
> *chartSeries(A.xts$Col1, name="User defined name")*
> *
> *
> *# Step 2*
> *addTA(A.xts$Col2, on=1)*
> *
> *
> *# Step 3*
> *addTA(cumsum(A.xts$Col3, col="red")*
> I would like to do the following to my charts:
>    1. I would like to remove the displaying of the last value of the time series, in the topleft corner.
>    2. I would like to be able to add a legend after step 2, with user defined names.
>    3. I would also like to be able to add subtitles to both or one of the charts
>    4. I would also like to control the font sizes of the x & y-axis
What I've figured out on this so far:

- for panels other than the main panel, using the 'legend' parameter for 
addTA will overwrite the label in the upper left corner of the panel.
- in the main panel, using the 'legend' parameter will write the legend 
on top of the Last value display, but they will be superimposed and 

There does not seem to be a chartSeries/quantmod equivalent of the 
legend() function used for plot() that could name each series and 
provide a color coded key.


    - Brian

Brian G. Peterson
Ph: 773-459-4973
IM: bgpbraverock

More information about the R-SIG-Finance mailing list