T3 — Tillson T3
תוכן זה אינו זמין עדיין בשפה שלך.
Six chained EMAs recombined with volume-factor coefficients: as smooth as a long average but
with much of the lag removed. vfactor 0 collapses it to a plain triple EMA chain; 1 maximises
the lag correction (and the overshoot).
Signature
T3(period, vfactor, on=<source>)| Argument | Type | Required | Notes |
|---|---|---|---|
period |
int Param or literal | Yes | EMA length used six times. Default 5, bounds 1–200. |
vfactor |
float Param or literal | Yes | Lag-correction strength. Default 0.7, bounds 0.0–1.0. |
on= |
symbol, OHLCV field, or indicator | No | Source. Defaults to the trade symbol’s close. |
Formula
With $e_1 \ldots e_6$ the chained EMAs and $b$ the volume factor:
$$ c_1 = -b^3,\quad c_2 = 3b^2 + 3b^3,\quad c_3 = -6b^2 - 3b - 3b^3,\quad c_4 = 1 + 3b + b^3 + 3b^2 $$ $$ T3 = c_1 e_6 + c_2 e_5 + c_3 e_4 + c_4 e_3 $$
Warmup
The chain seeds from the first value and converges over roughly 6n bars — the longest
warm-up of any average in the library.
Reading the value
t3.valuet3.crossed_above(other)Example
class T3Trend(Strategy): """A smooth trend line that still turns quickly.""" period = Param(5, min=1, max=200) trade = Symbol() sizing = FixedCapital()
def execute(self): t3 = T3(self.period, 0.7, on=self.trade) if self.trade.close > t3.value and self.trade.is_flat: self.buy(self.trade, reason="Above T3") if self.trade.close < t3.value and self.trade.is_long: self.sell(self.trade, self.trade.position, reason="Below T3")Notes
- Tim Tillson, TASC (1998).
- Proven by an assert-via-trade run on SPY daily (converged to an independent six-EMA replication within 0.05 after 40 bars; zero alarm trades).
- Six chained EMAs seeded from the first value: expect early bars to differ from long-history implementations by a decaying amount.
- A different recipe from pandas_ta’s
t3(10, 0.7), not a different scale: measured on a 300-bar tape ours stays about 2.2 % away and never converges to it, because the construction (window offset, seed, weight normalisation) is its own.