Files
QuanTAlib/quantower/Statistics/EntropyIndicator.cs
T

25 lines
662 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 EntropyIndicator : IndicatorBase
{
[InputParameter("Period", sortIndex: 1, 2, 2000, 1, 0)]
public int Period { get; set; } = 50;
private Entropy? entropy;
protected override AbstractBase QuanTAlib => entropy!;
public override string ShortName => $"ENTROPY {Period} : {SourceName}";
2024-09-24 16:41:26 -07:00
public EntropyIndicator() : base()
2024-09-22 17:31:24 -07:00
{
Name = "ENTROPY - Entropy";
SeparateWindow = true;
}
protected override void InitIndicator()
{
entropy = new(Period);
MinHistoryDepths = entropy.WarmupPeriod;
2024-09-24 16:41:26 -07:00
base.InitIndicator();
2024-09-22 17:31:24 -07:00
}
}