Git Product home page Git Product logo

candlestickpattern's Introduction

Personal notes:

Check videos on YouTube as well: https://www.youtube.com/watch?v=UvLZ4YdXkKY

CandleStickPattern

This package finds common candle stick patterns using daily data (OHLC data).

Overview

The current version package covers the following patterns:

  • Doji family (1-day pattern)
    • Doji doji()
    • Dragonfly Doji dragonfly.doji()
    • Gravestone Doji gravestone.doji()
  • Hammer family (2-day pattern)
    • Hammer/Hangman hammer()
    • Inverted Hammer/Shooting Star inverted.hammer
  • Engulfing family (2-day pattern)
    • Bullish Engulfing bullish.engulf()
    • Bearish Engulfing bearish.engulf()
  • Harami family (2-day pattern)
    • Bullish Harami bullish.engulf()
    • Bearish Harami bearish.harami()
  • Reversal family (2-day pattern)
    • Piercing line piercing.line()
    • Dark cloud Cover dark.cloud.cover()
  • Kicking family (2-day pattern)
    • Kick up kick.up()
    • Kick down kick.down()
  • Three-in-a-row (3-day pattern)
    • Three white soldiers three.white.soliders()
    • Three Black crows three.black.crows()
  • Star (3-day pattern)
    • Morning star morning.star()
    • Evening star evening.star()
  • Three Method (5-day pattern)
    • Rising three rising.three()
    • Falling three falling.three()

Moreover, it captures trends using exponential moving average (EMA):

  • EMA trends
    • up trend up.trend()
    • down trend down.trend()

Installation

To install this package, it is the easist to install devtools package first:

install.packages("devtools")

Now load the package using library()

library(devtools)

Then we can use the install_github to get the package directly:

install_github("kochiuyu/CandleStickPattern")

Finally, we load the package using library()

library(CandleStickPattern)

Usage

You can see the details of how each function works in vignette

The following demonstrates the usage of the function doji() using Microsoft (ticker: MSFT). We use quantmod package to download data:

library(quantmod)
getSymbols("MSFT", from = "2011-07-08" , to = "2011-07-19")

We first plot the candle chart first:

candleChart(MSFT,theme='white')

We can see that July 11, 12, 13, and 18 are likely to follow doji pattern. Let us see if we can capture using the function doji:

doji(MSFT)
##             doji
## 2011-07-08 FALSE
## 2011-07-11  TRUE
## 2011-07-12  TRUE
## 2011-07-13  TRUE
## 2011-07-14 FALSE
## 2011-07-15 FALSE
## 2011-07-18  TRUE
## 2011-07-19 FALSE

candlestickpattern's People

Contributors

benwaldner avatar kochiuyu avatar

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.