Overview

sma(data, n)

Calculate the simple moving average of a list of data points for the most recent n periods.

wma(data, weights)

Calculate the weighted moving average of a list of data points using a list of weights.

line(x, y)

Calculate slope and intercept of the linear regression line that best fits the data.