mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-17 18:18:04 +00:00
New version merge
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using TradingPlatform.BusinessLayer;
|
||||
using QuanTAlib;
|
||||
|
||||
public class StddevIndicator : IndicatorBase
|
||||
{
|
||||
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
|
||||
public int Period { get; set; } = 20;
|
||||
|
||||
[InputParameter("Population", sortIndex: 2)]
|
||||
public bool IsPopulation { get; set; } = false;
|
||||
|
||||
private Stddev? stddev;
|
||||
protected override AbstractBase QuanTAlib => stddev!;
|
||||
public override string ShortName => $"STDDEV {Period} : {SourceName}";
|
||||
public StddevIndicator() : base()
|
||||
{
|
||||
Name = "STDDEV - Standard Deviation";
|
||||
SeparateWindow = true;
|
||||
}
|
||||
|
||||
protected override void InitIndicator()
|
||||
{
|
||||
stddev = new(Period, IsPopulation);
|
||||
MinHistoryDepths = stddev.WarmupPeriod;
|
||||
base.InitIndicator();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user