Moving Average

Moving averages are used to smooth trends. offers three different types of moving averages.


A simple moving average gives equal weight to each data point for the period. If the period is 3 and the last three data points are 3, 4 and 5 the most recent average value would be (3+4+5)/3=4 (divide by three because there are three data points).


An exponential moving average (EMA), sometimes also called an exponentially weighted moving average (EWMA), applies weighting factors which decrease exponentially. The weighting for each older data point decreases exponentially, giving much more importance to recent observations while still not discarding older observations entirely

Front Weighted

A front-weighted average, like an exponential average, allows the most recent data being averaged to impact the average value more than older data. It is calculated differently than exponential averages but it also gives recent data more weight. A 5 period front weighted average is calculated as follows (C is the most recent bar, C4 is 4 bars ago):

Front Weighted Average = ((C*5) + (C1*4) + (C2*3) + (C3*2) + C4) / 15

You can see how the different averaging types produce different results. All three averages are plotted using a period of 30 simple (red), exponential (cyan) front-weighted (yellow).


In addition, you can choose what element of price to use in the calculation of the average: Last, Open, High, Low, or Typical Price.


Offset Parameter

Moving averages have an Offset parameter that allows you to shift the average plot forward or backwards (negative offset value). This allows you to plot what are commonly referred to as "displaced" moving averages.

Read more about displaced moving averages on Investopedia.