2024-09-22 17:31:24 -07:00
|
|
|
using TradingPlatform.BusinessLayer;
|
2024-09-24 16:41:26 -07:00
|
|
|
using QuanTAlib;
|
2024-09-22 17:31:24 -07:00
|
|
|
|
|
|
|
|
public class AlmaIndicator : IndicatorBase
|
|
|
|
|
{
|
|
|
|
|
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
|
|
|
|
|
public int Period { get; set; } = 10;
|
|
|
|
|
|
|
|
|
|
[InputParameter("Offset", sortIndex: 5)]
|
2024-09-24 16:41:26 -07:00
|
|
|
public double Offset = 0.85;
|
2024-09-22 17:31:24 -07:00
|
|
|
|
|
|
|
|
[InputParameter("Sigma", sortIndex: 6)]
|
2024-09-24 16:41:26 -07:00
|
|
|
public double Sigma = 6.0;
|
2024-09-22 17:31:24 -07:00
|
|
|
private Alma? ma;
|
|
|
|
|
protected override AbstractBase QuanTAlib => ma!;
|
|
|
|
|
public override string ShortName => $"ALMA {Period} : {Offset:F2} : {Sigma:F0} : {SourceName}";
|
|
|
|
|
|
2024-09-24 16:41:26 -07:00
|
|
|
public AlmaIndicator() : base()
|
2024-09-22 17:31:24 -07:00
|
|
|
{
|
|
|
|
|
Name = "ALMA - Arnaud Legoux Moving Average";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void InitIndicator()
|
|
|
|
|
{
|
2024-09-24 16:41:26 -07:00
|
|
|
base.InitIndicator();
|
2024-09-22 17:31:24 -07:00
|
|
|
ma = new Alma(period: Period, offset: Offset, sigma: Sigma);
|
|
|
|
|
}
|
|
|
|
|
}
|