GetSMACrossOverEvents: Get events for the SMA crossover technical indicator.

Description Usage Arguments Value Examples

Description

Get events for the SMA crossover technical indicator.

Usage

1
GetSMACrossOverEvents(x, fastSma = 20, slowSma = 50, type = "buy")

Arguments

x

A single column xts or matrix series with numeric values.

fastSma

Number of periods to average over for the faster moving SMA.

slowSma

Number of periods to average over for the slower moving SMA.

type

buy or sell. Defaults to buy.

Value

Logical vector where TRUE is the row that the event occured.

Examples

1
2
3
4
5
## Not run: 
data(YHOO)
GetSMACrossOverEvents(Ad(YHOO), 12, 26)

## End(Not run)

justinnafe/TechnicalEvents documentation built on May 20, 2019, 5:16 a.m.