CSPNBlended: Calculate Open/High/Low/Close of N bars

Description Usage Arguments Value Note Author(s) See Also Examples

Description

This function calculates OHLC prices of a combined candle of N bars.

Usage

1
CSPNBlended(TS, N)

Arguments

TS

xts Time Series containing OHLC prices

N

number of bars to combine into one bar

Value

A xts object containing the columns:

<N>.Blended.Open

Opening price of the N-th elapsed candle

<N>.Blended.High

Highest high of the past N candles

<N>.Blended.Low

Lowest low of the past N candles

<N>.Blended.Close

Close price of the current candle

Note

This function is used by addPriceInfo to add price information of detected candlestick patterns

Author(s)

Andreas Voellenklee

See Also

addPriceInfo

Examples

1
2
3
4
5
## Not run: 
getSymbols("YHOO", adjust=TRUE)
CSPNBlended(YHOO, N=3)  # combine 3 candles into one

## End(Not run)

candlesticks documentation built on Feb. 2, 2020, 3:01 a.m.