mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 11:38:05 +00:00
New version merge
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using TradingPlatform.BusinessLayer;
|
||||
using QuanTAlib;
|
||||
|
||||
public class MaafIndicator : IndicatorBase
|
||||
{
|
||||
[InputParameter("Period", sortIndex: 1, 1, 2000, 1, 0)]
|
||||
public int Period { get; set; } = 39;
|
||||
|
||||
[InputParameter("Threshold", sortIndex: 5, minimum: 0, maximum: 1, increment: 0.001, decimalPlaces:3)]
|
||||
public double Threshold = 0.002;
|
||||
|
||||
private Maaf? ma;
|
||||
protected override AbstractBase QuanTAlib => ma!;
|
||||
public override string ShortName => $"MAAF {Period} : {Threshold:F2} : {SourceName}";
|
||||
|
||||
public MaafIndicator() : base()
|
||||
{
|
||||
Name = "MAAF - Median-Average Adaptive Filter";
|
||||
}
|
||||
|
||||
protected override void InitIndicator()
|
||||
{
|
||||
base.InitIndicator();
|
||||
ma = new Maaf(Period: Period, Threshold: Threshold);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user