Skip to main content

sma

Moving Averages are used to smooth the data in an array to help eliminate noise and identify trends. The Simple Moving Average is literally the simplest form of a moving average. Each output value is the average of the previous n values. In a Simple Moving Average, each value in the time period carries equal weight, and values outside of the time period are not included in the average. This makes it less responsive to recent changes in the data, which can be useful for filtering out those changes.

Usage

sma [-l N_LENGTH] [-o N_OFFSET]

Parameters

NameParameterDescriptionDefaultOptionalChoices
n_length-l --lengthWindow lengths. Multiple values indicated as comma separated values.20, 50TrueNone
n_offset-o --offsetoffset0Truerange(0, 100)

sma


On this page