Modified Moving Average


A Modified Moving Average (MMA) (also known as Running Moving Average (RMA), or SMoothed Moving Average (SMMA)) is an indicator that shows the average value of a security's price over a period of time. It works very similar to the Exponential Moving Average, they are equivalent but for different periods (e.g. the MMA value for a 14-day period will be the same as EMA-value for a 27-days period).

MMA is partly calculated like SMA: the first point of the MMA is calculated the same way it is done for SMA. However, other points are calculated differently:the new price is added first and then the last average is subtracted from the resulting sum.

AnyChart Stock allows you to add MMA with desired period to any of your charts.

Find the mathematical description of the indicator on the Modified moving average (MMA) Mathematical Description page.

Adding indicator

MMA indicator is added using the mma() method, it requires a mapping with a value field in it:

// create data table on loaded data
var dataTable =;

// add data to a table

// map loaded data
var mapping = dataTable.mapAs({'value': 4});

// create stock chart
chart = anychart.stock();

// create plot on the chart
var plot = chart.plot(0);

// create MMA indicators with period of 10
var mma10 =, 10).series();

Here is a live sample:


Indicator parameters

MMA indicator needs three parameters, as SMA and EMA: mapping with value field in it, period and a type of series to be displayed as:

var mma10 =, 10, "column");

It is possible to change the series type at any time using the seriesType() method.


Visualization of an indicator depends on the series type. Here is a sample where MMA with different parameters and settings is added to different plots:

// create MMA indicator with period 10 and show as line on the first plot
var mma10 =, 10).series();

// create MMA indicator with period 30 and show as column on the second plot
var mma30 =, 30, "column").series();

Live sample:


You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.