addPriceInfo {candlesticks} | R Documentation |
This function returns not only the occurences of candlestick patterns, but also the OHLC price information of the pattern's formation. The OHLC price information is only set on dates when the pattern is detected, and 0 otherwise.
addPriceInfo(TS, CSP)
TS |
xts Time Series containing OHLC prices |
CSP |
xts Time Series of detected candlestick patterns, based on TS |
The xtsAttribute bars
of CSP
is used to calculate the blended candlestick of the formation.
A xts object containing the columns:
- |
all columns of CSP |
Formation.Open |
Opening price of the detected candlestick formation |
Formation.High |
Highest high of the detected candlestick formation |
Formation.Low |
Lowest low of the detected candlestick formation |
Foramtion.Close |
Close price of the detected candlestick formation |
Andreas Voellenklee
## Not run: getSymbols("YHOO", adjust=TRUE) # return detected Engulfing Pattern CSPEngulfing(YHOO) # returns detected Engulfing Pattern including formation's OHLC addPriceInfo(YHOO, CSPEngulfing(YHOO)) ## End(Not run)