Skip to main content

TEMA (Triple Exponential Moving Average) Indicator

TEMA (Triple Exponential Moving Average) applies triple exponential smoothing to price data, aiming to cut the lag of a normal EMA while staying smooth.

What is the TEMA Indicator?​

Developed by Patrick G. Mulloy in 1994 as an enhancement to standard EMAs, TEMA combines three EMAs of the same length to produce a single, more responsive line:

TEMA = 3×EMA1 − 3×EMA2 + EMA3, where EMA2 is the EMA of EMA1, and EMA3 is the EMA of EMA2.

The result tracks price more closely than a single EMA, with noticeably less lag.

How to Read TEMA​

  • TEMA sloping upward: uptrend
  • TEMA sloping downward: downtrend
  • Price or a second moving average crossing TEMA: commonly used as a buy/sell trigger, the same way an EMA crossover is read
  • Divergence between TEMA and price: can hint at a slowing trend

Best Use Cases​

  1. Trend Trading: TEMA is built for trend-following strategies where lag directly costs money.
  2. Volatility Analysis: its responsiveness makes it useful for reading changing market conditions.
  3. Confirmation Tool: many traders use TEMA alongside chart patterns (triangles, wedges) or support/resistance levels rather than standalone.

TEMA PineScript for TradingView​

Here's a ready-to-use TEMA strategy template. Paste it into the Pine Editor, adjust the TEMA length, target, and stop loss to your preference, and backtest it.

info

To learn how to add this pinescript in TradingView, click here.

warning

This strategy is for demonstration purposes only and is not intended for actual trading. AlgoTest is not responsible for any profit or loss arising from the use of this sample strategy.

//@version=5
strategy("TEMA Strategy", overlay=true)

// Input parameters
length = input.int(14, title="TEMA Length")
target_points = input.int(100, title="Target Points")
stop_loss_points = input.int(50, title="Stop Loss Points")

// Calculate TEMA
ema1 = ta.ema(close, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
tema = 3 * ema1 - 3 * ema2 + ema3

// Strategy logic
long_condition = ta.crossover(close, tema)
short_condition = ta.crossunder(close, tema)

// Plot TEMA
plot(tema, color=color.blue, title="TEMA")

// Strategy entry
if long_condition
strategy.entry("Long", strategy.long)

if short_condition
strategy.entry("Short", strategy.short)

// Calculate target and stop loss levels
long_target = strategy.position_avg_price + target_points
long_stop_loss = strategy.position_avg_price - stop_loss_points
short_target = strategy.position_avg_price - target_points
short_stop_loss = strategy.position_avg_price + stop_loss_points

// Strategy exit
strategy.exit("Long Exit", "Long", limit=long_target, stop=long_stop_loss)
strategy.exit("Short Exit", "Short", limit=short_target, stop=short_stop_loss)

Once you've backtested it, you can connect the alert to AlgoTest to automate live execution without manually watching the chart.

FAQ​

What is the TEMA indicator?​

TEMA is a type of moving average that applies triple exponential smoothing to price data, giving a smoother line than a plain EMA while cutting down on lag.

How do you read the TEMA indicator?​

Traders interpret TEMA by watching its slope and crossovers with price or other moving averages to identify trends and potential trade opportunities.

What does TEMA stand for?​

TEMA stands for Triple Exponential Moving Average, a technical indicator used to analyze price trends and generate buy or sell signals.

What is the TEMA/DEMA strategy?​

The TEMA/DEMA strategy combines the Triple Exponential Moving Average (TEMA) with the Double Exponential Moving Average (DEMA) to identify trend reversals and generate trading signals.

For more insights and detailed analysis tools, visit AlgoTest Signals.