What is the Tillson T3 Moving Average?
The Tillson T3 Moving Average, developed by Tim Tillson, is an advanced moving average that is renowned for its combination of smoothness and responsiveness. It achieves this by applying a specific type of moving average (Generalized Double Exponential Moving Average or GDEMA) six times, with a volumetric factor, resulting in a highly filtered and low-lagging trend indicator. The goal of T3 is to provide a cleaner visual representation of the trend, minimizing whipsaws often seen in traditional moving averages while still reacting promptly to significant price changes.
In Pine Script, T3 is a sophisticated tool for traders who seek a highly optimized moving average that offers clarity in trend direction without compromising too much on timeliness.
Components and Calculation
The calculation of T3 is quite intricate, as it involves a series of nested Exponential Moving Averages (EMAs) and a volume factor. The core idea is based on the GDEMA, which is a weighted average of an EMA and a double EMA (DEMA).
The formula for GDEMA is: `GDEMA(price, period, volumeFactor) = (1 + volumeFactor) * EMA(price, period) - volumeFactor * EMA(EMA(price, period), period)`
The T3 indicator applies this GDEMA calculation recursively six times. Each successive application further smooths the line while attempting to minimize lag due to the volumetric factor (often denoted as `vFactor` or `a`).
//@version=5 // Helper function to calculate GDEMA, which T3 relies on
gdema(src, len, vFactor) => ema1 = ta.ema(src, len) ema2 =
ta.ema(ema1, len) (1 + vFactor) * ema1 - vFactor * ema2
// The actual T3 calculation (simplified for clarity, using custom gdema function)
// For demonstration, a conceptual breakdown; ta.t3 handles the nesting.
// T3 = gdema(gdema(gdema(gdema(gdema(gdema(source, len, vFactor), len, vFactor), len, vFactor), len, vFactor), len, vFactor), len, vFactor)
Fortunately, Pine Script provides a direct built-in function to compute T3, abstracting away the complex nested calculations.
Basic Tillson T3 Implementation in Pine Script
Pine Script v5 provides the convenient built-in function `ta.t3()` for the Tillson T3 Moving Average.
//@version5 indicator("My Tillson T3 Indicator", overlay=true)
// Inputs for T3 parameters
length = input.int(10, title="T3 Length", minval=1) vFactor = input.float(0.7, title="Volume Factor (vFactor)", minval=0.0, maxval=1.0)
// Often called 'a' or 'factor'
// Calculate T3 using the built-in function
t3Value = ta.t3(close, length, vFactor)
// Plot the T3 line
plot(t3Value, title="T3", color=color.blue, linewidth=2)
Practical Tillson T3 Strategies
1. T3 as a Trend Direction Filter (Color Change)
T3's smooth nature and responsiveness make it ideal for identifying the prevailing trend direction with minimal false signals. Coloring the T3 line based on its slope is a common and effective visual strategy.
- Uptrend: T3 is rising (current T3 > previous T3).
- Downtrend: T3 is falling (current T3 < previous T3).
//@version=5 strategy("T3 Trend Color Strategy", overlay=true)
// Inputs for T3
length = input.int(10, title="T3 Length", minval=1) vFactor = input.float(0.7, title="Volume Factor", minval=0.0, maxval=1.0)
// Calculate T3
t3Value = ta.t3(close, length, vFactor)
// Determine T3 color based on its direction
t3Color = t3Value > t3Value[1] ? color.green : color.red
// Plot the T3 line with dynamic color
plot(t3Value, title="T3", color=t3Color, linewidth=2)
// Example entry logic: buy when T3 turns green, sell when T3 turns red
longCondition = t3Value > t3Value[1] and t3Value[1] <= t3Value[2]
// T3 turns up
shortCondition = t3Value < t3Value[1] and t3Value[1] >= t3Value[2]
// T3 turns down
if (longCondition) strategy.entry("Long", strategy.long) if (shortCondition) strategy.entry("Short", strategy.short)
2. T3 Crossover Strategy (with Price or another T3)
Crossovers involving T3 are often considered strong signals due to its unique smoothing and lag reduction. This can be price crossing the T3 line, or two T3s of different lengths crossing each other.
//@version=5
strategy("T3 Crossover Strategy", overlay=true)
// Inputs for T3 lengths
fastT3Length = input.int(10, title="Fast T3 Length", minval=1) slowT3Length = input.int(20, title="Slow T3 Length", minval=1) vFactor = input.float(0.7, title="Volume Factor", minval=0.0, maxval=1.0)
// Calculate T3s
fastT3 = ta.t3(close, fastT3Length, vFactor) slowT3 = ta.t3(close, slowT3Length, vFactor)
// Plot the T3s
plot(fastT3, title="Fast T3", color=color.blue, linewidth=2) plot(slowT3, title="Slow T3", color=color.orange, linewidth=2)
// Crossover conditions (Fast T3 crossing Slow T3)
longCondition = ta.crossover(fastT3, slowT3) shortCondition = ta.crossunder(fastT3, slowT3)
// Strategy entries/exits
if (longCondition) strategy.entry("Long", strategy.long) if (shortCondition) strategy.entry("Short", strategy.short)
3. T3 for Dynamic Support and Resistance
Given its smoothness and responsiveness, T3 can effectively act as dynamic support in uptrends and dynamic resistance in downtrends. Price interaction with the T3 line can offer insights into the trend's health and potential turning points.
//@version=5
indicator("T3 Dynamic S/R", overlay=true) length = input.int(10, title="T3 Length", minval=1) vFactor = input.float(0.7, title="Volume Factor", minval=0.0, maxval=1.0) t3Value = ta.t3(close, length, vFactor) plot(t3Value, title="T3", color=color.blue, linewidth=2)
// Highlight potential support/resistance interactions (conceptual - adjust thresholds)
// These conditions check for price being very close to T3, implying a test or bounce
isSupportTouch = close > t3Value * 0.995 and close < t3Value * 1.005 and t3Value[1] < close[1]
// Price touches T3 from below or just above
isResistanceTouch = close < t3Value * 1.005
and close > t3Value * 0.995 and t3Value[1] > close[1]
// Price touches T3 from above or just below plotshape(isSupportTouch, title="Potential Support", location=location.belowbar, color=color.lime, style=shape.circle, size=size.tiny) plotshape(isResistanceTouch, title="Potential Resistance", location=location.abovebar, color=color.fuchsia, style=shape.circle, size=size.tiny)
Optimizing T3 Performance
To get the most from the Tillson T3 Moving Average in Pine Script:
- Parameter Tuning: Experiment with the `length` and especially the `vFactor` (volume factor) inputs. The `vFactor` controls the degree of noise reduction and lag. A higher `vFactor` (closer to 1.0) increases smoothing but might add more lag, while a lower `vFactor` (closer to 0.0) makes it more responsive but potentially noisier.
- Multi-Timeframe Analysis: Use T3 on higher timeframes to establish the dominant trend, then look for signals on lower timeframes for precise entries and exits. This helps to filter out noise on shorter timeframes.
- Combine with Other Indicators: While T3 is highly optimized, it's beneficial to combine it with other indicators. For instance, use oscillators like RSI or MACD for momentum confirmation or overbought/oversold conditions, or incorporate volume analysis for added confluence.
- Trend Confirmation: T3 performs best in trending markets. In prolonged sideways or non-trending markets, even T3 can generate whipsaws. Consider using a trend strength indicator (e.g., ADX) to confirm a clear trend before relying heavily on T3 signals.
Common T3 Pitfalls
- Complexity of Calculation: While `ta.t3()` simplifies its use, understanding the underlying GDEMA and nested EMA calculations is crucial for effective parameter tuning and advanced strategy development.
- Whipsaws in Extreme Consolidation: Despite its advanced smoothing, T3 can still produce false signals in very flat or extremely volatile, non-trending markets.
- Over-Optimization: Excessive tuning of T3's parameters to past data can lead to curve-fitting, where the strategy performs well historically but fails in live trading.
- Not a Standalone Indicator: T3 is excellent for trend following. However, it doesn't provide overbought/oversold information directly, and should be part of a broader trading system.
Conclusion
The Tillson T3 Moving Average is an innovative and highly effective indicator in Pine Script for TradingView. Its sophisticated design delivers an exceptionally smooth and responsive line, making it a valuable tool for accurate trend identification and dynamic signal generation. By understanding T3's unique calculation, intelligently tuning its parameters, and integrating it strategically within your comprehensive trading approach, you can leverage its power to gain a clearer and more precise perspective on market movements and enhance your trading decisions.