CSPHammer: Hammer Candlestick Pattern

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

View source: R/CSPHammer.R

Description

Look for Hammer Pattern in a OHLC price series

Usage

1
CSPHammer(TS, minlowershadowCL=2/3, maxuppershadowCL=.1, minbodyCL=.1)

Arguments

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

Details

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.

Value

A xts object containing the column:

Hammer

TRUE if hammer pattern detected

Note

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.

Author(s)

Andreas Voellenklee

References

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

See Also

CSPDoji TrendDetectionChannel TrendDetectionSMA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

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