← Back to Home
Technical Indicators Triple Exponential Moving Average

Technical Indicators Triple Exponential Moving Average

One of the problems most of the time is the lag inherent in many technical indicators, particularly moving averages. The Triple Exponential Moving Average (TEMA), developed by Patrick Mulloy, is a sophisticated ‘Overlap Study’ designed to tackle this very issue. It aims to provide traders with a smoother, more responsive tool for identifying trends and generating signals, but with a character all its own.

The Perennial Problem: Indicator Lag

Traditional moving averages, like the Simple Moving Average (SMA) or even the standard Exponential Moving Average (EMA), are foundational tools. They smooth out price data to help identify the underlying trend. However, this smoothing process introduces a delay, or ‘lag.’ This means that by the time the MA signals a new trend or a reversal, the price might have already made a significant move. For shorter-term traders or those looking for earlier entries, this lag can be a costly drawback. This quest for reduced lag led to the development of more advanced moving averages like the Double Exponential Moving Average (DEMA) and, subsequently, the TEMA.

Decoding TEMA: The Power of Three

So, how does TEMA achieve its enhanced responsiveness? As its name suggests, it involves applying exponential smoothing not once, not twice, but three times, in a specific combination. While the exact formula involves multiple EMA calculations, the core idea is to significantly reduce the lag present in single or double EMAs.

The formula for TEMA is:

TEMA = (3 \times EMA_1) - (3 \times EMA_2) + EMA_3

Where: * EMA_1 = \text{Exponential Moving Average of the price for period N} * EMA_2 = \text{Exponential Moving Average of } EMA_1 \text{ for period N} * EMA_3 = \text{Exponential Moving Average of } EMA_2 \text{ for period N}

The ‘period N’ applies to each EMA calculation within this structure. This triple-smoothing process, combined with the specific weighting in the formula, allows TEMA to hug prices more closely than traditional MAs and even DEMA, providing earlier signals.

Trading with TEMA: Early Bird Gets the Worm?

TEMA’s primary appeal lies in its ability to react quickly to price changes. Here’s how traders often use it:

Its responsiveness makes these signals appear earlier, potentially leading to more profitable entries if the trend persists.

The Catch: Navigating TEMA’s Sensitivity

While TEMA’s responsiveness is its greatest strength, it’s also its main weakness. This high sensitivity means TEMA is particularly prone to generating false signals, often referred to as ‘whipsaws,’ especially in:

Therefore, relying solely on TEMA for trading decisions can be risky. It’s often recommended to:

TEMA in Action: A Python TA-Lib Example

Implementing TEMA is straightforward using libraries like TA-Lib in Python. The function talib.TEMA(close_prices, timeperiod=N) calculates the indicator.

Here’s a conceptual look at how you might calculate and prepare to plot TEMA for, say, Bitcoin (BTC-USD) prices, drawing from the kind of setup you might have:

import yfinance as yf
import pandas as pd
import numpy as np
import talib            # If you have TA‐Lib installed, uncomment the lines that use talib
import matplotlib.pyplot as plt

# 1. Download BTC-USD data with user-preferred settings
btc_data = yf.download(
    'BTC-USD',
    start='2023-01-01',
    end='2024-01-01',
    auto_adjust=False
)
# Drop the extra level from yfinance's MultiIndex columns
btc_data = btc_data.droplevel(axis=1, level=1)

# 2. Extract the close series and the date index
close = btc_data['Close']
dates = btc_data.index

# 3. Choose your TEMA period
period = 30

# 4A. If TA‐Lib is available, you can simply do:
# tema = talib.TEMA(close, timeperiod=period)

# 4B. Otherwise, compute TEMA manually via successive EMAs:
ema1 = close.ewm(span=period, adjust=False).mean()
ema2 = ema1.ewm(span=period, adjust=False).mean()
ema3 = ema2.ewm(span=period, adjust=False).mean()
tema = 3 * ema1 - 3 * ema2 + ema3

# 5. Plot price + TEMA
plt.figure(figsize=(12, 6))
plt.plot(dates, close, label='BTC-USD Close Price')
plt.plot(dates, tema, label=f'TEMA({period})', linewidth=2)
plt.title('BTC-USD Close Price with TEMA(30)')
plt.xlabel('Date')
plt.ylabel('Price (USD)')
plt.legend()
plt.grid(True)
plt.tight_layout()
plt.show()
Pasted image 20250602023741.png

Conclusion: A Powerful Tool, If Handled with Care

The Triple Exponential Moving Average (TEMA) stands out as one of the most responsive moving averages available to traders. Its ability to reduce lag can provide a significant edge in identifying trends early and capturing timely entry or exit points.

However, this speed comes at the cost of increased sensitivity, making it prone to whipsaws in less predictable market conditions. Traders considering TEMA should be aware of its characteristics, use it as part of a broader analytical toolkit, and ideally validate its signals with other indicators or price action analysis, especially in non-trending markets. When used wisely, and with an understanding of its behavior, TEMA can be a valuable addition to a trader’s arsenal for navigating the dynamic world of financial markets.