CSPMarubozu {candlesticks} | R Documentation |
Look for Marubozu Candlestick Patterns in a OHLC price series
CSPMarubozu(TS, n=20, ATRFactor=1, maxuppershadowCL=.1, maxlowershadowCL=.1)
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 |
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.
A xts object containing the columns:
WhiteMarubozu |
TRUE if pattern detected |
BlackMarubozu |
TRUE if pattern detected |
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
.
Andreas Voellenklee
The following site(s) were used to code/document this indicator:
http://www.candlesticker.com/Bullish.asp
http://www.candlesticker.com/Bearish.asp
## 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)