rrenko is an in-development R package to efficiently build Renko charts with the help of ggplot2 and data.table. Renko charts are used to filter the signal from the noise in volatile stock movements.
devtools::install_github("RomanAbashin/rrenko")
library(rrenko)
library(ggplot2)
library(data.table)
renko(df, size, style)
set.seed(1702)
df <- data.frame(date = seq.Date(as.Date("2014-05-02"), as.Date("2018-05-04"), by = "week"),
close = abs(100 + cumsum(sample(seq(-4.9, 4.9, 0.1), 210, replace = TRUE))))
devtools::install_github("RomanAbashin/rrenko")
library(renko)
renko(df, 5, style = "modern") +
labs(title = "Renko chart with R", x = "", y = "")
renko(df, 5, style = "classic") +
labs(title = "Renko chart with R", x = "", y = "")
points = TRUE
that adds the last close of one date as a geom_pointrenko()
funtion expects specific variables names at the moment.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.