Bollinger Bands: Invesco CoinShares ETF
[This article was first published on DataGeeek, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
- With the rising Bitcoin price movement, the downtrend of Invesco CoinShares Global Blockchain ETF has been fading and has moved to the consolidation phase.
- If the good news comes from trade deal talks between the USA and China, the uptrend is coming sooner than thought.
Source code:
#https://x.com/data_geeek/status/1915042993725128710
library(tidyverse)
library(tidyquant)
#Invesco CoinShares Global Blockchain UCITS ETF (BCHN.MI)
df_bchn <-
tq_get("BCHN.MI")
#Bollinger Bands
df_bchn %>%
filter(date >= last(date) - months(36)) %>%
arrange(date) %>%
ggplot(aes(x = date,
y = close,
open = close,
high = close,
low = close,
close = close)) +
geom_bbands(ma_fun = SMA,
fill = "purple",
sd = 2,
n = 20) +
geom_candlestick(aes(open = open,
high = high,
low = low,
close = close,
colour_up = "limegreen",
colour_down = "black",
fill_up = "limegreen",
fill_down = "black")) +
scale_y_continuous(labels = scales::label_currency(prefix = "€"),
limits = c(65,125)) +
coord_x_date(xlim = c("2025-01-01","2025-04-17")) +
scale_x_date(breaks = seq(make_date(2025,1,1),
make_date(2025,4,22),
by = "month"),
labels = scales::label_date("%b"),
expand = expansion(mult = c(0, .05))) +
labs(title = "Invesco CoinShares Global Blockchain ETF",
x = "",
y = "",
subtitle = "<span style = 'color:red;'>Bollinger Bands</span> applied with <span style = 'color:blue;'>SMA-20</span>") +
theme_minimal(base_family = "Roboto Slab") +
theme(panel.grid = element_blank(),
panel.grid.minor.y = element_line(linetype = "dashed", color = "gray"),
panel.grid.minor.x = element_line(linetype = "dashed", color = "gray"),
panel.grid.major.x = element_line(linetype = "dashed", color = "gray"),
panel.grid.major.y = element_line(linetype = "dashed", color = "gray"),
axis.text = element_text(face = "bold", size = 18),
#axis.text.x = element_text(angle = 60, hjust = 1, vjust = 1),
plot.title = ggtext::element_markdown(face = "bold",size = 20),
plot.subtitle = ggtext::element_markdown(face = "bold", size = 18),
plot.background = element_rect(fill = "azure", color = "azure"),
legend.position = "none")
To leave a comment for the author, please follow the link and comment on their blog: DataGeeek.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.