Top Leaderboard
Markets

Triple Exponential Moving Average Tema

Ad — article-top

The triple exponential moving average (TEMA) is a smoothed trend-following indicator that reduces the lag present in traditional moving averages by using multiple exponential moving averages (EMAs) of the EMA itself and combining them so some lag is subtracted out. It was developed to keep the smoothing benefits of moving averages while allowing the indicator to react faster to price changes than a standard EMA or simple moving average (SMA).

Key takeaways
– TEMA smooths price data like other moving averages but reduces lag by combining three nested EMAs.
– Formula: TEMA = (3 × EMA1) − (3 × EMA2) + EMA3, where EMA1 is the EMA of price, EMA2 is the EMA of EMA1, and EMA3 is the EMA of EMA2.
– TEMA is used to identify trend direction, potential entries/exits (crossovers), and dynamic support/resistance. It performs best in trending markets and can give false signals in choppy ranges.
– TEMA reduces lag more than the double exponential moving average (DEMA), but both inherit the general limitations of MA-based indicators.
– Best practice: use TEMA with other tools (price action, volume, momentum indicators) and always backtest and use risk management.

Formula and calculation for the TEMA
– Inputs: price series (usually closing prices) and lookback period N.
– Smoothing constant (alpha) used in EMA calculation: alpha = 2 / (N + 1).
– Compute:
1. EMA1 = EMA(price, N)
2. EMA2 = EMA(EMA1, N) (the EMA of EMA1)
3. EMA3 = EMA(EMA2, N) (the EMA of EMA2)
4. TEMA = (3 × EMA1) − (3 × EMA2) + EMA3

Notes on implementation:
– The EMA is usually initialized with a simple average of the first N values (or another convention your platform uses).
– Because EMA2 and EMA3 operate on previously smoothed values, initial values will require warming up; ignore the indicator during the warm-up period.
– Many charting libraries and trading platforms include TEMA as a built-in indicator.

What the TEMA tells you
– Trend direction: The slope of the TEMA indicates the short-to-intermediate trend. Up slope = bullish bias, down slope = bearish bias.
– Crossovers: Price crossing above TEMA can signal the start of a rally (or a pullback ending); price crossing below may signal a reversal to the downside or the start of a correction. Crossovers are not guarantees—confirm with other signals.
– Support and resistance: In trending markets the TEMA may act as dynamic support (in an uptrend) or resistance (in a downtrend) during pullbacks.
– Noise reduction: With a short lookback, TEMA can be used as a cleaner alternative to raw price (line chart) to reduce visual noise while preserving responsiveness.

The TEMA and trend direction
– Use slope/angle to identify trend strength: a steep slope implies a stronger short-term trend; a flat TEMA implies consolidation or range.
– Combine TEMA with longer-term moving averages (e.g., TEMA(21) above SMA/EMA(200)) to define higher-timeframe bias.
– For trend-following entries, many traders wait for pullbacks that find support near the TEMA and then resume the trend with a confirmation candle or an additional momentum signal.

The TEMA for support and resistance
– Example use: in an uptrend, look for price to pull back to the TEMA and then produce a bullish reversal candle or a momentum divergence before entering long.
– Validate: check historical behavior—if the TEMA has held price as support/resistance in the past for a chosen lookback, it’s more likely to be useful going forward.
– Don’t rely on TEMA alone—use price action confirmation (reversal candlestick, higher low, increased volume, etc.).

TEMA vs. DEMA
– DEMA formula: DEMA = (2 × EMA1) − EMA2
– Both DEMA and TEMA aim to reduce lag relative to a single EMA; TEMA reduces more lag than DEMA because it includes the third EMA term.
– Trade-offs: less lag means signals are quicker but also potentially more sensitive to short, false price moves. Which to use depends on your time frame and tolerance for whipsaws.

Limitations of using the TEMA
– Not ideal in choppy/ranging markets—frequent whipsaws and false crossovers.
– Sensitivity to chosen period N: shorter N → more responsive but more false signals; longer N → smoother with more lag.
– Still lags price to some extent—no moving average is instantaneous.
– Can produce more signals (and false signals) than slower MAs, which can be undesirable for buy-and-hold investors.
– Should be combined with other technical/fundamental analysis and disciplined risk management.

Practical steps for traders: how to use TEMA (step-by-step)
1. Choose the time frame and lookback period:
• Short-term trading: N might be 7–21.
• Swing trading: N might be 21–50.
• Position/long-term trend: N might be 50–200.
• Backtest to find the N that best suits your asset and time frame.

2. Add TEMA to your chart:
• Use your trading platform’s built-in TEMA or compute it (see pseudocode/Python below).
• Consider adding a longer-term MA (e.g., EMA200 or SMA200) to see higher-timeframe trend.

3. Define entry rules (example):
• Long entry: price closes above TEMA and TEMA slope is positive; optional confirmation: RSI > 50 or bullish price action.
• Short entry: price closes below TEMA and TEMA slope is negative; optional confirmation: RSI < 50 or bearish price action.

4. Define exit and risk management:
• Stop-loss: recent swing low (for long) or fixed percentage (e.g., 1–3%) depending on volatility.
• Profit target: risk-reward ratio (e.g., 1:2), trailing stop using TEMA or ATR-based trailing stop.
• Position sizing: size positions using volatility or fixed risk per trade.

5. Confirm and filter signals:
• Use an additional indicator (volume, momentum, ADX) to reduce false signals.
• Avoid trading TEMA crossovers when ADX indicates a non-trending market.

6. Backtest and forward-test:
• Backtest rules on historical data for your market and time frame.
• Paper trade or forward-test in a simulator before using real capital.

7. Monitor and adapt:
• Periodically re-evaluate the lookback N and rules as market structure changes.

Simple example (conceptual)
– Suppose you compute EMA1, EMA2, and EMA3 for N = 10 on an equity daily chart.
– If price is above TEMA(10) and TEMA is sloping upward, you have a short-term bullish bias.
– On a pullback to TEMA(10), wait for a bullish reversal candle and enter long with stop below the most recent swing low; place a profit target or use a trailing stop.

Implementation notes and sample pseudocode (high level)
– EMA alpha = 2 / (N + 1)
– Compute EMA1 = EMA(price, N)
– EMA2 = EMA(EMA1, N)
– EMA3 = EMA(EMA2, N)
– TEMA = 3*EMA1 − 3*EMA2 + EMA3

Python/pandas (concise example):
– Use pandas ewm (exponential weighted mean) to compute EMAs:
• ema1 = price.ewm(span=N, adjust=False).mean()
• ema2 = ema1.ewm(span=N, adjust=False).mean()
• ema3 = ema2.ewm(span=N, adjust=False).mean()
• tema = 3*ema1 − 3*ema2 + ema3

Example use case: SPDR S&P 500 ETF (SPY)
– Short lookback TEMA will follow price closely and smooth noise to reveal the short-term trend.
– In trending sessions, price may repeatedly pull back to TEMA and then bounce; traders can use such bounce points for entries with confirmation.

Best practices and tips
– Test multiple lookback values on historical data for each asset and timeframe—one size does not fit all.
– Combine with a higher-timeframe trend filter (e.g., only take long signals on the chart time frame when higher-timeframe TEMA/EMA is up).
– Avoid overfitting: prefer robust parameter choices and test across market regimes.
– Use position sizing and stop-losses—no indicator is foolproof.

Sources and further reading
– Investopedia. “Triple Exponential Moving Average (TEMA).”
– ThinkorSwim Learning Center. “TEMA” and “DEMA.”
– CME Group Education. “Understanding Moving Averages.”
– Peleg, R.; Lazebnik, T.; Hoogi, A. (2023). “Improving Gradient-Trend Identification: Fast-Adaptive Moment Estimation with Finance-Inspired Triple Exponential Moving Average.” IEEE Transactions on Pattern Analysis and Machine Intelligence.

Editor’s note: The following topics are reserved for upcoming updates and will be expanded with detailed examples and datasets.

Ad — article-mid