Logo
OFFLINEPIXEL
/ pinescript-strategies / pine-script-tillson-t3

$ Pinescript Tillson T3

Master this advanced, low-lag, and smooth moving average in TradingView's Pinescript for precise trend identification and robust signals.

500+ Clients Helped
100% Satisfaction
Live Trading Ready
⚠️
Trading financial markets carries risk. All content (PineScript code, indicators, strategies) on this website is for educational purposes only. Past performance is not indicative of future results. By using any code or information from this site, you agree that you are solely responsible for your trading decisions. The author disclaims all liability for any losses incurred. To gain from experts experiences, You can always try our Invite Only Scripts
01

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 Pinescript, 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.

02

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`).

03

GDEMA Helper Function (Conceptual)

pine-script@terminal
//@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)
$ ✓ Compiled successfully
04

Basic Tillson T3 Implementation in Pinescript

pine-script@terminal
//@version=5
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)
$ ✓ Compiled successfully
05

Standard Parameters

Standard Parameters

Common settings for T3 are a `length` of 10 and a `vFactor` (volume factor) of 0.7. Adjusting these can significantly impact its behavior.

06

Practical Tillson T3 Strategies

07

1. T3 as a Trend Direction Filter (Color Change)

pine-script@terminal
//@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)
$ ✓ Compiled successfully
08

2. T3 Crossover Strategy (with Price or another T3)

pine-script@terminal
//@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)
$ ✓ Compiled successfully
09

3. T3 for Dynamic Support and Resistance

pine-script@terminal
//@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)
$ ✓ Compiled successfully
10

Optimizing T3 Performance

To get the most from the Tillson T3 Moving Average in Pinescript:

  • 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.
11

Balance is Key

Balance is Key

The beauty of T3 lies in its balance between lag reduction and smoothing. Fine-tuning the `vFactor` is critical to achieve optimal performance for your specific trading style and asset.

12

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.
13

Conclusion

Conclusion

The Tillson T3 Moving Average is an innovative and highly effective indicator in Pinescript 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.

Enhance Your Trading

Get a high-performance Pinescript analysis tool for actionable market insights, designed for traders on the move.

This strategy runs in live mode on TradingView, helping you identify potential opportunities.

Get Pinescript Strategy