Skip to content

Technical indicators

Smoothed Moving Average (SMMA)

The slow, steady average inside RSI, ATR and ADX, available on its own.

The SMMA is an exponential average whose weight on the newest close is 1 / periods, where the EMA’s is 2 / (periods + 1). So it reacts about half as fast as an EMA of the same length: an SMMA of N periods follows an EMA of 2N − 1. It is also called the Running Moving Average (RMA).

As with any moving average, a close above it points up and below it down, and crossings are signals. Its slowness suits it to filtering the trend more than timing entries.

first SMMA = SMA of the first `periods` closes
SMMA = (previous SMMA × (periods − 1) + CLOSE) / periods

Call: smma(periods)

Setting Chart default
periods: Periods 14

What you get: a number.

Warm-up: with smma(14), it asks for 0 bars of history and a run-up of 56, and its first value came on bar 14 of the example data.

Smoothed Moving Average drawn by its own code on example prices

The prices are made up, hourly, and the same on every page, so the chart shows how the indicator behaves, not how a market behaved.

function onIntervalClose() {
const slow = smma(14);
if (slow !== null && CLOSE > slow && OPEN_POSITIONS_COUNT === 0) {
openPosition("BUY", { quantity: 10000, stopLossPips: 30 });
}
}