ave_3ROC: Creates a price history rank by averaging three look-back...

Description Usage Arguments Value See Also Examples

View source: R/ave_3ROC.R

Description

Creates a price history rank by averaging three look-back periods. Uses the TTR::ROC function for rate-of-change value. Uses the discrete ROC type.

Usage

1
ave_3ROC(x, n = c(1, 3, 6))

Arguments

x

price

n

an array of three look-back periods in the same periodicity as x. Default values if not provided n=c(1,3,6).

Value

a row rank as determined by row_rank.

See Also

row_rank, TTR::ROC

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(quantmod)
options("getSymbols.warning4.0"=FALSE)
getSymbols("XLE",auto.assign=TRUE)
ranking <- ave_3ROC(XLE,n=c(3,6,12))
head(ranking)

## End(Not run)

greatgray/scorecard documentation built on May 17, 2019, 8:34 a.m.