Take a look at add_TA with a logical time series (xts preferred). The TRUE
values/ranges will define the periods that get colored in. You will
likely need to also utilize the on= argument to properly draw on the pane
you are intending - e.g. To shade the background of the main series use
on=-1 (that is a minus one).
HTH
Jeff
On 5/7/12 6:36 AM, "golam sakline" <
[hidden email]> wrote:
>Hi,
>
>Is there a way to have a different colour background for a predefined
>period within the ChartSeries theme? I and trying to grey out the period
>that corresponds to recession in the US when looking at a US stock in
>ChartSeries
>
>Thanks
>
>Golam
>
> [[alternative HTML version deleted]]
>
>_______________________________________________
>
[hidden email] 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.
_______________________________________________
[hidden email] 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.