% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/patterns.R
\name{detect_pattern}
\alias{detect_pattern}
\title{Detect a Candlestick or Structure Pattern}
\usage{
detect_pattern(data, pattern, ...)
}
\arguments{
\item{data}{A data frame with at least \code{open}, \code{high}, \code{low}, \code{close}
columns. Optional columns include \code{date} and \code{volume}.}

\item{pattern}{One value from \code{\link[=available_patterns]{available_patterns()}}.}

\item{...}{Additional parameters passed to the selected detector.}
}
\value{
A logical vector of length \code{nrow(data)}. \code{TRUE} marks rows where the
pattern is detected.
}
\description{
Detects one built-in pattern from OHLCV data.
}
\examples{
d <- demo_ohlcv(120)
hit <- detect_pattern(d, "double_bottom")
tail(hit, 3)
}
