- Deleted DebugTulip.Tests.cs as it was no longer needed. - Refactored T3.cs to encapsulate parameters in a struct for better organization and readability. - Updated methods in T3.cs to use the new Parameters struct, improving clarity and reducing redundancy. - Enhanced T3.md documentation to provide clearer explanations of the T3 moving average and its parameters. - Removed Wma.Coverage.Tests.cs as it was obsolete. - Added new tests in IndicatorExtensions.Tests.cs to validate logic methods and ensure correct calculations. - Updated IndicatorExtensions.cs to improve method organization and add new functionality for handling chart coordinates. - Refactored mocks in TradingPlatformMocks.cs to align with new chart interface definitions.
3.0 KiB
T3: Tillson T3 Moving Average
Overview and Purpose
The Tillson T3 Moving Average is an advanced technical indicator designed to provide superior smoothing with minimal lag. Developed by Tim Tillson and introduced in the January 1998 issue of Technical Analysis of Stocks & Commodities magazine, T3 implements a sophisticated six-stage EMA architecture with optimized coefficient distribution based on a volume factor parameter.
Unlike simpler moving averages or even triple-EMA approaches, T3 uses a unique mathematical framework that strategically combines multiple EMAs with precisely calculated coefficients. This approach creates a moving average that effectively reduces noise while preserving important trend information and minimizing lag.
Core Concepts
- Multi-stage smoothing: Uses a six-stage EMA cascade with optimized coefficient distribution to achieve superior noise reduction while minimizing lag
- Volume factor customization: Provides a parameter that allows traders to fine-tune the balance between smoothness and responsiveness
- Strategic coefficient weighting: Employs a sophisticated formula that prevents overshooting at turning points while maintaining responsiveness
Calculation and Mathematical Foundation
T3 works by running price data through a series of six EMAs, then combining the outputs of these EMAs using carefully calculated weights. These weights are determined by a "volume factor" parameter (v) that controls how much the indicator prioritizes smoothness versus responsiveness.
Formula
T3 = c_1 \cdot EMA_6 + c_2 \cdot EMA_5 + c_3 \cdot EMA_4 + c_4 \cdot EMA_3
Where:
EMA_1throughEMA_6are exponential moving averages applied in sequence:EMA_1(x) = EMA(x)EMA_n(x) = EMA(EMA_{n-1}(x))
- Coefficients are derived from the volume factor
v:c_1 = -v^3c_2 = 3(v^2 + v^3)c_3 = -3(2v^2 + v + v^3)c_4 = 1 + 3v + 3v^2 + v^3
- Default volume factor
v = 0.7
Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| Period | 10 | > 0 | The smoothing period for the internal EMAs |
| Volume Factor | 0.7 | 0-1 | Controls responsiveness vs smoothness (0.618 is also a common value) |
C# Usage
Standard TSeries Usage
// Calculate T3 with period 10 and default volume factor 0.7
var t3 = T3.Calculate(sourceSeries, 10);
// Calculate T3 with period 10 and volume factor 0.618
var t3_custom = T3.Calculate(sourceSeries, 10, 0.618);
Console.WriteLine($"T3 Value: {t3.Last.Value}");
Eventing and Reactive Support
The T3 class implements ITValuePublisher, allowing for event-driven updates.
// Create a publisher source
var source = new TValuePublisher();
// Create T3 consumer attached to the source
var t3 = new T3(source, period: 10, vfactor: 0.7);
// Handle updates
t3.Pub += (result) => {
Console.WriteLine($"New T3 Value: {result.Value} at {result.Time}");
};
// Push new values to source
source.Publish(new TValue(DateTime.UtcNow, 100.0));