CSPHammer {candlesticks} | R Documentation |
Look for Hammer Pattern in a OHLC price series
CSPHammer(TS, minlowershadowCL=2/3, maxuppershadowCL=.1, minbodyCL=.1)
TS |
xts Time Series containing Open, High, Low and Close Prices |
minlowershadowCL |
minimum lower shadow to candle length ratio |
maxuppershadowCL |
maximum tolerated upper shadow to candle length ratio |
minbodyCL |
minimum body to candle length ratio |
Number of candle lines: 1
The hammer is a one-day formation. This patter is expected to be a early sign for the reversal of a downtrend into an uptrend. It has got a long lower shadow, a small body at the top of the candle, and no or only a very short upper shadow. The color of the body is not important.
A xts object containing the column:
Hammer |
TRUE if hammer pattern detected |
The function filters candles that look like hammers, without considering the current trend direction. If only hammer patterns in a downtrend 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/Cs18.asp
CSPDoji
TrendDetectionChannel
TrendDetectionSMA
## Not run: getSymbols('YHOO',adjust=TRUE) # filter for hammer patterns CSPHammer(YHOO) # filter for hammer patterns that occur in downtrends CSPHammer(YHOO) & TrendDetectionChannel(YHOO)[,"DownTrend"] ## End(Not run)