Triple Exponential Average (TRIX)
I. What is the TRIX Indicator
TRIX (Triple Exponential Average) is a momentum oscillator that measures price momentum by calculating the rate of change of a triple-smoothed Exponential Moving Average (EMA) of closing prices. Thanks to the layered filtering effect of the triple EMA, TRIX effectively eliminates short-term price noise and retains only the most significant trend change signals.
Historical Background
TRIX was invented by Jack Hutson in 1983 and published in Technical Analysis of Stocks and Commodities magazine — a publication Hutson himself founded and edited. He designed TRIX with the goal of creating an indicator that could filter out “meaningless price fluctuations” and only produce signals when a truly significant trend change occurs. The triple EMA design was inspired by the concept of multi-stage low-pass filters in signal processing.
Indicator Classification
- Type: Oscillator, displayed in a separate panel
- Category: Momentum
- Default Parameter: Period
- Value Range: Unbounded, oscillates around the zero line (unit: %)
A single EMA smoothing only partially removes noise; two EMAs (the basis of DEMA) smooth further; a triple EMA almost completely filters out short-term fluctuations. TRIX then calculates the rate of change of this triple EMA — essentially performing “velocity” analysis on already highly smoothed data.
II. Mathematical Principles and Calculation
Core Formula
Step 1: Calculate triple EMA
Step 2: Calculate TRIX (rate of change)
Optional: Signal line
where is typically 9.
EMA Recursive Formula
Step-by-Step Calculation Logic
- Calculate first EMA: Apply -period EMA to closing prices
- Calculate second EMA: Apply -period EMA to the first EMA
- Calculate third EMA: Apply -period EMA to the second EMA
- TRIX = percentage rate of change of the triple EMA
- Optional: Calculate 9-period SMA as signal line
Smoothing Effect of Triple EMA
For triple EMA with period :
- Equivalent smoothing period is approximately periods
- This acts as a very smooth low-pass filter — only price movements sustained over several weeks can significantly affect the TRIX value
Be careful to distinguish TRIX from TEMA (Triple Exponential Moving Average):
- TRIX = rate of change of triple EMA (oscillator)
- TEMA = (overlay indicator) Both use the same triple EMA intermediate products, but their final calculations and applications are completely different.
III. Python Implementation
import numpy as np
import pandas as pd
def trix(close: pd.Series,
period: int = 15,
signal_period: int = 9) -> pd.DataFrame:
"""
Calculate TRIX Indicator
Parameters
----------
close : pd.Series
Close price series
period : int
EMA period, default 15
signal_period : int
Signal line SMA period, default 9
Returns
-------
pd.DataFrame
DataFrame with TRIX and Signal columns
"""
# Triple EMA
ema1 = close.ewm(span=period, adjust=False).mean()
ema2 = ema1.ewm(span=period, adjust=False).mean()
ema3 = ema2.ewm(span=period, adjust=False).mean()
# TRIX = percentage change of triple EMA
trix_values = (ema3 - ema3.shift(1)) / ema3.shift(1) * 100
# Signal line
signal_line = trix_values.rolling(window=signal_period, min_periods=signal_period).mean()
return pd.DataFrame({
"TRIX": trix_values,
"Signal": signal_line
}, index=close.index)
# ========== Usage Example ==========
if __name__ == "__main__":
np.random.seed(42)
dates = pd.date_range("2024-01-01", periods=150, freq="D")
trend = np.linspace(0, 15, 150)
noise = np.cumsum(np.random.randn(150) * 0.8)
price = 100 + trend + noise
df = pd.DataFrame({
"date": dates,
"open": price + np.random.randn(150) * 0.3,
"high": price + np.abs(np.random.randn(150) * 0.6),
"low": price - np.abs(np.random.randn(150) * 0.6),
"close": price,
"volume": np.random.randint(1000, 10000, size=150),
})
df.set_index("date", inplace=True)
# Calculate TRIX
trix_df = trix(df["close"], period=15, signal_period=9)
df = pd.concat([df, trix_df], axis=1)
print("=== TRIX Results (Last 15 Rows) ===")
print(df[["close", "TRIX", "Signal"]].tail(15).to_string())
# Zero-line crossover
df["zero_cross_up"] = (df["TRIX"] > 0) & (df["TRIX"].shift(1) <= 0)
df["zero_cross_down"] = (df["TRIX"] < 0) & (df["TRIX"].shift(1) >= 0)
print("\n=== TRIX Crosses Above Zero ===")
print(df[df["zero_cross_up"]][["close", "TRIX"]].to_string())
print("\n=== TRIX Crosses Below Zero ===")
print(df[df["zero_cross_down"]][["close", "TRIX"]].to_string())
# Signal line crossover
df["sig_cross_up"] = (df["TRIX"] > df["Signal"]) & \
(df["TRIX"].shift(1) <= df["Signal"].shift(1))
df["sig_cross_down"] = (df["TRIX"] < df["Signal"]) & \
(df["TRIX"].shift(1) >= df["Signal"].shift(1))
print("\n=== TRIX Crosses Above Signal Line ===")
print(df[df["sig_cross_up"]][["close", "TRIX", "Signal"]].head(10).to_string())
IV. Problems the Indicator Solves
1. Filtering Market Noise
TRIX’s core value lies in its triple smoothing effect. A large volume of short-term random fluctuations are filtered layer by layer through the EMAs — only truly sustained price movements can significantly influence the TRIX value.
2. Zero-line Crossover (Trend Change)
| Signal | Condition | Meaning |
|---|---|---|
| Buy | TRIX crosses above zero | Triple-smoothed price begins rising -> sustained uptrend begins |
| Sell | TRIX crosses below zero | Triple-smoothed price begins falling -> sustained downtrend begins |
3. Signal Line Crossover
- TRIX crosses above signal line -> Momentum strengthening, buy signal
- TRIX crosses below signal line -> Momentum weakening, sell signal
4. Divergence Signals
Because TRIX is highly smoothed, its divergence signals are more reliable:
- Bearish divergence: New price high + TRIX fails to make new high -> reliable signal of long-term momentum decline
- Bullish divergence: New price low + TRIX fails to make new low -> reliable signal of long-term momentum recovery
5. Trend Strength Assessment
- TRIX absolute value continuously increasing -> trend accelerating
- TRIX absolute value beginning to decrease -> trend decelerating
- TRIX approaching zero line -> trend about to change
TRIX’s triple smoothing makes it respond very slowly. It is suited for capturing major trends but will miss short-term swing opportunities. In fast-reversing markets, TRIX signals may lag severely.
V. Advantages, Disadvantages, and Use Cases
Advantages
| Advantage | Description |
|---|---|
| Exceptional noise filtering | Triple EMA almost completely eliminates short-term noise |
| Very few false signals | High smoothing means only genuine trend changes produce signals |
| Reliable signals | Zero-line and signal-line crossovers have relatively high accuracy |
| More reliable divergence | Divergence on smoothed data is more meaningful than on raw price |
Disadvantages
| Disadvantage | Description |
|---|---|
| Significant lag | Triple smoothing causes large signal delay, potentially missing early moves |
| Not suited for short-term | Excessive smoothing prevents response to short-term price changes |
| Parameter sensitive | Period selection has a significant impact on signal timing |
| Requires trending markets | In prolonged sideways markets, TRIX oscillates repeatedly around zero |
Use Cases
- Medium-to-long-term trend trading: Capturing trends lasting weeks to months
- Position management: TRIX direction can serve as a reference for position direction
- Filter: Only consider long strategies when TRIX > 0
- Broad indices: Works well on indices with relatively smooth volatility
Comparison with Related Indicators
| Comparison | TRIX | MACD | ROC |
|---|---|---|---|
| Smoothing degree | Very high (triple EMA) | Medium (dual EMA difference) | None |
| Lag | Large | Medium | Small |
| False signal rate | Very low | Low | High |
| Suited for | Long-term | Medium-term | Short-term |
| Signal line | Optional SMA(9) | EMA(9) | None |
- Complement with short-term indicators: Use TRIX to determine the big picture, and RSI or Stochastic to find specific entry points.
- Shorten the period: If more responsive signals are needed, reduce the period from 15 to 8–10.
- Watch slope changes: Even if TRIX is still positive, when its slope changes from positive to negative (from rising to falling), it serves as an early warning of trend deceleration.
- Monthly level: Using TRIX(12) on monthly charts can capture annual-scale major trends.