Learn R Programming

QuantTools (version 0.5.7.1)

sma: Simple Moving Average

Description

Simple moving average also called SMA is the most popular indicator. It shows the average of n past values. Can be used for time series smoothing.

Usage

sma(x, n)

Arguments

x

numeric vectors

n

window size

See Also

Other technical indicators: bbands, crossover, ema, roll_lm, roll_percent_rank, roll_range, roll_sd, roll_volume_profile, rsi, stochastic