ema: Compute an exponential moving average of a time-series

View source: R/movingAverages.R

emaR Documentation

Compute an exponential moving average of a time-series

Description

The standard exponential moving average

Usage

ema(x, alpha = 0.5)

Arguments

x

the time-series of the signal

alpha

smoothing parameter, a value in the unit-interval

Details

The exponential moving average is defined by s_n = α x_n+(1-α)s_{n-1} for n>1, with some initial value.

Value

vector


shill1729/trader documentation built on Dec. 27, 2022, 10:55 p.m.