Skip to content

m.indicators.ema

The exponential moving average of a ticker's bars, one row per bar.

Call it from a session m, made with dm.MassiveSession():

m.indicators.ema(symbols, window=50, *, timespan=dm.Timespan.DAY, series_type=dm.SeriesType.CLOSE, adjusted=True, start=None, end=None, order=None, limit=None, filters=None, on_error=None)
  • Methods: fetch(), poll(interval)
  • Read from: REST
  • poll() by default: dm.PollMode.REPLACE, which holds only the latest poll's rows, one row per Symbol and TimestampStart

Dataset index

Arguments

A linked argument follows its rule under shared arguments on the dataset index.

Argument Description
symbols Tickers of any asset class. dm.ALL is refused.
window The number of bars the average spans.
timespan The bar size, MINUTE or longer.
series_type The bar price the indicator is computed from.
adjusted Split-adjusted bars. It has no effect on a crypto pair, which has no splits.
start The first bar's start.
end The end of the range, of the same kind as start.
order The direction of the bars' times. The endpoints have no sort.
limit The most rows for each symbol.
filters Further endpoint parameters. Keys: none.
on_error What a bad symbol or row does in this call (dm.ErrorPolicy). None, the default, takes each cause from the session's MassiveConfig.on_error.

Plans

How recent the data is on each of Massive's plans, and how far back its history goes, as Massive's pages state them.

Plan Exponential Moving Average (EMA) (REST)
Currencies Basic End-of-day, 2 years
Currencies Starter Real-time, All history
Currencies Business Real-time, All history
Stocks Basic End-of-day, 2 years
Stocks Starter 15-minute delayed, 5 years
Stocks Developer 15-minute delayed, 10 years
Stocks Advanced Real-time, All history
Stocks Business Real-time, All history

Columns

Column Type Description
Symbol String The row's instrument, as Massive's ticker. From REST /v1/indicators/ema/{stockTicker}: the request's stockTicker parameter; REST /v1/indicators/ema/{cryptoTicker}: the request's cryptoTicker parameter.
Date String The trading day of the bar, as ISO yyyy-MM-dd text: the date of TimestampStart in the day zone of the symbol's class (UTC for forex and crypto, New York otherwise) for an intraday or 1-day bar, and null for a bar that spans more than one date (several days, a week or longer, or an intraday bar that crosses midnight). Joining an intraday row to the same day's daily bar on Date attaches values not known until that day ended, and a null Date matches another null, so join longer bars on TimestampEnd.
TimestampStart Instant The start of the bar the value is computed at, as an Instant. A bar of a day or longer starts at 00:00 of its window's first day in the day zone of the symbol's class (UTC for forex and crypto, New York otherwise), or for an index at 00:00 Chicago time (01:00 New York time), where Massive stamps it. A bar of a day or longer stamped at a time or on a day Massive is not known to use is withheld, with a WARNING, since which day it covers is not known. From REST timestamp: "The Unix Msec timestamp from the last aggregate used in this calculation."
TimestampEnd Instant The exclusive end of the bar's window, as an Instant: the first instant at which the bar is complete, so an as-of join on it, t.aj(bars, on=["Symbol", "Timestamp>=TimestampEnd"]), never attaches a bar that is still open. It is when the window closes, not when Massive published the bar, and Massive may correct a bar later. An intraday bar ends at Massive's e where the WebSocket sends one, else its length after its start; a WARNING says when the two differ. A bar of a day or longer ends at 00:00, in the day zone of the symbol's class (for an index, midnight in Chicago), after its window's last day. A row read before its window ended has TimestampInsert before TimestampEnd, and its values can still change; t.where("TimestampEnd <= TimestampInsert") keeps only the rows read after their window ended. That test reads the local clock, which can be off, and a row read within moments of its end, or from a delayed feed, may still lack the window's last trades.
Value double The MACD line value, calculated as the difference between the short-term and long-term exponential moving averages (EMAs) based on the periods specified in the request parameters.
TimestampInsert Instant When the library received the row, by the local clock. Rows that arrive together share it. It isn't Massive's time, and later rows can carry earlier times. In a poll() table, it's the time of the poll the row's values came from.

Massive fields

The Massive field behind each column, by source. An empty cell means the source doesn't carry the column, or the library computes it. request marks a value the library fills from the request.

Column REST field
Symbol request
Date
TimestampStart timestamp
TimestampEnd
Value value
TimestampInsert

Massive's documentation


The plan tables and most column descriptions are Massive's, from its documentation as fetched on 2026-12-01, with a few corrected where Massive's are wrong. The library writes its own descriptions of the columns it names or computes, such as Symbol and TimestampInsert.