normalization of methods

This commit is contained in:
Miha Kralj
2026-02-10 21:33:16 -08:00
parent 915d7a007b
commit 6d6259a47d
527 changed files with 10525 additions and 2123 deletions
+16
View File
@@ -349,6 +349,15 @@ public class LineSeries(string name, Color color, int width, LineStyle style)
public IReadOnlyList<double> Values => _values;
}
/// <summary>
/// Line level for indicator horizontal lines
/// </summary>
public class LineLevel(double value, string name, Color color, int width, LineStyle style)
: Line(name, color, width, style)
{
public double Value { get; set; } = value;
}
#endregion
#region Paint Chart Event Args
@@ -424,6 +433,7 @@ public interface IWatchlistIndicator
public abstract class Indicator
{
private readonly List<LineSeries> _lineSeries = [];
private readonly List<LineLevel> _lineLevels = [];
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
@@ -439,12 +449,18 @@ public abstract class Indicator
public int Count => HistoricalData.Count;
public IReadOnlyList<LineSeries> LinesSeries => _lineSeries;
public IReadOnlyList<LineLevel> LineLevels => _lineLevels;
protected void AddLineSeries(LineSeries series)
{
_lineSeries.Add(series);
}
protected void AddLineLevel(double value, string name, Color color, int width, LineStyle style)
{
_lineLevels.Add(new LineLevel(value, name, color, width, style));
}
/// <summary>
/// Called when indicator is initialized
/// </summary>