CSPMarubozu: Marubozu Candlestick Pattern

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

View source: R/CSPMarubozu.R

Description

Look for Marubozu Candlestick Patterns in a OHLC price series

Usage

1
CSPMarubozu(TS, n=20, ATRFactor=1, maxuppershadowCL=.1, maxlowershadowCL=.1)

Arguments

TS

xts Time Series containing OHLC prices

n

number of preceding candles to calculate Average True Range

ATRFactor

minimum size of candle body compared to the ATR

maxuppershadowCL

maximum tolerated upper shadow to candle length ratio

maxlowershadowCL

maximum tolerated lower shadow to candle length ratio

Details

Number of candle lines: 1

White Marubozu:
A long white candle that has no shadows or only small shadows on either end.

Black Marubozu:
A long black candle that has no shadows or only small shadows on either end.

Value

A xts object containing the columns:

WhiteMarubozu

TRUE if pattern detected

BlackMarubozu

TRUE if pattern detected

Note

In default settings, the candle body length must be greater than the average true range of last n periods. The threshold can be varied by ATRFactor.

Author(s)

Andreas Voellenklee

References

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

See Also

CandleBodyLength ATR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  getSymbols('YHOO',adjust=TRUE)

  CSPMarubozu(YHOO)
  
  # include not-so-long-marubozus
  CSPMarubozu(YHOO, ATRFactor=.8)
  
  # filter for white closing marubozus (Cl(TS)=Hi(TS))
  CSPMarubozu(YHOO, maxuppershadowCL=0)[,"WhiteMarubozu"]

## End(Not run)

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