Files
QuanTAlib/quantower/Statistics/MedianIndicator.cs
T
2024-09-24 16:41:26 -07:00

23 lines
635 B
C#

using TradingPlatform.BusinessLayer;
namespace QuanTAlib;
public class MedianIndicator : IndicatorBase
{
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
public int Period { get; set; } = 50;
private Median? med;
protected override AbstractBase QuanTAlib => med!;
public override string ShortName => $"MEDIAN {Period} : {SourceName}";
public MedianIndicator() : base()
{
Name = "MEDIAN - Median historical value";
}
protected override void InitIndicator()
{
med = new Median(Period);
MinHistoryDepths = med.WarmupPeriod;
base.InitIndicator();
}
}