mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 02:28:05 +00:00
New version merge
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using TradingPlatform.BusinessLayer;
|
||||
using QuanTAlib;
|
||||
public class PercentileIndicator : IndicatorBase
|
||||
{
|
||||
[InputParameter("Period", sortIndex: 1, 2, 2000, 1, 0)]
|
||||
public int Period { get; set; } = 20;
|
||||
|
||||
[InputParameter("Percent", sortIndex: 2, 0, 100, 1, 0)]
|
||||
public double Percent { get; set; } = 50;
|
||||
|
||||
private Percentile? percentile;
|
||||
protected override AbstractBase QuanTAlib => percentile!;
|
||||
public override string ShortName => $"PERCENTILE {Period} {Percent:F0}% : {SourceName}";
|
||||
|
||||
public PercentileIndicator() : base()
|
||||
{
|
||||
Name = "PERCENTILE - n-th Percentile ";
|
||||
SeparateWindow = false;
|
||||
}
|
||||
|
||||
protected override void InitIndicator()
|
||||
{
|
||||
percentile = new(Period, Percent);
|
||||
MinHistoryDepths = percentile.WarmupPeriod;
|
||||
base.InitIndicator();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user