# TEMA

Also known as: triple exponential moving average.
A Trend reference entry (Moving-average lineage) in the LuxAlgo Library: explained, not implemented as a chart indicator.

## What is TEMA?

TEMA (triple exponential moving average) is a reduced-lag smoother introduced by Patrick Mulloy in 1994, alongside its sibling [DEMA](https://www.luxalgo.com/library/concept/dema/). Despite the name it is not an [EMA](https://www.luxalgo.com/library/concept/ema/) applied three times; that would multiply the lag. Instead, Mulloy cascades three EMAs (an EMA of price, an EMA of that EMA, and an EMA of that) and combines them as three times the first, minus three times the second, plus the third. The combination cancels much of the smoothing lag while keeping most of the noise reduction.

Mulloy published both constructions in Technical Analysis of Stocks & Commodities in 1994, framing them as answers to the moving-average trader's standing complaint: every extra unit of smoothness bought with a longer average costs a unit of delay. The alternating-sign combination works because each cascaded EMA carries a predictable share of the lag, and the weighted difference cancels the leading portion of it, an error-correction idea rather than a new smoothing kernel.

On a chart TEMA hugs price noticeably tighter than an EMA of the same length and turns sooner after reversals. The price of that responsiveness is overshoot: because the lag-cancelling combination behaves partly like an extrapolation, TEMA can hook beyond price at sharp turns, and it wiggles more in chop. It is also worth separating from [TRIX](https://www.luxalgo.com/library/concept/trix/), which triple-smooths an EMA and then plots its rate of change as an oscillator; TEMA stays on the price scale as an overlay.

Within the reduced-lag family, TEMA is the aggressive sibling: more cancellation than DEMA, more overshoot risk than designs that pursue smoothness directly, such as the [Ehlers SuperSmoother](https://www.luxalgo.com/library/concept/ehlers-supersmoother/), and simpler than [adaptive averages](https://www.luxalgo.com/library/concept/adaptive-lookback-ma/) that modulate their own speed by regime. Choosing among them is choosing a failure mode, whipsaw, lag, or overshoot, and the standard advice applies: judge candidates on the market and rules actually traded.

## How to calculate TEMA

TEMA uses one length setting N for all three smoothing stages.

1. Compute EMA1: an EMA of price with length N.
2. Compute EMA2 as an EMA of EMA1, then EMA3 as an EMA of EMA2, both with the same length N.
3. Combine them: TEMA = 3 × EMA1 - 3 × EMA2 + EMA3.
4. Read it like any overlay average: longer N gives a smoother, slower line, while the lag-cancelling combination keeps it closer to price than a plain EMA of equal length.
5. Overlay a plain EMA of the same length once: the gap between the two lines at turns is the lag being cancelled, and TEMA's hooks past price at V-reversals are the overshoot being paid for it.

## How it's calculated

A lag-reduced moving average built from single, double, and triple exponential smoothing of price.

```
EMA1_t = EMA_n(P_t)
EMA2_t = EMA_n(EMA1_t)
EMA3_t = EMA_n(EMA2_t)
TEMA_t = 3 × EMA1_t - 3 × EMA2_t + EMA3_t

  TEMA_t: triple exponential moving average at bar t
  P_t: source price at bar t, usually the close
  EMA_n: exponential moving average with period n and smoothing factor 2 / (n + 1)
  EMA1_t: EMA of price
  EMA2_t: EMA of EMA1
  EMA3_t: EMA of EMA2
  n: EMA period (commonly 9, varies by platform)
  t: bar index
```

Introduced by Patrick Mulloy (1994) alongside DEMA; the 3, -3, +1 weighting cancels most of the lag a plain EMA of the same length carries.

Despite the name it is not simply an EMA applied three times; that plain triple smoothing is EMA3 alone, which lags more.

The reduced lag comes at the cost of overshoot around sharp turns and whipsaw in flat markets.

## How traders use it

- In [crossover](https://www.luxalgo.com/library/concept/moving-average-crossovers/) systems: a fast and slow TEMA pair, or TEMA against a slower conventional average, aims to signal turns earlier than an equivalent EMA pair; earlier also means more failed signals inside ranges.
- As a trend filter: trading only in the direction of a rising or falling TEMA, often taken from a higher timeframe, with the reduced lag getting the filter onside sooner after a genuine turn.
- In [ribbons](https://www.luxalgo.com/library/concept/ma-ribbon/) and multi-length stacks, where several TEMAs of increasing length fan out in trends and compress when the trend weakens.
- As a lower-lag smoothing stage inside other indicators, for example smoothing a momentum or volume series where a standard EMA's delay is the main complaint.
- As a faster dynamic baseline: pullback traders use TEMA where a plain average would sit too far behind a fast trend, accepting extra wiggle for a [dynamic S/R](https://www.luxalgo.com/library/concept/dynamic-s-r-via-ma/) line the market can actually reach.

## TEMA vs similar averages

- **DEMA** (https://www.luxalgo.com/library/concept/dema/): DEMA is the same lag-cancelling idea one order lower: two cascaded EMAs combined as twice the first minus the second. TEMA cancels more lag and hugs price tighter, at the cost of a little more overshoot.
- **TRIX** (https://www.luxalgo.com/library/concept/trix/): TRIX also builds on triple exponential smoothing, but it plots the one-bar rate of change of the triple-smoothed EMA as an oscillator around zero. TEMA is a price overlay, not an oscillator.
- **EMA** (https://www.luxalgo.com/library/concept/ema/): A single EMA of the same length is smoother and never overshoots, but it lags well behind TEMA at turns. TEMA trades some of that stability for earlier response.

## FAQ

### Is TEMA just an EMA applied three times?

No. Triple-smoothing an EMA would produce an extremely laggy line. TEMA computes three cascaded EMAs but combines them as 3 × EMA1 - 3 × EMA2 + EMA3, which cancels much of the accumulated lag. The name refers to the three EMAs used in the construction, not to smoothing price three times.

### What is the difference between TEMA and DEMA?

Both are Mulloy's lag-cancelled averages. DEMA uses two cascaded EMAs, TEMA uses three, so TEMA responds faster and tracks price more tightly at the same length, while DEMA is a little calmer. Neither is strictly better: faster response means earlier real signals and more false ones in choppy conditions.

### Does lower lag make TEMA better than other moving averages?

Not by itself. Lag reduction is a trade, not a free upgrade: TEMA reacts sooner to genuine turns and also to noise, and it can overshoot at sharp reversals. Whether that nets out positive depends on the market, the timeframe, and the rules around it, which is a testing question rather than a property of the formula.

### How does TEMA compare with the Ehlers SuperSmoother?

Different design goals. The SuperSmoother is a filter engineered for maximum smoothness with modest lag and no deliberate overshoot; TEMA is an error-correction combination that buys low lag and accepts overshoot and extra wiggle. On the same chart the SuperSmoother draws the calmer line and TEMA the closer one, and the choice follows whether whipsaw or lateness costs the strategy more.

### What length should TEMA use?

Because the combination cancels lag, a TEMA behaves roughly like a substantially shorter conventional average, so common practice picks longer N than the EMA it replaces. Popular chart settings run from 9 for fast triggers to 50-plus for trend baselines, with no verified universal best. Match N to the swing scale traded, then verify against the whipsaw rate your rules can tolerate.

### How does TEMA behave in ranging markets?

Poorly for signal generation, by design: the responsiveness that serves it in trends turns into wiggle in chop, and TEMA crossovers fire more false signals than slower averages in the same range. Users who keep it in ranges demote it to a reference line and gate entries with a regime filter, or simply switch to the calmer members of the family when conditions compress.

## Related concepts

- SMA: https://www.luxalgo.com/library/concept/sma/
- EMA: https://www.luxalgo.com/library/concept/ema/
- Adaptive-lookback MA: https://www.luxalgo.com/library/concept/adaptive-lookback-ma/
- MA Envelope: https://www.luxalgo.com/library/concept/ma-envelope/
- SWMA: https://www.luxalgo.com/library/concept/swma/
- RMA: https://www.luxalgo.com/library/concept/rma/
- HMA: https://www.luxalgo.com/library/concept/hma/
- KAMA: https://www.luxalgo.com/library/concept/kama/
- JMA: https://www.luxalgo.com/library/concept/jma/
- ZLEMA: https://www.luxalgo.com/library/concept/zlema/

---

Source: https://www.luxalgo.com/library/concept/tema/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/