---
title: Tillson T3 Moving Average
permalink: /indicators/T3/
type: moving-average
layout: indicator
---

# {{ page.title }}

><span class="indicator-syntax">**get_t3**(*quotes, lookback_periods=5, volume_factor=0.7*)</span>

## Parameters

| name | type | notes
| -- |-- |--
| `quotes` | Iterable[Quote] | Iterable of the [Quote class]({{site.baseurl}}/guide/#historical-quotes) or [its sub-class]({{site.baseurl}}/guide/#using-custom-quote-classes). <br><span class='qna-dataframe'> • [See here]({{site.baseurl}}/guide/#using-pandasdataframe) for usage with pandas.DataFrame</span>
| `lookback_periods` | int, *default 5* | Number of periods (`N`) for the EMA smoothing.  Must be greater than 0 and is usually less than 63.
| `volume_factor` | float, *default 0.7* | Size of the Volume Factor.  Must be greater than 0 and is usually less than 2.

### Historical quotes requirements

You must have at least `6×(N-1)+100` periods of `quotes` to cover the convergence periods.  Since this uses a smoothing technique, we recommend you use at least `6×(N-1)+250` data points prior to the intended usage date for better precision.

`quotes` is an `Iterable[Quote]` collection of historical price quotes.  It should have a consistent frequency (day, hour, minute, etc).  See [the Guide]({{site.baseurl}}/guide/#historical-quotes) for more information.

## Return

```python
T3Results[T3Result]
```

- This method returns a time series of all available indicator values for the `quotes` provided.
- `T3Results` is just a list of `T3Result`.
- It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first `6×(N-1)` periods will have `None` values since there's not enough data to calculate.

>&#9886; **Convergence warning**: The first `6×(N-1)+250` periods will have decreasing magnitude, convergence-related precision errors that can be as high as ~5% deviation in indicator values for earlier periods.

### T3Result

| name | type | notes
| -- |-- |--
| `date` | datetime | Date
| `t3` | float, Optional | T3 Moving Average

### Utilities

- [.condense()]({{site.baseurl}}/utilities#condense)
- [.find(lookup_date)]({{site.baseurl}}/utilities#find-indicator-result-by-date)
- [.remove_warmup_periods()]({{site.baseurl}}/utilities#remove-warmup-periods)
- [.remove_warmup_periods(qty)]({{site.baseurl}}/utilities#remove-warmup-periods)

See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-results) for more information.

## Example

```python
from stock_indicators import indicators

# This method is NOT a part of the library.
quotes = get_historical_quotes("SPY")

# Calculate 5-period T3
results = indicators.get_t3(quotes, 5, 0.7)
```

## About {{ page.title }}

Created by Tim Tillson, the [T3](https://www.forexfactory.com/attachment.php/845855?attachmentid=845855&d=1322724313) indicator is a smooth moving average that reduces both lag and overshooting.
[[Discuss] &#128172;]({{site.dotnet.repo}}/discussions/332 "Community discussion about this indicator")

![image]({{site.dotnet.charts}}/T3.png)

### Sources

- [C# core]({{site.dotnet.src}}/s-z/T3/T3.Series.cs)
- [Python wrapper]({{site.python.src}}/t3.py)
