CSPHarami {candlesticks} | R Documentation |
Look for Bullish/Bearish Harami Pattern in a OHLC price series
CSPHarami(TS, n=20, minbodysizeMedian=1)
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 |
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.
A xts object containing the columns:
Bull.Harami |
TRUE if bullish harami pattern detected |
Bear.Harami |
TRUE if bearish harami pattern detected |
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.
Andreas Voellenklee
The following site(s) were used to code/document this candlestick pattern:
http://www.candlesticker.com/Bullish.asp
http://www.candlesticker.com/Bearish.asp
## 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)