mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 17:48:05 +00:00
normalization of methods
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<Compile Include="..\lib\trends_FIR\**\*.cs" Exclude="..\lib\trends_FIR\**\*.Tests.cs;..\lib\trends_FIR\**\obj\**;..\lib\trends_FIR\**\bin\**" />
|
||||
<Compile Include="..\lib\trends_IIR\**\*.cs" Exclude="..\lib\trends_IIR\**\*.Tests.cs;..\lib\trends_IIR\**\obj\**;..\lib\trends_IIR\**\bin\**" />
|
||||
<Compile Include="..\lib\volatility\**\*.cs" Exclude="..\lib\volatility\**\*.Tests.cs;..\lib\volatility\**\obj\**;..\lib\volatility\**\bin\**" />
|
||||
<Compile Include="..\lib\statistics\**\*.cs" Exclude="..\lib\statistics\**\*.Tests.cs;..\lib\statistics\**\*.Quantower.cs;..\lib\statistics\**\obj\**;..\lib\statistics\**\bin\**" />
|
||||
<Compile Include="..\lib\numerics\**\*.cs" Exclude="..\lib\numerics\**\*.Tests.cs;..\lib\numerics\**\*.Quantower.cs;..\lib\numerics\**\obj\**;..\lib\numerics\**\bin\**" />
|
||||
<Compile Include="..\lib\channels\**\*.cs" Exclude="..\lib\channels\**\*.Tests.cs;..\lib\channels\**\obj\**;..\lib\channels\**\bin\**" />
|
||||
<Reference Include="TradingPlatform.BusinessLayer">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user