Files
QuanTAlib/quantower/Averages/RemaIndicator.cs
T

27 lines
797 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 RemaIndicator : IndicatorBase
{
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
public int Period { get; set; } = 10;
[InputParameter("Regularization Factor", sortIndex: 2, minimum: 0, maximum: 2.5, increment: 0.1, decimalPlaces: 1)]
public double Lambda { get; set; } = 0.5;
private Rema? ma;
protected override AbstractBase QuanTAlib => ma!;
public override string ShortName => $"REMA {Period} : {Lambda:F2} : {SourceName}";
2024-09-24 16:41:26 -07:00
public RemaIndicator() : base()
2024-09-22 17:31:24 -07:00
{
Name = "REMA - Regularized Exponential 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 Rema(period: Period, lambda: Lambda);
}
}