EMA {matiming}R Documentation

Computes the Exponential Moving Average (EMA)

Description

This function computes the infinite EMA of prices

Usage

EMA(price, n)

Arguments

price

the vector of prices

n

the length of the averaging window (a scalar.

Value

the EMA of prices (a vector)

Note

By definition, n is the length of the averaging window in SMA that has the same average lag time as EMA

See Also

Other moving average functions: DMA(), HMA(), LMA(), SMA(), ZMA()


[Package matiming version 1.0 Index]