Periods -> Period, DataSource attribute

This commit is contained in:
Miha Kralj
2024-11-08 17:11:18 -08:00
parent 61a16bd5e3
commit 5bcdf8d614
75 changed files with 370 additions and 1053 deletions
+5 -5
View File
@@ -5,15 +5,15 @@ namespace QuanTAlib;
public class RealizedIndicator : Indicator, IWatchlistIndicator
{
[InputParameter("Periods", sortIndex: 1, 1, 2000, 1, 0)]
public int Periods { get; set; } = 20;
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
public int Period { get; set; } = 20;
[InputParameter("Annualized", sortIndex: 2)]
public bool IsAnnualized { get; set; } = true;
private Rv? realized;
protected LineSeries? RvSeries;
public int MinHistoryDepths => Periods;
public int MinHistoryDepths => Period;
int IWatchlistIndicator.MinHistoryDepths => MinHistoryDepths;
public RealizedIndicator()
@@ -28,7 +28,7 @@ public class RealizedIndicator : Indicator, IWatchlistIndicator
protected override void OnInit()
{
realized = new(Periods, IsAnnualized);
realized = new(Period, IsAnnualized);
base.OnInit();
}
@@ -40,5 +40,5 @@ public class RealizedIndicator : Indicator, IWatchlistIndicator
RvSeries!.SetValue(result.Value);
}
public override string ShortName => $"RV ({Periods}{(IsAnnualized ? " - Annualized" : "")})";
public override string ShortName => $"RV ({Period}{(IsAnnualized ? " - Annualized" : "")})";
}