[Candlesticks-commits] r21 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed May 23 19:29:29 CEST 2012
Author: wotuzu17
Date: 2012-05-23 19:29:28 +0200 (Wed, 23 May 2012)
New Revision: 21
Removed:
pkg/R/CSPHangingMan.R
pkg/man/CSPHangingMan.Rd
Log:
deleted CSPHangingMan
Deleted: pkg/R/CSPHangingMan.R
===================================================================
--- pkg/R/CSPHangingMan.R 2012-05-22 16:53:44 UTC (rev 20)
+++ pkg/R/CSPHangingMan.R 2012-05-23 17:29:28 UTC (rev 21)
@@ -1,16 +0,0 @@
-CSPHangingMan <- function(TS, minuppershadowCL=2/3, maxlowershadowCL=.1, minbodyCL=.1) {
- if (!is.OHLC(TS)) {
- stop("Price series must contain Open, High, Low and Close.")
- }
- CL <- Hi(TS)-Lo(TS)
- BodyHi <- as.xts(apply(cbind(Op(TS),Cl(TS)),1,max))
- BodyLo <- as.xts(apply(cbind(Op(TS),Cl(TS)),1,min))
- HangingMan <- reclass(
- Hi(TS)- BodyHi > CL*minuppershadowCL & # upper shadow greater than lowershadowCL*CandleLength
- BodyLo- Lo(TS) <= CL*maxlowershadowCL & # lower shadow missing or very short
- abs (Cl(TS)-Op(TS)) > CL*minbodyCL # Body length greater than minbodyCL*CandleLength
- ,TS)
- colnames(HangingMan) <- c("HangingMan")
- xtsAttributes(HangingMan) <- list(bars=1)
- return (HangingMan)
-}
Deleted: pkg/man/CSPHangingMan.Rd
===================================================================
--- pkg/man/CSPHangingMan.Rd 2012-05-22 16:53:44 UTC (rev 20)
+++ pkg/man/CSPHangingMan.Rd 2012-05-23 17:29:28 UTC (rev 21)
@@ -1,44 +0,0 @@
-\name{CSPHangingMan}
-\alias{CSPHangingMan}
-\alias{HangingMan}
-\title{Hanging Man Candlestick Pattern}
-\description{Look for Hanging Man Pattern in a OHLC price series}
-\usage{CSPHangingMan(TS, minuppershadowCL=2/3, maxlowershadowCL=.1, minbodyCL=.1)}
-\arguments{
- \item{TS}{xts Time Series containing Open, High, Low and Close Prices}
- \item{minuppershadowCL}{minimum upper shadow to candle length ratio}
- \item{maxlowershadowCL}{maximum tolerated lower shadow to candle length ratio}
- \item{minbodyCL}{minimum body to candle length ratio}
-}
-\details{
-Number of candle lines: \bold{1}\cr\cr
-The hanging man is a one-day formation. This patter is expected to be a early sign for the reversal of a uptrend into an downtrend. It has got a long upper shadow, a small body at the bottom of the candle, and no or only a very short lower shadow. The color of the body is not important. The counterpart of this pattern is \code{\link{Hammer}}.
-}
-\value{
- A xts object containing the column:
- \item{HangingMan}{TRUE if hammer pattern detected}
-}
-\author{Andreas Voellenklee}
-\references{
-The following site(s) were used to code/document this candlestick pattern:\cr
- \url{http://www.candlesticker.com/Cs26.asp}\cr
-}
-\note{The function filters candles that look like hanging mans, without considering the current trend direction. If only hanging man patterns in a uptrend should be filtered, a external trend detection function must be used. See examples.}
-\seealso{
-\code{\link{CSPDoji}}
-\code{\link{CSPHammer}}
-\code{\link{TrendDetectionChannel}}
-\code{\link{TrendDetectionSMA}}
-}
-\examples{
-\dontrun{
- getSymbols('YHOO',adjust=TRUE)
-
- # filter for hanging man patterns
- CSPHangingMan(YHOO)
-
- # filter for hanging man patterns that occur in uptrends
- CSPHangingMan(YHOO) & TrendDetectionChannel(YHOO)[,"UpTrend"]
-}
-}
-\keyword{}
More information about the Candlesticks-commits
mailing list