public StockIndicator(StockIndicatorType type, bool active, float impact, StockMathToolkit.SmoothingType smoothingType, float min, float max, float step) { this.Type = type; this.IsActive = active; this.Impact = impact; this.SmoothingType = smoothingType; this.Range = new FloatPropertyRange(this.Type, min, max, step); }
public StockIndicator(StockIndicatorType type, bool active, float impact, StockMathToolkit.SmoothingType smoothingType) { this.Type = type; this.IsActive = active; this.Impact = impact; this.SmoothingType = smoothingType; this.Range = null; }
public FloatSerie ApplySmoothing(StockMathToolkit.SmoothingType smoothingType, float inputWidth, float scale) { FloatSerie serie = new FloatSerie(this.Count); StockMathToolkit.SmoothingFunction smoothingFunction = StockMathToolkit.GetSmoothingFunction(smoothingType); int i = 0; foreach (float value in this.Values) { serie[i++] = smoothingFunction(value, inputWidth, scale); } return serie; }