mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-21 20:18:05 +00:00
Refactor T3 Moving Average Implementation and Remove Unused Tests
- 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.
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
# 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_1$ through $EMA_6$ are exponential moving averages applied in sequence:
|
||||
* $EMA_1(x) = EMA(x)$
|
||||
* $EMA_n(x) = EMA(EMA_{n-1}(x))$
|
||||
@@ -28,6 +33,7 @@ Where:
|
||||
* Default volume factor $v = 0.7$
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Default | Range | Description |
|
||||
|-----------|---------|-------|-------------|
|
||||
| Period | 10 | > 0 | The smoothing period for the internal EMAs |
|
||||
@@ -36,6 +42,7 @@ Where:
|
||||
## C# Usage
|
||||
|
||||
### Standard TSeries Usage
|
||||
|
||||
```csharp
|
||||
// Calculate T3 with period 10 and default volume factor 0.7
|
||||
var t3 = T3.Calculate(sourceSeries, 10);
|
||||
@@ -47,6 +54,7 @@ Console.WriteLine($"T3 Value: {t3.Last.Value}");
|
||||
```
|
||||
|
||||
### Eventing and Reactive Support
|
||||
|
||||
The `T3` class implements `ITValuePublisher`, allowing for event-driven updates.
|
||||
|
||||
```csharp
|
||||
|
||||
Reference in New Issue
Block a user