R/UpperShadowLength.R

#' Determine upper shadow length using a OHLC price series
#'
#' @param x OHLC prices.
#' @return length of upper shadow
#' @export

UpperShadowLength <- function(x) {
  US <- quantmod::Hi(x) - CandleBodyTop(x)
  result <- xts::reclass(US, x)
  colnames(result) <- "UpperShadowLength"
  return(result)
}
kochiuyu/CandleStickPattern documentation built on May 17, 2019, 4:22 a.m.