Bollinger Band

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bollinger Band

Pedro páramo
Hi all,

I have this code that plots BB, I want both this:
Add a main title specified by me up on the default title that adds IBEX and the date.
On the other hand, I would like to omit the legend but extract Upper and Lower bands in two different values to use latter and add like the title a "row" below the plot to add a comment o "sub main title" just below the plot and say "attention to the lower band" XXX (extracted value)

Last question, just below the graph there are some small boxes on a more or less row, on grey color, up on the dates but below the graph ¿What are this grey boxes? ¿Can I omit?

Many thanks in advance.
I attach and example of what I reffer

_______________________________________________
[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.

mymain.PNG (166K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bollinger Band

Pedro páramo
Sorry I fotgot to paste the code, sorry again:

library(PerformanceAnalytics)
library(dplyr)
library(tibble)
library(lubridate)
library(PerformanceAnalytics)
library(quantmod)
library(ggplot2)
library(png)
library(TTR)


Ibex35<-na.omit(getSymbols("^IBEX",from="2007-12-31"))

chartSeries(IBEX, TA="addBBands(n=200, sd=1.9)", theme="white")

El lun., 3 ago. 2020 a las 22:50, Frank (<[hidden email]>) escribió:

> If you could post your data and plot code, I could make more suggestions.
>
>
>
> My  main title is created by
>
>
>
> main="SPY V(1) Parameters (V, V^2 & V^0.5) Unweighted",
>
>
>
> in the below code. Yours might be
>
>
>
> main=”IBEX”
>
>
>
> pdf("V12_w_Scatter_Plot.pdf")
>
> labels <- c(r2lm2l_label,r2lm2b_label)
>
> labels
>
> plot(VV12, Lambda12,  ylim=yrange, tck=1, main="SPY V(1) Parameters (V,
> V^2 & V^0.5) Unweighted", xlab="VV12", ylab="Lambda12 &
> Beta12",pch=19,col="red")
>
> {points(VV12, lm2.lforecast, pch=19, col="brown")
>
> abline(lm2.lforecastline, col="brown", lty="longdash", lwd=2)
>
> points(VV12, Beta12, pch=19, col="blue")
>
> points(VV12, lm2.bforecast, pch=19, col="purple")
>
> abline(lm2.bforecastline, col="purple", lty="longdash", lwd=2)
>
> legend("topright", inset=.05, title="Parameters", labels, col=colors,
> lwd=2)
>
> }
>
>
>
> Frank
>
> Chicago
>
> *From:* R-SIG-Finance *On Behalf Of *Pedro páramo
> *Sent:* Monday, August 03, 2020 3:15 PM
> *To:* [hidden email]
> *Subject:* [R-SIG-Finance] Bollinger Band
>
>
>
> Hi all,
>
>
>
> I have this code that plots BB, I want both this:
>
> Add a main title specified by me up on the default title that adds IBEX
> and the date.
>
> On the other hand, I would like to omit the legend but extract Upper and
> Lower bands in two different values to use latter and add like the title a
> "row" below the plot to add a comment o "sub main title" just below the
> plot and say "attention to the lower band" XXX (extracted value)
>
>
>
> Last question, just below the graph there are some small boxes on a more
> or less row, on grey color, up on the dates but below the graph ¿What are
> this grey boxes? ¿Can I omit?
>
>
>
> Many thanks in advance.
>
> I attach and example of what I reffer
>

        [[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.