CandleAverage: Mean value of OHLC prices

Description Usage Arguments Details Value Author(s) Examples

Description

Calculates the average value of different price levels within a price bar.

Usage

1
2
3

Arguments

TS

xts Time Series containing Open and Close Prices

Details

The calculation of the average of the high, low, and close, is as follows:
OHLC Average = (Open + High + Low + Close) / 4
HLC Average = (High + Low + Close) / 3
HL Average = (High + Low) / 2

Value

A xts object containing the corresponding column:

OHLC_Average
HLC_Average
HL_Average

Author(s)

Andreas Voellenklee

Examples

1
2
3
4
5
6
7
8
## Not run: 
# calculate average prices for a daily OHLC price series
getSymbols('YHOO', adjust=TRUE)
head(cbind(OHLC_Average(YHOO), 
      HLC_Average(YHOO), 
      HL_Average(YHOO)))

## End(Not run)


Search within the candlesticks package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.