% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/patterns.R
\name{plot_kline_patterns}
\alias{plot_kline_patterns}
\title{Plot K-line with Pattern Annotations}
\usage{
plot_kline_patterns(
  data,
  pattern = NULL,
  detections = NULL,
  main = NULL,
  max_labels = 10,
  file = NULL
)
}
\arguments{
\item{data}{OHLCV data frame.}

\item{pattern}{Optional pattern identifier or Chinese name.}

\item{detections}{Optional logical vector from \code{\link[=detect_pattern]{detect_pattern()}}. If
\code{NULL}, detections are computed from \code{pattern}.}

\item{main}{Plot title.}

\item{max_labels}{Maximum number of labels to draw.}

\item{file}{Optional PNG file path. If supplied, the plot is saved to disk.}
}
\value{
Invisibly returns detection indices.
}
\description{
Draws candlesticks with optional pattern markers for visual verification.
}
\examples{
d <- demo_ohlcv(140, seed = 1)
plot_kline_patterns(d, pattern = "doji", max_labels = 5)
}
