CSPHarami: Harami Candlestick Pattern

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/CSPHarami.R

Description

Look for Bullish/Bearish Harami Pattern in a OHLC price series

Usage

1
CSPHarami(TS, n=20, minbodysizeMedian=1)

Arguments

TS

xts Time Series containing Open and Close Prices

n

number of preceding candles to calculate median candle body length

minbodysizeMedian

Minimum body length of the first candle (mother candle) relative to the median of the past n body sizes

Details

Number of candle lines: 2

Bullish Harami Pattern:
A candlestick chart pattern in which a large candlestick is followed by a smaller candlestick whose body is located within the vertical range of the larger body. In terms of candlestick colors, the bullish harami is a downtrend of black candlesticks engulfing a small positive white candlestick, giving a sign of a reversal of the downward trend.

Bearish Harami Pattern:
Opposite of Bullish Harami Pattern.

Value

A xts object containing the columns:

Bull.Harami

TRUE if bullish harami pattern detected

Bear.Harami

TRUE if bearish harami pattern detected

Note

The function filters patterns that look like haramis, without considering the current trend direction. If only pattern in uptrends should be filtered, a external trend detection function must be used. See examples.

Author(s)

Andreas Voellenklee

References

The following site(s) were used to code/document this candlestick pattern:
http://www.candlesticker.com/Bullish.asp
http://www.candlesticker.com/Bearish.asp

See Also

CSPLongCandleBody

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  getSymbols('YHOO',adjust=TRUE)
  CSPHarami(YHOO)
  
  # filter for bullish harami that occour in downtrends
  BullHarami <- CSPHarami(YHOO)[,"Bull.Harami"] & 
    TrendDetectionChannel(lag(YHOO,k=2))[,"DownTrend"]

## End(Not run)

candlesticks documentation built on Feb. 2, 2020, 3:01 a.m.