Files
QuanTAlib/quantower/Statistics/ZscoreIndicator.cs
T

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