Files
QuanTAlib/quantower/Averages/T3Indicator.cs
T

30 lines
838 B
C#
Raw Normal View History

2024-09-22 17:31:24 -07:00
using TradingPlatform.BusinessLayer;
2024-09-22 20:10:05 -07:00
namespace QuanTAlib;
2024-09-22 17:31:24 -07:00
public class T3Indicator : IndicatorBase
{
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
public int Period { get; set; } = 10;
[InputParameter("Vfactor", sortIndex: 2, 0, 1, 0.01, 2)]
public double Vfactor { get; set; } = 0.62;
[InputParameter("Use SMA for warmup", sortIndex: 3)]
2024-09-24 16:41:26 -07:00
public bool UseSma { get; set; } = false;
2024-09-22 17:31:24 -07:00
private T3? ma;
protected override AbstractBase QuanTAlib => ma!;
public override string ShortName => $"T3 {Period} : {Vfactor:F2} : {SourceName}";
2024-09-24 16:41:26 -07:00
public T3Indicator() : base()
2024-09-22 17:31:24 -07:00
{
Name = "T3 - Tillson T3 Moving Average";
}
protected override void InitIndicator()
{
ma = new T3(period: Period, vfactor: Vfactor, useSma: UseSma);
2024-09-24 16:41:26 -07:00
base.InitIndicator();
2024-09-22 17:31:24 -07:00
}
}