Direct answer: the TEMA calculation
TEMA is a Triple Exponential Moving Average. It produces a single smoothed value by combining three exponential moving averages (EMAs) computed from the same input price series.
A commonly used TEMA form is:
- Let EMA1 = EMA of the price series with period n
- Let EMA2 = EMA of EMA1 (same period n)
- Let EMA3 = EMA of EMA2 (same period n)
Then:
TEMA = 3·EMA1 − 3·EMA2 + EMA3
So, if you can compute three EMAs consistently, you can compute TEMA.
Mechanism or definition: what inputs and parameters matter
1) The input data series
TEMA is calculated from a time-ordered series of values (often a “price” series in technical analysis). You must decide what series you are using (for example, close prices), and use it consistently.
Material requirement: TEMA depends on the exact numeric input series. If two sources use different price definitions (or different resampling rules), their TEMA values can differ even with the same period.
2) The smoothing period n
The only explicit parameter in the formula above is the period length n.
- n controls how quickly the EMA reacts.
- Larger n generally smooths more (slower reaction).
- Smaller n generally reacts faster, often with more short-term variability.
3) The EMA step (the building block)
Before you can calculate TEMA, you calculate an EMA. A standard EMA update uses a smoothing factor:
α = 2 / (n + 1)
One common recursive definition is:
EMA_t = α·Price_t + (1 − α)·EMA_(t−1)
To start the recursion, you must choose an initialization rule for the first EMA value (for example, setting EMA_(first) to the first Price value, or using an average of the first n values—different software may do different things). This initialization choice directly affects early EMA and therefore early TEMA values.
4) Constructing the three EMAs
Using the EMA definition above:
- EMA1 is computed directly from the chosen input series.
- EMA2 is computed by applying the same EMA procedure to the EMA1 series.
- EMA3 is computed by applying the same EMA procedure to the EMA2 series.
All three are computed with the same smoothing period n and therefore the same α.
Evidence or example: a self-checkable calculation workflow
Here is a calculation workflow you can replicate exactly with your own data.
Assumptions for this example:
- You have a numeric series Price[1…T].
- You choose a period n.
- You use α = 2/(n+1).
- You use one consistent EMA initialization method throughout.
Steps:
- Compute EMA1[t] from Price[t] using:
- EMA1[t] = α·Price[t] + (1−α)·EMA1[t−1]
- Compute EMA2[t] by applying the same EMA update to EMA1:
- EMA2[t] = α·EMA1[t] + (1−α)·EMA2[t−1]
- Compute EMA3[t] by applying the same EMA update to EMA2:
- EMA3[t] = α·EMA2[t] + (1−α)·EMA3[t−1]
- Combine them:
- TEMA[t] = 3·EMA1[t] − 3·EMA2[t] + EMA3[t]
Independent verification idea:
- If you implement these steps twice (for example, in a spreadsheet and in code) using the same α and initialization rule, both TEMA series should match closely, at least after the initial “warm-up” portion.
Limitations and risks: where TEMA can mislead or break
1) Early values depend on initialization
Because EMA uses a recursive definition, the starting value of EMA1 determines the subsequent values of EMA1, then EMA2, then EMA3. That means early TEMA points can vary noticeably between implementations.
Material limitation: you should treat the first several points of any EMA-based indicator as “warm-up” values unless you know the exact initialization used by your data source.
2) TEMA is still sensitive to noisy inputs
TEMA is constructed to reduce lag compared with a simple EMA, but that does not remove randomness from the underlying price series. When the input series has frequent small reversals or noise, TEMA can oscillate more than a slower average.
Failure mode: if you compute TEMA on an unstable or low-quality series (for example, a series affected by missing data or inconsistent sampling), the output can become unreliable.
3) Different definitions exist in the wild
While the formula TEMA = 3·EMA1 − 3·EMA2 + EMA3 is widely used, some platforms may vary how EMA initialization is handled or may use slightly different conventions in practice. As a result, two “TEMA” lines from different providers may not match perfectly.
Verification risk: you cannot assume the name “TEMA” guarantees identical calculation details. You need the provider’s exact parameterization and initialization.
4) Timeframe and data preprocessing matter
Even without changing n, preprocessing steps—such as resampling bars, using different trading sessions, or handling missing timestamps—change the input series and therefore the EMA chain.
Material limitation: TEMA values are not transferable across timeframes or differently processed data without recomputation.
Verification or next question: what to compare to confirm your TEMA
To independently confirm a TEMA calculation:
- Confirm which input series you use (for example, close price).
- Confirm the period n and therefore α = 2/(n+1).
- Confirm the EMA initialization rule for EMA1 (and whether EMA2 and EMA3 use the same conventions).
- Recompute EMA1, EMA2, EMA3, then apply 3·EMA1 − 3·EMA2 + EMA3.
A useful next step is to compare your computed TEMA with a second independent implementation on the same dataset and with the same initialization. If they match after a warm-up region, your mechanics are likely correct.
If you want to go further, you can also check how TEMA relates to other moving averages on the same input series, or how changing n changes the smoothness and responsiveness.