Files
QuanTAlib/quantower/Averages/MamaIndicator.cs
T

26 lines
710 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 MamaIndicator : IndicatorBase
{
[InputParameter("Fast limit", sortIndex: 2, 0, 1, 0.01, 2)]
public double Fast { get; set; } = 0.4;
[InputParameter("Slow limit", sortIndex: 3, 0, 1, 0.01, 2)]
public double Slow { get; set; } = 0.04;
private Mama? ma;
protected override AbstractBase QuanTAlib => ma!;
public override string ShortName => $"MAMA : {Fast} : {Slow} : {SourceName}";
2024-09-24 16:41:26 -07:00
public MamaIndicator() : base()
2024-09-22 17:31:24 -07:00
{
Name = "MAMA - MESA Adaptive Moving Average";
}
protected override void InitIndicator()
{
ma = new Mama(Fast, Slow);
2024-09-24 16:41:26 -07:00
base.InitIndicator();
2024-09-22 17:31:24 -07:00
}
}