README.md

CandleStickPattern

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

Overview

The current version package covers the following patterns:

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

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


kochiuyu/CandleStickPattern documentation built on May 17, 2019, 4:22 a.m.