k_rrenko is an in-development R package to build Ranko plots and tables.
Just copy and paste the code.
https://github.com/Kinzel/k_rrenko/blob/master/Renko.R
krenko_plot(Ativo, size, threshold, withDates)
- Ativo = a xts with close price
- size = the size of the renko bricks (no default)
- threshold = threshold size of trend brick (default = 1)
library(xts)
library(data.table)
library(ggplot2)
set.seed(10)
data <- xts(x=abs(cumsum(rnorm(200))), order.by=as.POSIXct(Sys.Date()+1:200), born=as.POSIXct("1899-05-08"))
krenko_plot(data, 1.25,withDates = F)
Work better with time-series. GAPs are created by 'size' choice. Increase 'size' to reduce the number of GAPS. To reduce 'size' I suggest to use your minimum time-series object (as 1M and 5M). Time-series with large time-frame (as 12 Hours, 1DAY, etc) and with big 'sizes' will result in a lot of GAPs. This is not a flaw in code, its how Renko works.
- Bug fixes.
- Bug fixes.
- Working fine.
- Experimental use only.