Code Monkey home page Code Monkey logo

rrenko's Introduction

rrenko

About

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.

Installation

devtools::install_github("RomanAbashin/rrenko")
library(rrenko)
library(ggplot2)
library(data.table)

Variables

renko(df, size, style)
  • df = a data frame or data table with 2 variables: date (x-axis) and close (y-axis)
  • size = the size of the renko bricks (default = 10)
  • style = the visual style: modern or classic (default = "modern")

Examples

Data

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))))

Code

devtools::install_github("RomanAbashin/rrenko")
library(renko)

renko(df, 5, style = "modern") + 
    labs(title = "Renko chart with R", x = "", y = "")

rrenko modern

renko(df, 5, style = "classic") + 
    labs(title = "Renko chart with R", x = "", y = "")

rrenko classic

Changelog

0.2.0 - 2018-12-15

  • Added variable points = TRUE that adds the last close of one date as a geom_point
  • Bug fixed where data table was not recognized
  • Removed modularization due to bugs

0.1.3 - 2018-12-13

  • Works in most cases except really and really small sizes.
  • x-axis labels get repeated. This will get fixed at some point.
  • renko() funtion expects specific variables names at the moment.

0.1.0 - 2018-12-13

  • Still unstable.
  • Lots of bugs.
  • For experimental use only.

rrenko's People

Contributors

rrmn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lostinspiration

rrenko's Issues

Nice code

Hello Roman,

Studying your code I can see that you're very skilled in ggplot and data.table. I'm R developer as well and I have a renko code as well, and using some parts of your code I otimized my code (some parts) and build wonderful plots - I wasn't even close to plot this kind of renko, I was using lines.

I would like to know how we can help the community together in respect of renko in R. I think I have a very robust one. Can I change the codes here? Create a new one? I'm new in this platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.