Optimizing and Refactoring HmaClusterBot & -Indicator
This commit is contained in:
Binary file not shown.
@@ -21,9 +21,6 @@ namespace cAlgo.Indicators
|
|||||||
[Parameter("Auto Range Multiplier", DefaultValue = 0.5, MinValue = 0.05, MaxValue = 1.0)]
|
[Parameter("Auto Range Multiplier", DefaultValue = 0.5, MinValue = 0.05, MaxValue = 1.0)]
|
||||||
public double RangeMultiplier { get; set; }
|
public double RangeMultiplier { get; set; }
|
||||||
|
|
||||||
[Parameter("Buffer Size (Points)", DefaultValue = 2000, MinValue = 10)]
|
|
||||||
public int MaxPoints { get; set; }
|
|
||||||
|
|
||||||
[Parameter("Decay Period (Bars)", DefaultValue = 1000, MinValue = 100)]
|
[Parameter("Decay Period (Bars)", DefaultValue = 1000, MinValue = 100)]
|
||||||
public int DecayPeriod { get; set; }
|
public int DecayPeriod { get; set; }
|
||||||
|
|
||||||
@@ -52,8 +49,8 @@ namespace cAlgo.Indicators
|
|||||||
|
|
||||||
_hma = Indicators.HullMovingAverage(Bars.ClosePrices, HmaPeriod);
|
_hma = Indicators.HullMovingAverage(Bars.ClosePrices, HmaPeriod);
|
||||||
|
|
||||||
// Calculator initialisieren mit der Kapazität aus den Parametern
|
// Calculator initialisieren
|
||||||
_calculator = new ClusterCalculator(MaxPoints);
|
_calculator = new ClusterCalculator();
|
||||||
|
|
||||||
_currentDynamicRange = 5.0 * Symbol.PipSize;
|
_currentDynamicRange = 5.0 * Symbol.PipSize;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -306,7 +306,7 @@ namespace cAlgo.Robots
|
|||||||
_errorCallback = errorCallback;
|
_errorCallback = errorCallback;
|
||||||
|
|
||||||
// Calculator mit Reserve initialisieren
|
// Calculator mit Reserve initialisieren
|
||||||
_clusterCalculator = new Myc.ClusterCalculator(_config.MaxPoints + 200);
|
_clusterCalculator = new Myc.ClusterCalculator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
|
|||||||
Reference in New Issue
Block a user